This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Botlending tcl modification

Help for those learning Tcl or writing their own scripts.
Post Reply
c
costynsyem
Voice
Posts: 1
Joined: Sun Sep 06, 2015 2:26 pm

Botlending tcl modification

Post by costynsyem »

Hello :)

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"
	}
}
My eggdrop is running on a server who use obfuscate ip address for every user, something like ACJaz.IRCserver.Org.
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]" } 
Can someone help me with some ideas?

Thanks.
User avatar
Get_A_Fix
Master
Posts: 206
Joined: Sat May 07, 2005 6:11 pm
Location: New Zealand

Post by Get_A_Fix »

There is a post in the same thread you posted this in. It is trying to match the realname of a user, based on raw numerics. You may find it helpful in getting the IP, as I showed in the code here.
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
Post Reply