Can anybody change this script, scan user upon join if their ports are open using the proxy and voicing only those whose ports are close. When the bot finds out that the port is open, it will notice the user. This is the original script:
#preference.
###################################
variable banport "1080,1081,3380,3381" ;# Enter most common port list
variable backchan "#enter backchannel"
### Having E handle will make the bot to ignore that person.
variable handle "E"
###################################
# Do not edit below
###################################
###################################
# Join bind
###################################
proc scan_join {nick host hand chan} {
variable banport; variable handle
if {[matchattr $hand $handle|$handle $chan]} {return}
set hostname [lindex [split $host \x40] end]
foreach {x} [split $banport \x2c] {
if {![catch {socket -async $hostname $x} s]} {
fileevent $s writable [list [namespace current]::check_sock $s $host $chan
$nick]
}
}
}
###################################
# fileevent callback
###################################
proc check_sock {s host chan nick} {
variable backchan
if {[string equal {} [fconfigure $s -error]]} {
putserv "NOTICE $backchan :$nick is using proxies.\($host\)"
close $s
} else {
pushmode $chan +v $nick
}
}
bind join - * [namespace current]::scan_join
###############################END##############
This is the effect of the script:
* Ergoth has joined #samplechan
-DoomsDay:#samplechan- Ergoth is using proxies.(~ergoth@221.209.18.1)
-DoomsDay:#samplechan- Ergoth is using proxies.(~ergoth@221.209.18.1)l
-DoomsDay:#samplechan- Ergoth is using proxies.(~ergoth@221.209.18.1)
-DoomsDay:#samplechan- Ergoth is using proxies.(~ergoth@221.209.18.1)
-DoomsDay:#samplechan- Ergoth is using proxies.(~ergoth@221.209.18.1)
It doesnt stop noticing the channel. Could anybody help me with this please...Thank you.