on *:TEXT:!setpcw*:#: { if ($nick isop $chan || $nick ishop $chan) { .hadd -m PCW $+($chan,Current) $2 .msg $chan The current PCW has been set to $2 by $nick $+ ! } } on *:TEXT:!pcw:#: { if ($hget(PCW,$+($chan,Current)) != $chr(32)) { /notice $nick $+ The current PCW for $chan is $+ $hget(PCW,$+($chan,Current)) } } on *:TEXT:!suggest*:#: { .hadd -m PCW $+($chan,Suggested) $2 .hadd -m PCW $+($chan,Suggestedby) $nick .msg $chan $+ $nick Has suggested $+ $2 .hinc -m PCW $+($chan,$nick,Sug) } on *:TEXT:!setsuggest*:#: { if ($nick isop $chan || $nick ishop $chan || $address($nick,4) isin $hget(PCW,$+($chan,Allowed))) { .hadd -m PCW $+($chan,Current) $hget(PCW,$+($chan,Suggested)) .msg $chan The current PCW has been set to $hget(PCW,$+($chan,Suggested)) by $nick $+ ! .hinc -m PCW $+($chan,$hget(PCW,$+($chan,Suggestedby)),Good) } } on *:TEXT:!pcwstats:#: { /notice $nick You have $+ $calc($hget(PCW,$+($chan,$nick,Sug)) + 0) $+ Scouts! and $+ $calc($hget(PCW,$+($chan,$nick,Good)) + 0) $+ of them were set by an op/hop! } on *:TEXT:!pcwallow*:#: { if ($nick isop $chan || $nick ishop $chan) { if ($address($2,4) isin $hget(PCW,$+($chan,Allowed))) { .notice $nick $+ $2 was found in the PCW allow list already! halt } .hadd -m PCW $+($chan,Allowed) $hget(PCW,$+($chan,Allowed)) $address($2,4) .notice $nick $+ $2 ( $+ $address($nick,4) $+ ) was added to the allow list for setting the PCW type !pcwremove $2 to undo this } } on *:TEXT:!pcwremove*:#: { if ($nick isop $chan || $nick ishop $chan) { if ($address($2,4) isin $hget(PCW,$+($chan,Allowed))) { .hadd -m PCW $+($chan,Allowed) $remove($hget(PCW,$+($chan,Allowed)),$address($2,4)) .notice $nick $+ $2 ( $+ $address($nick,4) $+ ) was removed from the the allow list for setting the PCW type !pcwallow $2 to undo this } else { .notice $nick $+ $2 was NOT found in the PCW allow list! halt } } }