- private:
- OperPrefixMode* opm;
- public:
- ModuleOperPrefixMode() {
- ConfigReader Conf;
- std::string pfx = Conf.ReadValue("operprefix", "prefix", "!", 0, false);
-
- opm = new OperPrefixMode(this, pfx[0]);
- if ((!ServerInstance->Modes->AddMode(opm)))
- throw ModuleException("Could not add a new mode!");
-
- Implementation eventlist[] = { I_OnPostJoin, I_OnUserQuit, I_OnUserKick, I_OnUserPart, I_OnOper };
- ServerInstance->Modules->Attach(eventlist, this, 5);
- }
-
- void PushChanMode(Channel* channel, User* user)
- {
- char modeline[] = "+y";
- std::vector<std::string> modechange;
- modechange.push_back(channel->name);
- modechange.push_back(modeline);
- modechange.push_back(user->nick);
- ServerInstance->SendMode(modechange,ServerInstance->FakeClient);
- }