All pastes #125670 Raw Edit

Something

public text v1 · immutable
·published 2006-08-10 20:33 UTC
rendered paste body
#pk off
on $*:text:/^[!@.]world/Si:#ownpc: {
  if ($nick isvoice #) || ($nick ishop #) || ($nick isop #) {
    var %send = $iif($left($1,1) == @,.msg $nick,.notice $nick)
    if (!%pc) notice $nick The pk-world is not set
    %send The current pk-world is: %pc - Last update: $duration($calc($ctime - %pcc)) ago
  }
  else notice $nick You need voice or higher to see the pk world!
}

on $*:text:/^[!@.]defineworld */Si:#ownpc: {
  if ($nick isop #) || ($nick ishop #) || ($address($nick,2) == *!*@is.a.fraud.com) {
    set %pcc $ctime
    set %pc $2
    notice $nick The new pk-world has been set as %pc
    .msg # The pk-world has changed! Type: !world to view it!
  }
}
#pk end

on *:TEXT:!pkdisable:?: {
  msg $nick World notification has been disabled
  disable #pk
}
on *:TEXT:!pkenable:?: {
  msg $nick World notification has been enabled
  enable #pk
}

on *:DISCONNECT: { 
 unset %pc*
}