napa182 commented on a Page, Beer script  -  Nov 01, 2010

instead of filling up ur var list maybe go with hash an as well a flood pro and go with address instead of nick
just a fast ex:

on $*:text:/^!(\w+)?\s?(\S+)?$/iS:#:{
  if (!$($+(%,f,$wildsite),2)) { inc -u10 $+(%,f,$wildsite) 
    if ($regml(1) = reg) {
      if (!$hget(drink,$+(reg,$wildsite))) {
        hadd -m drink $+(reg,$wildsite) yes
        msg # Thank you $nick $+ , you're now registered in my database.
      }
      else { msg # Sorry $nick $+ , you're already registered }
    }
    elseif ($regml(1) = unreg) { 
      if ($hget(drink,$+(reg,$wildsite))) {
        hdel drink $+(reg,$wildsite)
        hdel drink $+(c,$wildsite)
        msg # Thank you $nick $+ , you're now unregistered.
      }
      else { msg # Sorry $nick $+ , you're not registered. }
    }
    elseif ($regml(1) = drink) {
      if ($hget(drink,$+(reg,$wildsite))) {
        hinc -m drink $+(c,$wildsite) 1
        describe # slides $nick a pint
        msg # Happy $nick $+ ? You got your pint, I'll add that to your tab.
      }
      else { msg # Please register by typing !reg.... }
    }
    elseif ($regml(1) = stats) {
      if (!$regml(2)) {
        if ($hget(drink,$+(reg,$wildsite))) {
          msg # $nick $+ : $iif($hget(drink,$+(c,$wildsite)),$v1,0) drink(s).
        }
        else { msg # Please Register $nick $+ . }
      }
      elseif ($hget(drink,$+(reg,$address($regml(2),2)))) {
        msg # $nick $+ : $iif($hget(drink,$+(c,$address($regml(2),2))),$v1,0) drink(s).
      }
      else { msg # Sorry But $regml(2) is not registered $+ . }
    }
  }
}
alias -l savedrink { .hsave drink $qt($scriptdirdrink.hsh) }
alias -l loaddrink { if (!$hget(drink)) { .hmake drink 100 | .hload drink $qt($scriptdirdrink.hsh) } } 
on *:disconnect:$savedrink 
on *:exit:$savedrink
on *:start:$loaddrink
on *:load:$loaddrink
on *:connect:$loaddrink
 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.