All pastes #593098 Raw Edit

Unnamed

public text v1 · immutable
#593098 ·published 2007-06-28 03:57 UTC
rendered paste body
alias -l mchan { return #dbpc }
alias -l cchan { return #dbdb } 

on $*:TEXT:/^[!@](set(pcw?|world)|change)/Si:#dbdb: {
if (!$2) { notice $nick You must specify a world | halt }
if ($2 !isnum 2-143) { notice $nick $2 is not a valid members world, or isnt a world all together | halt }
if (!$nick($chan,$nick,oh)) { notice $nick You are not Half-Op+ | halt }
writeini pc.ini pcw world $2
writeini pc.ini pcw setnick $2
writeini pc.ini pcw settime $ctime
notice $nick World $2 has been set.
msg $mchan There is a new PCW. Type !pcw to view it.
}

on $*:TEXT:/^[!@](world|pcw)/Si:#: {
var %output = $iif($left($1,1) == @,msg $chan,notice $nick)
if (!$readini(pc.ini,pcw,world)) { notice $nick There is no world set | halt }
%output The current PCW is: $readini(pc.ini,pcw,world) $+ . This was set by: $readini(pc.ini,pcw,setnick) $duration($calc($ctime - 

$readini(pc.ini,pcw,settime))) ago.
}

on *:JOIN:#dbdb: {
if (!$nick($mchan,$nick,oh)) && ($nick !== $me) { mode $chan +b $address($nick,2) | kick $chan $nick You must be an op in $cchan to be here. | halt }
}