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.

script request!

Old posts that have not been replied to for several years.
Locked
B
Breno
Voice
Posts: 9
Joined: Thu Apr 14, 2005 3:34 pm

script request!

Post by Breno »

how does to ban automatically anybody what join with the identd with a letter and 2 or more varied numbers? ~a355, ~x12, ~y3343, ~o9293...
User avatar
avilon
Halfop
Posts: 64
Joined: Tue Jul 13, 2004 6:58 am
Location: Germany

Post by avilon »

Code: Select all

bind join -|- * badident

proc badident {nick host hand chan} {
	if {[regexp -- {~[a-z]{1}\d{1,6}$} [lindex [split $host @] 0]]} {
		newchanban $chan *![lindex [split $host @] 0]@* $::botnick "bad ident"
	}
}
Last edited by avilon on Fri Nov 11, 2005 8:08 am, edited 2 times in total.
B
Breno
Voice
Posts: 9
Joined: Thu Apr 14, 2005 3:34 pm

Post by Breno »

how would it be to ban host? ex:

* Joins: q390 (~p2544@200.168.38.160)
* botnick sets mode: +b *!*@200.168.38.160
* q390 was kicked by SuckMyDick (Banned: bad ident!)
User avatar
avilon
Halfop
Posts: 64
Joined: Tue Jul 13, 2004 6:58 am
Location: Germany

Post by avilon »

change

Code: Select all

newchanban $chan *![lindex [split $host @] 0]@* $::botnick "bad ident"
to

Code: Select all

newchanban $chan *!*@[lindex [split $host @] 1] $::botnick "bad ident"
B
Breno
Voice
Posts: 9
Joined: Thu Apr 14, 2005 3:34 pm

Post by Breno »

how do I do for display in DCC the #channel, nick and host of user banned?
ex:
<botnick> [20:06] -> BadIdent detected in #Channel, Nick: blahh Host: *!*~a1343@919.911.919
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I suggest opening TCL-Commands.doc and search for "putlog".
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
B
Breno
Voice
Posts: 9
Joined: Thu Apr 14, 2005 3:34 pm

Post by Breno »

<botnick> [21:34] *** bad ident in: #testchan, nick/host: testnick` ~x4@eave.that.nigga.be

** how does to ban automatically anybody what join with the identd with a letter and 2 or more varied numbers? ~a355, ~x12, ~y3343, ~o9293... **

No ban 1 number.
nick/host: a3425 ~x4@200-161-24-18.dsl.telesp.net.br

:/

tks avilon and De Kus.. :)
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Here use this:

Code: Select all

bind join - "*" badident

proc badident {nick host hand chan} {
   if {![isbotnick $nick] && [botisop $chan] && [string equal "~" [string index [lindex [split $uhost @] 0] 0]]} {
    if {[regexp {^[a-z]{1}[0-9]{2,4}$} [lindex [split $host @] 0]]} {
      newchanban $chan *!*@[lindex [split $host @] 1] $::botnick "bad ident"
      }
   }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
B
Breno
Voice
Posts: 9
Joined: Thu Apr 14, 2005 3:34 pm

Post by Breno »

<botnick> [14:38] Tcl error [badident]: can't read "uhost": no such variable
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

change $uhost to $host.
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

I've some enquires about the coding.

1) Does it ban ONLY IP address? I mean, only those hostmask with number (etc, 100.100.100.10) and not the address (etc, abc.eggdrop120.222.com).

2) Can it be used for more then a letter and 2 varied numbers? (etc, axn65z6xn)

Thanks.
+ Stealth Box +
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

1) No, it bans any ip.

2) No, you'll need to code another regexp.
Locked