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.

Nickname format detection

Old posts that have not been replied to for several years.
Locked
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Nickname format detection

Post by Gothic-Angel »

Im wondering if anyone has wrote a script for nick name detection, not swear words or anything like that a format of a nick, like for instace we get these drones that the format of the nick is as of follows


silvia22f
nancy19f
cindy20f
marylin21f

all female names followed by age,sex.

Id prefer to just ban this format.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

regexp {.*[0-9]{2}f} $nick
Elen sila lúmenn' omentielvo
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Post by Gothic-Angel »

How do I use that?? just throw it into an onjoin proc and have a if regexp {.*[0-9]{2}f} $nick == 1 blah blah blah??
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

yup :)
Elen sila lúmenn' omentielvo
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Post by Gothic-Angel »

Code: Select all

bind join - * spam:drone
set kickmsg "Infected inactive spamdrone"

proc spam:drone {nick uhost hand chan} {
global kickmsg
regexp {.*[0-9]{2}f} $nick == 0 { return }
set hostmask "*!*[string range $uhost [string first "@" $uhost] end]"
newchanban $chan $hostmask 30 $kickmsg
}

Seems to be banning everyone, im not sure about the hostmask line I got that out of a tcl my friend made for me a while back.

Anyone who joins gets banned with the kickmsg
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Looks like you forgot the "if" part:

if {[regexp {.*[0-9]{2}f} $nick] == 0} { return }
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Post by Gothic-Angel »

[10:29] Tcl error [spam:drone]: syntax error in expression "regexp": variable references require preceding $

Code: Select all

bind join - * spam:drone
set kickmsg "Infected inactive spamdrone"

proc spam:drone {nick uhost hand chan} {
global kickmsg
if regexp {.*[0-9]{2}f} $nick == 1
newchanban $chan $uhost 30 $kickmsg
}
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

I suggest READING stdragon's post (it might provide a clue or two as to how it should be done.)
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Post by Gothic-Angel »

aye that I did, I didnt notice he changed the structer of the line. Just woke up :-)


works alright now thanks
Locked