Firstmate commented on a Page, Badwords detection engine  -  Oct 15, 2011

A couple of things, the major being removing all these global variables.

You can do that with something like:

on *:TEXT:*:#: { 
  badword $1-
}

And later use it as such in the alias like:

alias badword {
;Looks how many lines is in your text file
  var %lines $lines(badwords.txt)
  var %s 1
  while ( %s <= %lines ) {
    if ($read(badwords.txt, %s ) isin $1-) {
    ;....continue code

What I'm really trying to suggest is your usage of global versus local variables (/set versus /var).

Hope that helps!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.