hi guys
im lookin for a script that will scan all channels its in and report any nicks containing RSC
i.e
<me>!RSC
<bot> |channel A has 33| |channel B has 12| |channel C has 55| all nicks contain RSC
Code: Select all
bind PUB m|o !RSC find:rsc
proc find:rsc {nickname hostname handle channel arguments} {
if {[array exists channels]} {
array unset channels
}
array set channels {}
foreach chan [channels] {
foreach user [chanlist $chan] {
if {[string match *RSC* $user]} {
set channels($chan) [expr {![info exists channels($chan)]?0:[incr $channels($chan)]}]
}
}
}
if {![array size channels]} {
putserv "NOTICE $nickname :Found no users."
} else {
putserv "PRIVMSG $channel :[join [array get channels] " | "]."
}
}
Code: Select all
bind PUB m|o !RDS find:rds
proc find:rds {nickname hostname handle channel arguments} {
if {[array exists channels]} {
array unset channels
}
array set channels {}
foreach chan [channels] {
foreach user [chanlist $chan] {
if {[string match *RDS* $user]} {
set channels($chan) [expr {![info exists channels($chan)]?0:[incr $channels($chan)]}]
}
}
}
if {![array size channels]} {
putserv "NOTICE $nickname :Found no users."
} else {
putserv "PRIVMSG $channel :[join [array get channels] " | "]."
}
}
Code: Select all
bind PUB m|o !RDS find:rds
proc find:rds {nickname hostname handle channel arguments} {
foreach chan [channels] {
foreach user [chanlist $chan] {
if {[string match *RDS* $user]} {
set channels($chan) [expr {![info exists channels($chan)]?0:$channels($chan)+1}]
}
}
}
if {![array size channels]} {
putserv "NOTICE $nickname :Found no users."
} {
putserv "PRIVMSG $channel :[join [array get channels] " | "]."
}
}
Code: Select all
0:$chan...
Code: Select all
1:$chan...