on *:INPUT and /. /! /!. commands - 04/09/07 07:44 AM
This is my first on input event, still under construction. I have /say, /me, /msg and /describe aliases which change how text I send is echoed back to me. I want /.command, //command and //.command instances of mIRC commands I've aliased to act just like the mIRC command, ie /.msg will send a message quietly etc. The only method I can think of right now is adding /.msg, /.say, //msg, //.msg, ...aliases which would suck, and I'm not sure if that's doable either. Any help is greatly appreciated!
Code:
on *:INPUT:*: { if (%os.input == on) { haltdef if ($ctrlenter) goto blah if ($left($1,1) == $chr(47)) { if ($mid($1,2,1) == $chr(47)) { if ($mid($1,3,1) == $chr(47)) { ;/// $1- } elseif ($mid($1,3,1) == $chr(33)) { ;//! $1- } elseif ($mid($1,3,1) == $chr(46)) { if ($mid($1,4,1) == $chr(33)) { ;//.! * Sorry, //.! doesn't work. Try //!. } else { ;//. if (($1 == //.say) || ($1 == //.msg) || ($1 == //.me) || ($1 == //.describe)) { $1- } else { $1- } } } } elseif ($mid($1,2,1) == $chr(47)) { ;// $1- } elseif ($mid($1,2,1) == $chr(33)) { if ($mid($1,3,1) == $chr(46)) { ;/!. $1- } else { ;/! $1- } } elseif ($mid($1,2,1) == $chr(46)) { if ($mid($1,3,1) == $chr(33)) { ;/.! echo -cat info * Sorry, /.! doesn't work. Try /!. } else { ;/. if (($1 == /.say) || ($1 == /.msg) || ($1 == /.me) || ($1 == /.describe)) { $1- } else { $1- } } } else { ;/ $1- } } else { :blah ;doesn't start with / msg $active $1- } } }