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.

Recommend script/module for symbols and d00dly caps in nicks

Old posts that have not been replied to for several years.
Locked
J
Jkay

Recommend script/module for symbols and d00dly caps in nicks

Post by Jkay »

Hi,

Our present, custom-coded, bot auto-kicks for 2 minutes people coming in with k-rad symbols and d00dly caps peppered all over their nicks.

Can someone recommend a module or script for eggdrop which does or can be changed to do this please.

thanks.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I havn't ever heard of one.

However, it shouldn't be hard to do.

However, again, to help more, we would need to know more information about k-rad sybols.
J
Jkay

Post by Jkay »

lol .. ok, k-rad is an old d00d term, like "eXtreme" is now. I guess I've been on IRC too long.

Symbols are } and | and ^ used like this:

^^^u1tr4|batm4n^^^

a person coming on channel with this nick would receive a 2 minute ban for use of studly caps or symbols in nick.
J
Jkay

Post by Jkay »

I found a script called "badnick.tcl" which handles sub-strings in nicks, so I changed it a little to catch | \ / ^ ( ) [ ] { and } as well ..

I still need advice about catching StUdLy CaPs nicks tho .. how would you recognize that ?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

How do you mean studly?

If you mean, 1 UPPER, 1 lower, 1 UPPER, 1 lower, then the following match code should work.

The nickname other the person you are testing, should be contained in the $nick variable

Code: Select all

set U 0
set Z 0
set I 0
foreach c [split $nick {}] {
  if {![string match {[A-Za-z]}]} { continue }
  if {!$i} { if {[string is upper $c]} { set U 1; set Z 1; continue }
  set i 1
  if {$U} {
    if {[string is lower $c]} { continue }
  } else {
    if {![string is lower $c]} { continue }
  }
  set Z 0
  break
}
This is far from perfect, and only 1 double single case will get around it (EG PpSlIm will be matched, while PpSliM will get around it).

After this code it done, if $Z is equal to 1, then they are using being matched as above, if set to 0, then they are home free.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

ppslim wrote:

Code: Select all

set I 0
This should be:

Code: Select all

set i 0
(or the other lines with set i 1 should be set I 1 and lines with $i would be $I , your choice..) .. Variable names in TCL are case sensitive.
Locked