]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operprefix.cpp
m_sajoin Abort and report if the target user is already on the channel
[user/henk/code/inspircd.git] / src / modules / m_operprefix.cpp
index c84e74892b0142bb48a22f63cca93b9bde4c5b24..3bf4c8434352e985d3d39dda126489ce8ed6d628 100644 (file)
@@ -81,7 +81,7 @@ class ModuleOperPrefixMode : public Module
                modechange.push_back(user->nick);
                for (UCListIter v = user->chans.begin(); v != user->chans.end(); v++)
                {
-                       modechange[0] = (*v)->name;
+                       modechange[0] = (*v)->chan->name;
                        ServerInstance->Modes->Process(modechange, ServerInstance->FakeClient);
                }
        }
@@ -113,7 +113,8 @@ HideOperWatcher::HideOperWatcher(ModuleOperPrefixMode* parent)
 
 void HideOperWatcher::AfterMode(User* source, User* dest, Channel* channel, const std::string& parameter, bool adding)
 {
-       if (IS_LOCAL(dest))
+       // If hideoper is being unset because the user is deopering, don't set +y
+       if (IS_LOCAL(dest) && dest->IsOper())
                parentmod->SetOperPrefix(dest, !adding);
 }