All pastes #594156 Raw Edit

Miscellany

public text v1 · immutable
#594156 ·published 2007-06-28 19:46 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 3There 4is 3a 4new 3Pest 4Control 3World. 4Type 3!pcw 4or 3!world 4to 3view 4it.
}

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 3The current PCW is:4 $readini(pc.ini,pcw,world) $+ . 3This 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 }
}