| View previous topic :: View next topic |
| Author |
Message |
modex Voice
Joined: 26 Dec 2006 Posts: 3
|
Posted: Sun Oct 14, 2007 3:44 pm Post subject: nick must contain |
|
|
i need some help, i tried modifying a script that.. on join if the users nick does not contain the word/text specified, it kicks the user.
| Code: |
bind join - "*sz*!*@*" chknick
proc chknick {nick uhost hand chan} {
if {$nick == "*sz*!} {
return 0
} else {
putmsg $chan "!k $nick users nick does not contain ''sz''"
}
}
|
basically thats my horrible attempt at writing the script. if anyone is willing to help me out i greatly appreciate it.
thanks in advance. |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Mon Oct 15, 2007 1:44 am Post subject: |
|
|
Try: | Code: | bind join - "* *sz*!*@*" join:chknick
proc join:chknick {nick host handle channel} {
if {[isbotnick $nick]} {return 0}
if {![string match "*sz*" $nick] && [botonchan $channel] && [botisop $channel]} {
putserv "PRIVMSG $channel :!k $nick users nick dose not contain 'sz'"
return 1
}
} |
_________________ TCL the misunderstood |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Mon Oct 15, 2007 3:50 pm Post subject: |
|
|
| Why would you use a trigger to kick the user if the bot can do that straight away..? |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Mon Oct 15, 2007 5:48 pm Post subject: |
|
|
| Code: | | bind join - "* *sz*!*@*" join:chknick |
I think it should be:
| Code: | | bind join - * join:chknick |
What do you say? _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Tue Oct 16, 2007 3:39 am Post subject: |
|
|
Both will work, Am just fussie with binds. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
|