egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

nick must contain

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
modex
Voice


Joined: 26 Dec 2006
Posts: 3

PostPosted: Sun Oct 14, 2007 3:44 pm    Post subject: nick must contain Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Mon Oct 15, 2007 1:44 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Mon Oct 15, 2007 3:50 pm    Post subject: Reply with quote

Why would you use a trigger to kick the user if the bot can do that straight away..?
Back to top
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Mon Oct 15, 2007 5:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Tue Oct 16, 2007 3:39 am    Post subject: Reply with quote

Both will work, Am just fussie Razz with binds.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber