]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/mode.cpp
Fixed bug #418 (incorrect numerics for part of /ADMIN and /USERS) - patch by Zaba
[user/henk/code/inspircd.git] / src / mode.cpp
index d04b7df975bdb69484544f2ccb8a8ece48d94103..421183740fbb0aa82465ac0826ffa2a1bc72ce6b 100644 (file)
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "modules.h"
 #include "inspstring.h"
-#include "mode.h"
 
 /* +s (secret) */
 #include "modes/cmode_s.h"
@@ -128,6 +125,10 @@ void ModeHandler::DisplayList(userrec* user, chanrec* channel)
 {
 }
 
+void ModeHandler::DisplayEmptyList(userrec* user, chanrec* channel)
+{
+}
+
 bool ModeHandler::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
 {
        return (ours < theirs);
@@ -327,6 +328,7 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
                                if (ServerInstance->Config->HideModeLists[mletter] && (targetchannel->GetStatus(user) < STATUS_HOP))
                                {
                                        user->WriteServ("482 %s %s :Only half-operators and above may view the +%c list",user->nick, targetchannel->name, *mode++);
+                                       mh->DisplayEmptyList(user, targetchannel);
                                        continue;
                                }
 
@@ -1016,14 +1018,8 @@ void ModeHandler::RemoveMode(chanrec* channel)
 
        if (channel->IsModeSet(this->GetModeChar()))
        {
-               userrec* n = new userrec(ServerInstance);
-
                sprintf(moderemove,"-%c",this->GetModeChar());
-               n->SetFd(FD_MAGIC_NUMBER);
-
-               ServerInstance->SendMode(parameters, 2, n);
-
-               delete n;
+               ServerInstance->SendMode(parameters, 2, ServerInstance->FakeClient);
        }
 }