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.

spam bots nicks

Old posts that have not been replied to for several years.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

caesar wrote:If I where you I'd make it return "1" for a match and return "0" no match, and inside the proc to check the nick: if {[isSpamNick $nick]} { # is a match so ban or whatever }

Also, isn't a regexp fatser than that loop? Use break to stop a loop not return :P with something like this:

Code: Select all

proc isSpamNick {nick} { 
  global names 
  set blah 0
  foreach {x} $names { 
    if {[string match -nocase *${x}* $nick]} { 
      set blah 1 ; break
    } 
  } 
  return "$blah"
}
can i ask what exact advantage breaking a loop has, in this case cause where not working with I/O, so eof can't error when you do.. just wondering..
XplaiN but think of me as stupid
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

"I found a drone, ban it!" What's the point on continuing the loop till the end of the list? It breakes the loop and continues normaly with the proc when a match was found, or dose it need to make more than I match? :shock:
Once the game is over, the king and the pawn go back in the same box.
Locked