I need some help with this code:
Code: Select all
proc pub:ban {hand chan args x mix} {
global botnick owner
set whom [lindex $args 0]
set time [lindex $args 1]
set reason [lrange $args 2 end]
set option none
set add ""
if { $whom == ""} { a:usage $x ban ; return "FAILED: not all parameters specified"}
if {![botisop $chan]} { a:tell $x 96 $chan; return "FAILED: opless"}
if { [string map {* {} . {} ! {} @ {} ? {}} $whom] == ""} {a:tell $x 190; return "FAILED: mass ban caution"}
if {![a:level $x $chan $whom [nick2hand $whom] [a:translate $hand $chan 222 ban]]} { return "FAILED: target access is higher" }
if {![onchan $whom $chan]} { set theban $whom; a:tell $x 95} else { set theban "*!*[string range [getchanhost $whom $chan] [string first @ [getchanhost $whom $chan]] end]" }
if {![a:check -digit $time]} { set time "[channel get $chan ban-time]m"; set reason "[lrange $args 1 end]"}
if { [string equal [lindex $reason 0] sticky] } { set option sticky; set add "\[sticky\] "; set reason [lrange $reason 1 end]}
if { $reason == ""} { set reason "No reason supplied" }
if { [string equal [lindex $reason 0] global] && [check:n:gl $hand]} {
if {![llength [lrange $reason 1 end]]} { set reason "global No reason supplied" }
set reason [join [a:translate $hand $chan 111 "$hand/\002[lindex $x 0]\002 $time ${add}\[globally\] [lrange $reason 1 end]"]]
newban $theban $hand $reason $time $option; return "global_$whom for $time, $reason" } else {
set reason [join [a:translate $hand $chan 111 "$hand/\002[lindex $x 0]\002 $time ${add}$reason"]]
newchanban $chan $theban $hand $reason $time $option ; return "$whom $reason"
}
}
Problem is, if that user is reconnecting, he will have another obfuscate ip, so if u ban him with eggdrop is useless, he quit, join again and have another obfuscate ip.
But if u are IRC Operator, u can see real ip if u do double whois on that user. I can make my eggdrop IRC Operator, but i cant make him to ban the real ip. I make some test with some whois tcl who use "RAW 311" and he return the real ip, so it can be done.
I tried to implement something with "raw 311", but without succes. I dont have enough knowledge to do this.
I guess i need to change this code:
Code: Select all
{ set theban "*!*[string range [getchanhost $whom $chan] [string first @ [getchanhost $whom $chan]] end]" }
Thanks.