- if ((ModeDefinedOn(modechar,MT_CHANNEL)>0) && (mdir))
- {
- p.push_back(parameters[param]);
- }
- if ((ModeDefinedOff(modechar,MT_CHANNEL)>0) && (!mdir))
- {
- p.push_back(parameters[param]);
- }
- }
- bool handled = false;
- if (param>=pcnt)
- {
- // we're supposed to have a parameter, but none was given... so dont handle the mode.
- if (((ModeDefinedOn(modechar,MT_CHANNEL)>0) && (mdir)) || ((ModeDefinedOff(modechar,MT_CHANNEL)>0) && (!mdir)))
- {
- log(DEBUG,"Not enough parameters for module-mode %c",modechar);
- handled = true;
- param++;
- }
- }
-
- // BIG ASS IDIOTIC CODER WARNING!
- // Using OnRawMode on another modules mode's behavour
- // will confuse the crap out of admins! just because you CAN
- // do it, doesnt mean you SHOULD!
- MOD_RESULT = 0;
- std::string para = "";
- if (p.size())
- para = p[0];
- FOREACH_RESULT(I_OnRawMode,OnRawMode(user, chan, modechar, para, mdir, pcnt));
- if (!MOD_RESULT)
- {
- for (int i = 0; i <= MODCOUNT; i++)
+ log(DEBUG,"Not enough parameters for module-mode %c",*modechar);
+ handled = true;
+ param++;
+ }
+ }
+ // BIG ASS IDIOTIC CODER WARNING!
+ // Using OnRawMode on another modules mode's behavour
+ // will confuse the crap out of admins! just because you CAN
+ // do it, doesnt mean you SHOULD!
+ MOD_RESULT = 0;
+ std::string para = "";
+ if (p.size())
+ para = p[0];
+ FOREACH_RESULT(I_OnRawMode,OnRawMode(user, chan, *modechar, para, mdir, pcnt));
+ if (!MOD_RESULT)
+ {
+ for (int i = 0; i <= MODCOUNT; i++)
+ {
+ if (!handled)