on *:TEXT:@register*:#findclan-cod2: {
if (!$hget(players,$nick)) {
if ($2) {
hadd -u604800 players $nick $2
msg $chan Added $nick to $upper($2) database for 7 days.
}
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 (($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
}
ON *:TEXT:@detail*:#findclan-cod2: {
if (!$2) {
msg $chan Please specify a name from the @status list
}
if ($2) {
msg $chan $hget(details,$2).item $+ : $hget(details,$2).data
}
}
ON *:TEXT:@mydetail*:#findclan-cod2: {
if (!$hget(players,$nick)) {
hadd details $nick $2-
msg $chan Your details has been set to: $2-
}
else { msg $chan Your nick does not exist in the database! }
}
}