All pastes #416639 Raw Edit

Unnamed

public text v1 · immutable
#416639 ·published 2007-03-30 11:09 UTC
rendered paste body
##############
# Events.mrc #
##############

on *:TEXT:!setevent*:?:{ 
  if (!$2) { notice $nick You have to fill in an event nub. }
  elseif ($nick ishop #sow) || ($nick isop #sow) { 
    if ($2 < $date) { msg $nick 9,1That date is out of time  }
    else {
      writeini  event.ini $2 Event $3-  
      write eventdates.txt $2
      msg #sow 9,1There has been added an event by8,1 $nick $+ 9,1. To view event type 8,1!event $2 9,1 to get information about the event.
    }  
    else msg $nick 9,1You aren't a Hop/Op on8,1 #sow.
  }

###############
# Events2.mrc #
###############

ON $*:TEXT:/^[!@.]event/Si:#sow:{
  if ($nick isreg #sow) { 
    notice $nick 9,1You are not permitted to use this command.
  }
  else {
    VAR %output = $iif($Left($1,1) == @,msg $chan,.notice $nick)
    if ($2 == date) {
      VAR %j = 1
      WHILE (%j <= $Lines(eventdates.txt)) {
        VAR %name = $AddTok(%name,$GetTok($Read(eventdates.txt,%j),1,32),32)
        INC %j
      }
      IF (%name) %output 9,1There are events on:8,1 $Replace(%name,$Chr(32), $Chr(44) $Chr(32)) 9,1(Type8,1 !event dd/mm/yyyy9,1 to know more about the events) 
      ELSE %output 9,1There are no events!
    }
    elseif (!$2) { 
      if ($readini(event.ini ,$date,Event) == $null) { %output 9,1There are no events set for8,1 $date 9,1. Please use8,1 !event date9,1 to see on what dates there are events.
      }
      else %output 8,1The event for9,1 $date 8,1is9,1 $readini(event.ini ,$date,Event) 
    } 
    else {
      if ($readini(event.ini ,$2,Event) == $null) { %output 9,1There are no events for8,1 $2 9,1. Please use8,1 !event date9,1 to see on what dates there are events.
      }
      else %output 8,1The event for9,1 $2 8,1is9,1 $readini(event.ini ,$2,Event)
    } 
  }
} 

###############
# Events3.mrc #
###############

on *:TEXT:!clear events:?:{
  if ($nick ishop #sow) || ($nick isop #sow) { 
    /remove event.ini
    /remove eventdates.txt
  msg $nick 9,1The files are deleted. }
  else { msg $nick 9,1You aren't a Hop/Op on8,1 #sow. }
}
}

###############
# Events4.mrc #
###############

on *:TEXT:!remember:?:{
  if ($nick ishop #sow) || ($nick isop #sow) {
    msg #sow 9,1Don't forget to check the events on FORUM and in chat! Typ8,1 !event date9,1 for more info.
    else { msg $nick 9,1You aren't a Hop/Op on8,1 #sow. }
  }