I want to get all the users that have a specific host. Thats the Script:
Code: Select all
# __ __ __
# /\ \ /\ \ __/\ \
# \ \ \ __ \ \ \/\ \ \ \
# \ \ \ __ /'__`\ \ \ \ \ \ \ \
# \ \ \_\ \/\ \_\ \_\ \ \_/ \_\ \
# \ \____/\ \__/ \_\\ `\___ ___/
# \/___/ \/__/\/_/ '\/__//__/
#
# sBnc user Script by LaW.
#
# Don't change anything.
# Report bugs to #GeeX on Quakenet.
# Count sbnc user
# configuration
# variables
set sbnc(trigger) "\!"
set sbnc(version) "1.1"
set sbnc(author) "LaW (#GeeX on Quakenet)"
# bindings
bind pub n $sbnc(trigger)sbnc pub:bnc
# copyright
putlog "sBnc user Script version $sbnc(version) scripted by $sbnc(author)"
# source (again DO NOT change anything if you are not 100% sure)
proc pub:bnc { nick uhost hand chan text } {
set cmd [lindex $text 0]
if {$cmd == "list"} {
set sbncuser 1
foreach nick [chanlist $chan] {
set userhost [getchanhost $nick]
if {[string match *1988* [lindex [split $userhost @] 0]]} {
incr sbncuser
}
}
putquick "PRIVMSG $chan :\0031,0\x5B\0032\002\xBB\002\0031 $bncuser \0032\002\xAB\002\0031\x5D\x5B\0032\002\xBB\002 \0031sBNC users in $chan, are powered by #GeeX \0032\002\xAB\002\0031\x5D\003"
}
if {$cmd == "check"} {
set nomodex {}
foreach user [chanlist $chan] {
set userhost [getchanhost $user]
if {[string match *myGeeX.de* [lindex [split @ $userhost] 0]] || [string match *62.75.169.132* [lindex [split @ $userhost] 0]] } {
lappend nomodex $user
}
putquick "PRIVMSG $chan :\0031,0\x5B\0032\002\xBB\002\0031 User without Mode +x \0032\002\xAB\002\0031\x5D\x5B\0032\002\xBB\002\0031 $nomodex \0032\002\xAB\002\0031\x5D\003"
}
}
}