The Code
Code: Select all
set si(mc) "#monitoringchan"
set si(ac) "#alertchan"
set si(except) {
"*!cservice@undernet.org"
"*!*@me.users.undernet.org"
}
bind raw - INVITE show:invite
proc show:invite { nick uhost key args } {
global botnick si
set nik [lindex [split $nick !] 0]
set host [lindex [split $nick !] 1]
set ban [lindex [split $nick @] 1]
set text [lindex [split $args #] 1]
foreach ehost $si(except) {
if {[string match $ehost "$nik!$host"]} { return 0 }
}
putserv "PRIVMSG $si(ac) :INVITE SPAM by\0032 $nik \003\[$host\]: invited to $text"
putserv "PRIVMSG $si(mc) :.ban *!*@$ban Inviter!"
}
I can't get the right setting for $text so that will see in the alert chan, .... the channel that the bot got invited to by XXXXOn Alert chan
(05:03:22) <bot> INVITE SPAM by XXXX [~xxx@127.0.0.1]: invited to ......
Have any ideas ?