mIRC Homepage
Posted By: theguy0000 what is wrong with this kick script? - 23/12/05 05:02 PM
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?
Posted By: Zonk Re: what is wrong with this kick script? - 23/12/05 05:27 PM
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
  }  
} 
Posted By: sparkicks Re: what is wrong with this kick script? - 23/12/05 08:50 PM
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
Posted By: schaefer31 Re: what is wrong with this kick script? - 23/12/05 09:00 PM
The / is actually not needed either way.
Posted By: sparkicks Re: what is wrong with this kick script? - 23/12/05 09:29 PM
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....
Posted By: FiberOPtics Re: what is wrong with this kick script? - 23/12/05 11:05 PM
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.
© mIRC Discussion Forums