- virtual void PushChanMode(Channel* channel, User* user, bool negate = false)
- {
- if (negate)
- DelPrefixChan(user, channel);
- else
- AddPrefixChan(user, channel);
- char modeline[]="+y";
- if (negate)
- modeline [0]='-';
- std::vector<std::string> modechange;
- modechange.push_back(channel->name);
- modechange.push_back(modeline);
- modechange.push_back(user->nick);
- ServerInstance->SendMode(modechange,this->ServerInstance->FakeClient);
- }
-
- virtual void OnPostJoin(User *user, Channel *channel)
- {
- // This may look wrong, but I don't think it is.. PushChanMode will send FMODE which should sort it all out.
- if (!IS_LOCAL(user))
- return;
-
- if (user && IS_OPER(user))
- {
- if (user->IsModeSet('H'))
- {
- /* we respect your wish to be invisible */
- return;
- }
- PushChanMode(channel, user);
- }
- }
-
- // XXX: is there a better way to do this?
- virtual int OnRawMode(User* user, Channel* chan, const char mode, const std::string ¶m, bool adding, int pcnt, bool servermode)
+ public:
+ ModuleOperPrefixMode()
+ : opm(this), hideoperwatcher(this)
+ , hideopermode(this, "hideoper")