on *:TEXT:!*:*: {
if ($nick isop $chan) {
if ($1 == !add) {
set %temp_commands [ %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] ]
unset %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ]
set %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] [ %temp_commands ] $2
unset %temp_commands
set %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ] $3-
/notice $nick Command added successfully.
}
if ($1 == !append) {
if (%command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ]) {
set %temp_command [ %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ] ]
unset %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ]
set %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ] [ %temp_command ] $3-
unset %temp_command
/notice $nick Command appended successfully.
}
else {
.notice $nick Cannot append $2 $+ . $2 doesn't exist!
}
}
if ($1 == !del) {
if (%command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ]) {
set %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] ] $remove(%commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] ],$2)
unset %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ]
.notice $nick Command deleted successfully.
}
else { .notice $nick Can't remove $2 $+ . $2 doesn't exist! }
}
if ($1 == !list) {
notice $nick %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] ]
}
}
if ($1 isin %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ]) {
/notice $nick %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $1 ] ]
}
}