]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operprefix.cpp
Do not send too much data over SSL in one go
[user/henk/code/inspircd.git] / src / modules / m_operprefix.cpp
index c6c5037e9c1a4208c0b76c9a9fe1822f21f0fd8e..25937cd6ea27cbc91b8c0dff4ac6e26bf7df9867 100644 (file)
@@ -51,7 +51,7 @@ class OperPrefixMode : public ModeHandler
                                return MODEACTION_ALLOW;
                        else
                        {
-                               if (source && channel)
+                               if (channel)
                                        source->WriteNumeric(ERR_CHANOPRIVSNEEDED, "%s %s :Only servers are permitted to change channel mode '%c'", source->nick.c_str(), channel->name.c_str(), 'y');
                                return MODEACTION_DENY;
                        }
@@ -86,7 +86,7 @@ class ModuleOperPrefixMode : public Module
                ServerInstance->Modules->AddService(opm);
 
                Implementation eventlist[] = { I_OnUserPreJoin, I_OnPostOper, I_OnLoadModule, I_OnUnloadModule };
-               ServerInstance->Modules->Attach(eventlist, this, 4);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
 
                /* To give clients a chance to learn about the new prefix we don't give +y to opers
                 * right now. That means if the module was loaded after opers have joined channels