All pastes #31302 Raw Edit

Mine

public text v1 · immutable
#31302 ·published 2005-11-26 10:30 UTC
rendered paste body
; Find Clan Bot
; snang

on *:TEXT:@register*:#findclan-cod2: {
  if (!$hget(players,$nick)) {
    if ($2) {
      hadd -u604800 players $nick $2
      msg $chan Added $nick to $upper($2) database.
    }
    else { msg $chan Please specify a league. (@register CAL-m) }
  }
  else { msg $chan Your nickname already exists in the $upper($hget(players,$nick)) database. }
}

on *:TEXT:@status*:#findclan-cod2: {
  if ($nick isop $chan) {
    if (($2 == cal-o) || ($2 == cal-m) || ($2 == cal-i)) {
      var %x 1
      while (%x <= $hget(players,0).item) {
        if ($hget(players,%x).data == $2) {
          set %results %results $hget(players,%x).item
        }
        inc %x
      }
      msg $chan $+(,$upper($2) Players:) %results
      unset %results
    }
    if ($2 == detail) {
      msg $chan Registered Players: 
      msg $chan CAL-O: $hfind(players,cal-o,0).data
      msg $chan CAL-M: $hfind(players,cal-m,0).data
      msg $chan CAL-I: $hfind(players,cal-i,0).data
    }
    msg $chan Total Registered: $hget(players,0).item  
  }
}