This is a script designed to allow you to add any commands to your bot from any channel, it is formatted at the moment to allow anyone to add scripts. But you can of course alter it for auser, or for $nick, or isop..etc.
Syntax: !cmd add will default to a file named after the channel it was created in IE: C:\FOLDER#test.mrc
!cmd new where $3 is the name of the file to be created. IE: !cmd new test, will create the file C:\FOLDER\test.mrc
!cmd del will delete from the default file, where !cmd dnew will require $3 input, then the deletion of the target command.
C:\FOLDER\ where folder is a folder of your choosing.
NOTE: I cant get the del commands to function, input needed.
Script made with the help of GrimReaper.
on *:TEXT:!cmd *:#: {
if ($2 == add) {
write C:\FOLDER\ $+ $chan $+ .mrc $3-
msg $chan Adding ' $+ $3- $+ '
timer 1 4 load -rs C:\FOLDER\ $+ $chan $+ .mrc
timer 1 4 msg #BOTCHANNEL $nick added a command to me in $chan $+ .
}
elseif ($2 == new) {
write C:\FOLDER\ $+ $3 $+ .mrc $4-
msg $chan Adding ' $+ $4- $+ '
timer 1 4 load -rs C:\FOLDER\ $+ $3 $+ .mrc
timer 1 4 msg #BOTCHANNEL $nick added a command to me in $chan $+ .
}
elseif ($2 == del) {
write -dw* $+ : $+ $replace($3-,$chr(32),?) $+ : $+ * C:\FOLDER\ $+ $chan $+ .mrc
load -rs C:\FOLDER\ $+ $chan $+ .mrc
msg $chan Deleting command...
timer 1 2 load -rs C:\FOLDER\ $+ $chan $+ .mrc
timer 1 2 msg #BOTCHANNEL $nick deleted a command in $chan $+ .
}
elseif ($2 == dnew) {
write -dw* $+ : $+ $replace($4-,$chr(32),?) $+ : $+ * C:\FOLDER\ $+ $3 $+ .mrc
load -rs C:\FOLDER\ $+ $3 $+ .mrc
msg $chan Deleting command...
timer 1 2 load -rs C:\FOLDER\ $+ $3 $+ .mrc
timer 1 2 msg #BOTCHANNEL $nick deleted a command in $chan $+ .
}
}