Mode Parsing - 02/11/07 05:13 PM
Hi, I'm writing an IRCd in mIRC, and I've reached to MODE.
I need to parse the parameters, given for status modes (ov).
Here's my code.
I can't figure out why it doesn't work, mIRC returns "MODE 2 - PARAM: <the second parameter here>."
It completely ignores the first mode and parameter.
I'm trying //echo -a $ModeParams(ov,Trashlord Test).
Any ideas?
I need to parse the parameters, given for status modes (ov).
Here's my code.
Code:
alias ModeParams { ;$ModeParams(modes,parameters). var %i = 0, %len = $len($1), %modes, %paramodes = ov, %mode_param = 0 while (%i < %len) { inc %i var %mid = $mid($1,%i,1) if (%mid isincs %paramodes) { inc %mode_param var %modes = MODE %i - PARAM: $gettok($2-,%mode_param,32) } } return %modes }
I can't figure out why it doesn't work, mIRC returns "MODE 2 - PARAM: <the second parameter here>."
It completely ignores the first mode and parameter.
I'm trying //echo -a $ModeParams(ov,Trashlord Test).
Any ideas?