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.

checking bad nick on connect

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
m
milco
Voice
Posts: 1
Joined: Mon Apr 21, 2014 2:58 pm

checking bad nick on connect

Post by milco »

hi all i was looking for a tcl to check nicks on connect in a opered eggdrop
and match them with a list of badnicks possibly with regex and if there is a match to kill user rather than to have eggdrop check on channel joins
i have been looking for it for like ages it would help our bots a lot to prevent joining of bad nicks and not load it all on the ircd

im plan on using on a inspIRCD server

apreciated

thank you in advance
User avatar
Get_A_Fix
Master
Posts: 206
Joined: Sat May 07, 2005 6:11 pm
Location: New Zealand

Post by Get_A_Fix »

Depending on how your snotices are piped, it can be relatively easy. You will have to play around with this code, to suit your exact arguments, but it should help you make the script you want. Read this.

Then, you'll want to use a list, like

Code: Select all

set badnicks {
  "*thisnick*"
  "*badnick*"
  "*keep*"
  "*adding*"
  "*withthe*"
  "*wildcards*"
}
Then, in the codeblock/proc, you'd want something like

Code: Select all

foreach checknick $::badnicks {
  if {[string match -nocase $checknick $nick]} {
    putquick "KILL $nick :You match a Bad Nickname. This is not Permitted on $::network. Please change your nickname to reconnect. (matching: $checknick)"
  }
}
Hope it works out.
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