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.

Almost a good script --> Badnick

Old posts that have not been replied to for several years.
Locked
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

Almost a good script --> Badnick

Post by Mackenzie »

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]
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Re: Almost a good script --> Badnick

Post by arcane »

Mackenzie wrote:

Code: Select all

## Badnick scans
set badnicks {
 "****"
 "*****"


}
perhaps you should add some nicks here ^^ :D
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

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
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

Post by Mackenzie »

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 :cry:
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 :cry:
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

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
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

Post by Mackenzie »

Papillon....

that works PERFECT :lol:

manny tnx again for your help

that's what i call a little effective badnick.tcl
tnx mate :wink:
Locked