set monchan "#MonitorChannel"
bind raw - NOTICE SnoticeMonitor
proc SnoticeMonitor {from key text} {
if {[string match *!*@* $from]} { return 0 ; # not a server notice }
if {[regexp -nocase { CONNECT: Client connecting on port (\d+) \(class (\S+)\): ([^!]+)!([^@]+)@(\S+) \(([0-9a-f.:]+)\) \[(.*)\]} $text -> port class nick ident host ip realname]} {
putserv "PRIVMSG $::monchan :$nick connecting from $ident!$host"
}
if {[regexp -nocase { REMOTECONNECT: Client connecting at (\S+\:) ([^!]+)!([^@]+)@(\S+) \(([0-9a-f.:]+)\) \[(.*)\]} $text -> server nick ident host ip realname] } {
putserv "PRIVMSG $::monchan :$nick connecting from $ident!$host"
}
return 0
}