All pastes #482345 Raw Edit

!@Event

public text v1 · immutable
·published 2007-05-11 06:51 UTC
rendered paste body
?On $*:TEXT:/^[!@]event (help)/Si:#: { ?set %event.disp $iif($left($1,1) == @, msg $chan, notice $nick) ?if (%event.off [ $+ [ $chan ] ] == off) { %event.disp [Event Settings] Event controls turned off, please have an op turn back on with !event on | { halt } } ??if ($2- == help) { ?%event.disp [Event Help] The following Event commands are !event view (displays the your channels events) !event add <event info> !event del ?.timer5000 1 3 %event.disp !event on/off (turns off event script for all but channel ops) !event halfop on/off (Enables/disables halfops and higher to see events) !event voice on/off (Enables/disables voices and higher to see events) !event all on/off (Enables/disables all users to view the events) } } ??On $*:TEXT:/^[!@]event (add|view|del|recover)/Si:#: { ?set %event.disp $iif($left($1,1) == @, msg $chan, notice $nick) ?if (%event.off [ $+ [ $chan ] ] == off) { %event.disp [Event Settings] Event controls turned off, please have an op turn back on with !event on | { halt } } ?if ($2 == add) { ?if (!$3) { %event.disp [Event Adder] You must specify an event name and info ex: !addevent Pk trip tomorrow at 5pm east. meet in world 100 fally | { halt } } ?else { ?set %event.event [ $+ [ $chan ] ] $3- ~set by: $nick ~ at $time ~ $date ~ | %event.disp [Event Adder] The event was added. } } ??if ($2 == view) { ?if (%event.halfon [ $+ [ $chan ] ] == on) { if (($nick isop $chan) || ($nick ishop $chan)) { %event.disp [Event View] The current event for # is: %event.event [ $+ [ $chan ] ] } ?else { %event.disp You must be halfop or higher to view the event, or your channel ops did not set the access requirement to view events. } } ??if (%event.voiceon [ $+ [ $chan ] ] == on) { if (($nick isop $chan) || ($nick ishop $chan)) || ($nick isvoice $chan) { %event.disp [Event View] The current event for # is: %event.event [ $+ [ $chan ] ] } ?else { %event.disp You must be voice or higher to view the event, or your channel ops did not set the access requirement to view events. } } ??if (%event.regon [ $+ [ $chan ] ] == on) { %event.disp [Event View] The current event for # is: %event.event [ $+ [ $chan ] ] } } ??if ($2 == del) { %event.disp [Event Delete] Warning, you are deleting the current event, type !event recover in the next 10 seconds to stop the deletion. If you are satisified with deleting the current event please wait 10 seconds before making a new event. | timerdelevent 1 10 unset %event.event } ??if ($2 == recover) { /timerdelevent halt | %event.disp [Event Recover] If you typed this within 10 seconds of deleting your event you should now have recovered it. } } ?on $*:Text:/^[!@]event (halfop|voice|all|on|off)/Si:#: { ?set %event.disp $iif($left($1,1) == @, msg $chan, notice $nick) ?if (%event.off [ $+ [ $chan ] ] == off) { %event.disp [Event Settings] Event controls turned off, please have an op turn back on with !event on | { halt } } ?if ($2- == halfop on) { ?if ($nick isop $chan) { set %event.halfon [ $+ [ $chan ] ] on | unset %event.voiceon [ $+ [ $chan ] ] on | unset %event.regon [ $+ [ $chan ] ] on | %event.disp [Event Settings] You have enabled half-ops to see the event for this chan. } } ??if ($2- == voice on) { ?if ($nick isop $chan) { set %event.voiceon [ $+ [ $chan ] ] on | unset %event.halfon [ $+ [ $chan ] ] on | unset %event.regon [ $+ [ $chan ] ] on | %event.disp [Event Settings] You have enabled voices to see the event for this chan. } } ??if ($2- == all on) { ?if ($nick isop $chan) { set %event.regon [ $+ [ $chan ] ] on | unset %event.halfon [ $+ [ $chan ] ] on | unset %event.voiceon [ $+ [ $chan ] ] on | %event.disp [Event Settings] You have enabled all users to see the event for this chan. } } ??if ($2- == halfop off) { ?if ($nick isop $chan) { unset %event.halfon [ $+ [ $chan ] ] on | unset %event.voiceon [ $+ [ $chan ] ] on | unset %event.regon [ $+ [ $chan ] ] on | %event.disp [Event Settings] You have disabled all users but ops to see the event for this chan. } } ??if ($2- == voice off) { ?if ($nick isop $chan) { unset %event.voiceon [ $+ [ $chan ] ] on | unset %event.halfon [ $+ [ $chan ] ] on | unset %event.regon [ $+ [ $chan ] ] on | %event.disp [Event Settings] You have disabled all users but ops to see the event for this chan. } } ??if ($2- == all off) { ?if ($nick isop $chan) { unset %event.regon [ $+ [ $chan ] ] on | unset %event.halfon [ $+ [ $chan ] ] on | unset %event.voiceon [ $+ [ $chan ] ] on | %event.disp [Event Settings] You have disabled all users but ops to see the event for this chan. } } ??if ($2- == off) { ?if ($nick isop $chan) { set %event.off [ $+ [ $chan ] ] off | %event.disp [Event Settings] You have disabled the event features for # . } } ??if ($2- == on) { ?if ($nick isop $chan) { unset %event.off [ $+ [ $chan ] ] off | %event.disp [Event Settings] You have enabled the event features for # . } } }