mIRC Home    About    Download    Register    News    Help

Print Thread
#115412 26/03/05 02:14 AM
Joined: Jun 2004
Posts: 133
S
state Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
i think the code explains itself what im trying to do

Code:
on *!:join:#fukliam: { 

  set %timerpswrd ON

  set %psswrdnick $nick

  msg # Welcome $nick $+ , This is a private channel. Please enter the password or you will be kicked (10seconds)

  timer1 1 10 psswrdkick

}


on *!:TEXT:password:#fukliam: { 

  if ($2 == test) { 

    set %timerpswrd OFF

  }

}

alias psswrdkick {

  if (%timerpswrd ==  OFF) {

    halt

    elseif (%timerpsrd == ON) {

      mode #fukliam +b $address(%psswrdnick,5)

      kick #fukliam %psswrdnick Removed

      timerban 1 3 mode #fukliam -b $address(%psswrdnick,5)

      unset %timerpswrd 

      unset %psswrdnick

    }

  }

#115413 26/03/05 03:00 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on !*:join:#fukliam: {
set %timerpswrd ON
set %psswrdnick $nick
msg # Welcome $nick $+ , This is a private channel. Please enter the password or you will be kicked (10seconds)
timer 1 10 psswrdkick
}
on !*:TEXT:password *:#fukliam: {
   if ($2 == test) {     set %timerpswrd OFF  }
}

alias psswrdkick {
if (%timerpswrd == ON) {
  /ban -ku3 %psswrdnick 5 Removed
   unset %timerpswrd
   unset %psswrdnick
    }
  }


1) Rewrote your code changing the *! to !* in your on join & on text lines...this will then trigger for anyone except you...you had the right idea, just had the sequence reversed.
2) Removed the unnecessary
Code:
 if (%timerpswrd ==  OFF) {
halt 

that sequence, as you had it, would've given you an if elseif error, since you had an elseif, but no if corresponding to it.

#115414 26/03/05 03:07 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Quote:

i think the code explains itself what im trying to do


Sometimes it helps to describe what the code is supposed to do. Or what portion isn't working sufficiently. smile

Code:
on @*:join:#fukliam: { 
  set -u10 %timerpswrd ON
  set %psswrdnick $nick
  set %psswrdchan $chan
  msg # Welcome $nick $+ , This is a private channel. Please enter the password or you will be kicked (10seconds)
  .timerpsswrd 0 1 psswrdkick
}


on @*:TEXT:password *:#fukliam: { 
  if ($2 == test) {
    if ($timer(psswrd)) { .timerpsswrd off }
    set %timerpswrd OFF
    .notice $nick Password Accepted.
  }
}

alias psswrdkick {
  if (!%timerpswrd) {
    ban -k %psswrdchan %psswrdnick 5 Removed.
    if ($timer(psswrd)) { .timerpsswrd off }
    .timerban 1 3 mode %psswrdchan -b $address(%psswrdnick,5)
  }
}

#115415 26/03/05 03:16 AM
Joined: Jun 2004
Posts: 133
S
state Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
thank you both for your help smile very much appreciated

#115416 26/03/05 04:29 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You're welcome. smile

#115417 26/03/05 04:48 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on @*:join:#fukliam:{ 
  msg # Welcome $nick $+ , This is a private channel. Please enter the password or you will be kicked (10seconds)
  set -u60 $+(%,password.not.entered.by.,$nick) $true
  .timer 1 10 passwordkick $chan $!( $+ $nick $+ ,)
}
alias -l passwordkick {
  if $($+(%,password.not.entered.by.,$2),2) {
    ban -k $1 $2 5 Removed.
    .timerban 1 3 mode $1 -b $address($2,5)
    unset $+(%,password.not.entered.by.,$2)
  }
}
;
on @*:TEXT:password thepasswordhere:#fukliam:{
  unset $+(%,password.not.entered.by.,$nick)
  .notice $nick Password Accepted.
}


I dont know if u can change nicks while in your channel, but you should let people then add this...

Code:
on *:NICK:{
  if (($($+(%,password.not.entered.by.,$nick),2)) && ($newnick ison #fukliam)) {
    .notice $newnick Mahahahahahaha trying to evade!
    ban -k #fukliam $newnick 5 Removed.
    .timerban 1 3 mode #fukliam -b $address($newnick,5)
    unset $+(%,password.not.entered.by.,$nick)
  }
}


Its more fun catching them out than not allowing them to try.

#115418 26/03/05 02:52 PM
Joined: Jun 2004
Posts: 133
S
state Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
laugh very nice


Link Copied to Clipboard