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.
Old posts that have not been replied to for several years.
Mackenzie
Voice
Posts: 36 Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:
Post
by Mackenzie » Fri Mar 21, 2003 10:02 am
Code: Select all
## -----------------------------------------------------------------------
## Change Badnick.TCL ver 1.0
## -----------------------------------------------------------------------
## Badnick scans
set badnicks {
"[censored]"
"[censored]*"
}
## ----------------------------------------------------------------
## --- Don't change anything below here if you don't know how ! ---
## ----------------------------------------------------------------
set arg.v "Change Badnick protection"
bind nick - * Detected_changebad
proc Detected_changebad {nick uhost hand chan newnick} {
global badnicks botnick
if {(![matchattr $hand b]) && ($nick != $botnick)} {
foreach badchange [string tolower $badnicks] {
if {[string match *$badchange* [string tolower $newnick]]} {
set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
putserv "MODE $chan +b $newnick"
putserv "KICK $chan $newnick :Ongepaste nick !!!"
return 0
}
}
}
}
## -----------------------------------------------------------------------
putlog "-=-= PROTECTION PROSES =-=-=-=-=-"
putlog "Protections change badnick Ver 1.0:"
putlog "${arg.v} loaded Successfuly..."
##------------------------------------------------------------------------
## *** E N D OF ChangeBadnick1.0.TCL ***
## -----------------------------------------------------------------------
this script works fine on a nick change...
but when somebody joins with a badnick it does nothing...
what code must be entered here to act also on a badnick join?
and ban the used badnick?
[/code]
arcane
Master
Posts: 280 Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:
Post
by arcane » Fri Mar 21, 2003 10:38 am
Mackenzie wrote: Code: Select all
## Badnick scans
set badnicks {
"****"
"*****"
}
perhaps you should add some nicks here ^^
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Fri Mar 21, 2003 10:51 am
tip: read the tcl-commands.doc about binds
JOIN (stackable)
bind join <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel>
Description: triggered by someone joining the channel. The mask in
the bind is matched against "#channel nick!user@host" and can
contain wildcards.
Module: irc
Elen sila lúmenn' omentielvo
Mackenzie
Voice
Posts: 36 Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:
Post
by Mackenzie » Fri Mar 21, 2003 11:52 am
Papillon wrote: tip: read the tcl-commands.doc about binds
JOIN (stackable)
bind join <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel>
Description: triggered by someone joining the channel. The mask in
the bind is matched against "#channel nick!user@host" and can
contain wildcards.
Module: irc
tha'ts all sounds like Chinese
I was lookin' these the tcl commands from eggdrop1.6.13...but i don't know how to start
is there no possibility to put a code also at the above nickchange.tcl then?
and with that code who reconise and react on join with the same badnicklist?
i know i'm stupid in tcl writing
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Fri Mar 21, 2003 1:03 pm
Code: Select all
bind nick - * Detected_changebad
bind join - * Detected_changebad
proc Detected_changebad {nick uhost hand chan {newnick ""}} {
global badnicks botnick
if {$newnick == ""} { set newnick $nick }
if {(![matchattr $hand b]) && ($nick != $botnick)} {
foreach badchange [string tolower $badnicks] {
if {[string match *$badchange* [string tolower $newnick]]} {
set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
putserv "MODE $chan +b $newnick"
putserv "KICK $chan $newnick :Ongepaste nick !!!"
return 0
}
}
}
}
This should react on the "badnicks" entering the channel
Elen sila lúmenn' omentielvo
Mackenzie
Voice
Posts: 36 Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:
Post
by Mackenzie » Fri Mar 21, 2003 6:15 pm
Papillon....
that works PERFECT
manny tnx again for your help
that's what i call a little effective badnick.tcl
tnx mate