All pastes #126168 Raw Edit

Untitled

public text v1 · immutable
·published 2006-08-11 06:38 UTC
rendered paste body
#pc 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 pc-world is not set
    %send The current pc-world is: %pc - Last update: $duration($calc($ctime - %pcc)) ago
  }
  else notice $nick You need voice or higher to see the pc 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 pc-world has been set as %pc
    .msg # The pc-world has changed! Type: !world to view it!
  }
}
#pc end

on *:TEXT:!pdisable:?: {
  msg $nick World notification has been disabled
  disable #pc
}
on *:TEXT:!penable:?: {
  msg $nick World notification has been enabled
  enable #pc
}

on *:DISCONNECT: {
 unset %pc*
}