- user->WriteNumeric(960, "%s %s :End of mode list", user->nick.c_str(), channel->name.c_str());
+ unsigned int i = 1;
+ Modes::ChangeList modes;
+ while (i < parameters.size())
+ {
+ std::string prop = parameters[i++];
+ bool plus = prop[0] != '-';
+ if (prop[0] == '+' || prop[0] == '-')
+ prop.erase(prop.begin());
+
+ ModeHandler* mh = ServerInstance->Modes->FindMode(prop, MODETYPE_CHANNEL);
+ if (mh)
+ {
+ if (mh->GetNumParams(plus))
+ {
+ if (i != parameters.size())
+ modes.push(mh, plus, parameters[i++]);
+ }
+ else
+ modes.push(mh, plus);
+ }
+ }
+ ServerInstance->Modes->ProcessSingle(src, chan, NULL, modes, ModeParser::MODE_CHECKACCESS);
+ return CMD_SUCCESS;
+ }
+};
+
+class DummyZ : public ModeHandler
+{
+ public:
+ DummyZ(Module* parent) : ModeHandler(parent, "namebase", 'Z', PARAM_ALWAYS, MODETYPE_CHANNEL)
+ {
+ list = true;