want to do something when eggy joins a channel
Code: Select all
#settings from config file
global my-hostname
global my-ip
if {($uhost != my-hostname) && ($uhost != my-ip)}
Code: Select all
#settings from config file
global my-hostname
global my-ip
if {($uhost != my-hostname) && ($uhost != my-ip)}
Code: Select all
if {$uhost != my-hostname} {
Code: Select all
if {![isbotnick $nick]} {
# code here
}
Code: Select all
set our_chan "#mychan"
bind join - *!*@* join_handler
proc join_handler {nick uhost hand chan} {
global our_chan
global {my-hostname}
global {my-ip}
# only respond to joining $our_chan
if {[string tolower $chan] != $our_chan} {
return 0
}
set host [lindex [split $uhost @] 1]
if {($host == ${my-hostname}) || ($host == ${my-ip})} {
set msg "it is me"
} else {
set msg "it is not me"
}
# send msg to channel
putserv "privmsg $chan : welcome $nick $uhost :: $msg
return 1
}
Code: Select all
bind JOIN - * pJoinProc
proc pJoinProc {nick uhost hand chan} {
if {[isbotnick $nick]} {
# code here if it was the bot that triggered the join bind
} else {
# code here if it was not the bot that triggered the join bind
}
return 0
}