This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

nick must contain

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
m
modex
Voice
Posts: 3
Joined: Tue Dec 26, 2006 6:25 pm

nick must contain

Post by modex »

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: Select all

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.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Try:

Code: Select all

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
 }
}
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Why would you use a trigger to kick the user if the bot can do that straight away..?
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

Code: Select all

bind join - "* *sz*!*@*" join:chknick 
I think it should be:

Code: Select all

bind join - * join:chknick
What do you say?
|AmDeAtH @ Undernet
Death is only the *Beginning*...
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Both will work, Am just fussie :P with binds.
Post Reply