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 

Message when certain ident/hostmasks join

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Reserve
Voice


Joined: 18 Apr 2005
Posts: 6
Location: Nottingham, UK

PostPosted: Sun Mar 26, 2006 2:07 pm    Post subject: Message when certain ident/hostmasks join Reply with quote

Im writing (trying to write) a script that will put a msg to a channel when certain users using a certain ident and/or hostmask joins. Ive searched the forums and found some usefull snippets of code and from that i've So far got

Code:
bind join - * onjoin:msg

proc onjoin:msg {nick host hand chan} {
   if {$host == "~ident@host.mask"} {
     putquick "PRIVMSG $chan : Message for user 1"
   } elseif {$host == "~ident@another.host.mask"} {
     putquick "PRIVMSG $chan : Message for user 2"
   } elseif {$host == "*.*@another.host.mask"} {
     putquick "PRIVMSG $chan : Message for users from hostmask"
   }
}


But that doesnt seem to work Sad

I get no errors but the bot doesnt put the msg to the channel when the user joins Confused

Can anyone see from the code what ive done wrong?

How would i add a pause/delay into the script so that the bot pauses for say 5 seconds before it posts the msg?

Any help greatly appreciated

Regards

Reserve
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Mar 26, 2006 9:06 pm    Post subject: Reply with quote

You can't use wildcards with ==, instead try
Code:
if {[string match -nocase "*id@host.*" $host]} {

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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