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 2That 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 see on what date it is.
}
else msg $nick 2You aren't a Hop/Op on #sow.
}
---------------------------------------------------------
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 9,1The event for8,1 $date 9,1is8,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 9,1The event for8,1 $2 9,1is8,1 $readini(event.ini ,$2,Event)
}
}
}