Please use that code tags! This makes it much easier to comprehend...
Concerning syntax and brackets, every now and then there is a discussion about bracket use and misuse (most recent example) - there's much room for "personal taste of style".
For example, I'm prefering the most univocal bracket style:
Code:
on *:nick:{
  var %i = $numtok($badnick,32)
  while (%i) {
    if ($+(*,$gettok($badnick,%i,32),*) iswm $newnick) { hinc -m badnick $newnick }
    dec %i
  }
  if ($hget(badnick,$nick)) { hdel badnick $nick }
  var %h = $hget(badnick,%n) ,%cmd = $iif((%h == 1),msg x kick,$iif((%h == 2),ban -k))
  if ((%cmd) && ($me isop #sigbin) && ($newnick !isop $v2)) { %cmd $v2 $newnick $iif((%h == 2),2) Badnick ! }
  if (%h == 2) { hdel badnick $newnick }
}

On the other hand side, people will take snippets etc they see here as an example for their own scripts, thus the syntax should be as exemplary as possible (we all will slip up every once a while whistle ).

For example:
"var %varname plaintext-data" ...will work.
"var %varname $identifier" ...will not work in all circumstances.
"var %varname = plaintextdata or $identifier" ...will work. Therefore it is a good idea - from my point of view - to use always that syntax smile


Last edited by Horstl; 16/08/07 06:12 AM.