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 $+ !
.hadd -m PCW $+($chan,SetBy) Set by: $+ 12 $nick
}
}
on *:TEXT:!pcw:#: {
if ($hget(PCW,$+($chan,Current)) != $chr(32)) {
/notice $nick 1 $+ The current PCW for $chan is 12 $+ $hget(PCW,$+($chan,Current)) 1 $+ --- >> $hget(PCW,$+($chan,SetBy)) 1 $+ <<
}
}
on *:TEXT:!suggest*:#: {
.hadd -m PCW $+($chan,Suggested) $2
.hadd -m PCW $+($chan,Suggestedby) $nick
.msg $chan 1 $+ $nick Has suggested 12 $+ $2
.hinc -m PCW $+($chan,$nick,Sug)
}
on *:TEXT:!lazy*:#: {
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)
.hadd -m PCW $+($chan,SetBy) Suggested by: $+ 12 $hget(PCW,$+($chan,Suggestedby)) $+ 1 Set by: $+ 12 $nick
}
}
on *:TEXT:!scouts:#: {
/notice $nick You have 12 $+ $calc($hget(PCW,$+($chan,$nick,Sug)) + 0) 1 $+ Scouts! and 12 $+ $calc($hget(PCW,$+($chan,$nick,Good)) + 0) 1 $+ 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 1 $+ $2 was found in the PCW allow list already!
halt
}
.hadd -m PCW $+($chan,Allowed) $hget(PCW,$+($chan,Allowed)) $address($2,4)
.notice $nick 1 $+ $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 1 $+ $2 ( $+ $address($nick,4) $+ ) was removed from the the allow list for setting the PCW type !pcwallow $2 to undo this
}
else {
.notice $nick 1 $+ $2 was NOT found in the PCW allow list!
halt
}
}
}