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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
WisH-GR
Voice
Posts: 9 Joined: Mon Aug 17, 2009 4:43 am
Post
by WisH-GR » Mon Aug 17, 2009 4:56 am
hello again.i need help with one more tcl.
i want my bot to send a msg to a channel #chan2 when a users joins channel #chan1.
for example if nickname user1 joins #chan1 i want the bot to say to #chan2
!! user1 has joined #chan1 !!
tueb
Halfop
Posts: 76 Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:
Post
by tueb » Mon Aug 17, 2009 6:09 am
Code: Select all
bind join - * on_joined
proc on_joined {nick host handle channel} {
if {$channel == "#chan1"} {
putserv "PRIVMSG #chan2 :!! $nick has joined #chan1 !!"
}
}
i hope this will work.
just replace #chan1 and #chan2 with the real channel names.
tueb
arfer
Master
Posts: 436 Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK
Post
by arfer » Mon Aug 17, 2009 3:50 pm
It is possible that the channel name passed to a proc as a consequence of a bind is somehow different in upper/lower case from the same channel name manually configured in a script, which would cause the following code fragment to fail :-
The statement above is case sensitive. It is always better to use the following instead :-
Code: Select all
if {[string equal -nocase $channel "#chan1"]} {
I must have had nothing to do
Felix2003
Voice
Posts: 24 Joined: Fri Feb 06, 2009 8:19 pm
Post
by Felix2003 » Tue Aug 18, 2009 8:02 pm
i stayed simple
Code: Select all
bind join - "#chan1 *!*@*" auto-messenge
proc auto-messenge {nick uhost handle chan} {
putquick "PRIVMSG #chan2 : !! <$nick> <$uhost> has joined #chan1 !!