New on event - 03/06/03 04:13 PM
I don't know if this has ever been suggested before, but I think there should be a on COMMAND event along with identifiers to check command and alias output. This event would be very useful checking command errors or just to see if a command was successful.
Format: on <level>:COMMAND:<command name>:<commands>
* Examples
Let's say I did this:
/remove
I would get an insufficient parameters error.
Let's say I did:
/remove temp.txt
I would then get:
-
* Removed 'C:\PROGRAM FILES\MIRC\temp.txt'
-
So here's the event example:
on ^*:COMMAND:remove:{
if ($cmsg == insufficient parameters) {
echo -a * Remove Error
haltdef
}
elseif (* Removed ' $+ $1 $+ ' isin $cmsg) {
echo -a * $1 was successfully removed!
haltdef
}
}
Notes:
The $1 identifier used in my example returns the specified file you specified to remove using the /remove command.
The $cmsg identifer holds the command's output info.
Format: on <level>:COMMAND:<command name>:<commands>
* Examples
Let's say I did this:
/remove
I would get an insufficient parameters error.
Let's say I did:
/remove temp.txt
I would then get:
-
* Removed 'C:\PROGRAM FILES\MIRC\temp.txt'
-
So here's the event example:
on ^*:COMMAND:remove:{
if ($cmsg == insufficient parameters) {
echo -a * Remove Error
haltdef
}
elseif (* Removed ' $+ $1 $+ ' isin $cmsg) {
echo -a * $1 was successfully removed!
haltdef
}
}
Notes:
The $1 identifier used in my example returns the specified file you specified to remove using the /remove command.
The $cmsg identifer holds the command's output info.