mIRC Home    About    Download    Register    News    Help

Print Thread
what is wrong with this kick script? #138052 23/12/05 05:02 PM
Joined: Dec 2005
Posts: 5
T
theguy0000 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Dec 2005
Posts: 5
Code:
on *:KICK:#: {
  if ($knick === $me) {
    //join $chan
    //notice $nick you may not kick $me
    //notice %owner $nick kicked me from $chan [[ $time ]]
  }
  else {
    //set %kick $iif($read(nokick.txt,s,$knick),yes,no)
    if %kick == yes {
      //notice $nick (WARNING)  you may not kick $knick
      //notice %owner $nick kicked $knick from $chan
      //invite $knick $chan
    }
  }
}


I add my nick to nokick.txt
Someone kicked me to test this script.
then I was the one to get warned:

-channel- (WARNING) you may not kick theguy0000

but I am theguy0000 and I was kicked by someone else, who did not get any warning whatsoever.

what is wrong here?

Re: what is wrong with this kick script? #138053 23/12/05 05:27 PM
Joined: Jan 2003
Posts: 53
Z
Zonk Offline
Babel fish
Offline
Babel fish
Z
Joined: Jan 2003
Posts: 53
Code:
on !@*:kick:#: {
  if ($knick == $me) {
    join $chan
    notice $nick You max not kick $me
    notice %owner $nick kicked me from $chan [[ $time ]]
  }
  elseif ($read(nokick.txt,w,$knick)) {
    notice $nick (WARNING)  You may not kick $knick
    notice %owner $nick kicked $knick from $chan [[ $time ]]
    invite $knick $chan
  }  
} 

Re: what is wrong with this kick script? #138054 23/12/05 08:50 PM
Joined: Nov 2005
Posts: 11
S
sparkicks Offline
Pikka bird
Offline
Pikka bird
S
Joined: Nov 2005
Posts: 11
codes never use / unless they are directly after the condition eg
Code:
on 1:TEXT:hi:#chan:/msg $chan hi back to you $nick

there its after the condition
Code:
on 1:TEXT:hi:#chan: {
msg $chan hi back to you $nick
}


there is no / if the command is no after the condition

Re: what is wrong with this kick script? #138055 23/12/05 09:00 PM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
The / is actually not needed either way.

Re: what is wrong with this kick script? #138056 23/12/05 09:29 PM
Joined: Nov 2005
Posts: 11
S
sparkicks Offline
Pikka bird
Offline
Pikka bird
S
Joined: Nov 2005
Posts: 11
but is accpted one way and causes an error the other i personally include a / after the condition to show where condition ends and result starts....

Re: what is wrong with this kick script? #138057 23/12/05 11:05 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
The / is only needed if you want to execute a command from an editbox, it has no use in scripts, certainly nothing to do with positions before or after conditions of any sort.


Gone.