| View previous topic :: View next topic |
| Author |
Message |
Reserve Voice
Joined: 18 Apr 2005 Posts: 6 Location: Nottingham, UK
|
Posted: Sun Mar 26, 2006 2:07 pm Post subject: Message when certain ident/hostmasks join |
|
|
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
I get no errors but the bot doesnt put the msg to the channel when the user joins
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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Mar 26, 2006 9:06 pm Post subject: |
|
|
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 |
|
 |
|