]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/svspart.cpp
Remove m_halfop from list in compat linking mode
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / svspart.cpp
index 8d95395ed18555b4d4e9190e191c52f701e627c6..2a34d23c61bef49986f4165cf514b9e7333f3618 100644 (file)
  */
 
 #include "inspircd.h"
-#include "commands/cmd_whois.h"
-#include "commands/cmd_stats.h"
 #include "socket.h"
 #include "xline.h"
-#include "../transport.h"
 #include "socketengine.h"
 
 #include "main.h"
@@ -26,7 +23,7 @@
 
 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
 
-bool TreeSocket::ServicePart(const std::string &prefix, std::deque<std::string> &params)
+bool TreeSocket::ServicePart(const std::string &prefix, parameterlist &params)
 {
        if (params.size() < 2)
                return true;
@@ -36,15 +33,14 @@ bool TreeSocket::ServicePart(const std::string &prefix, std::deque<std::string>
        if (params.size() == 3)
                reason = params[2];
 
-       User* u = this->ServerInstance->FindNick(params[0]);
-       Channel* c = this->ServerInstance->FindChan(params[1]);
+       User* u = ServerInstance->FindNick(params[0]);
+       Channel* c = ServerInstance->FindChan(params[1]);
 
        if (u)
        {
                /* only part if it's local, otherwise just pass it on! */
                if (IS_LOCAL(u))
-                       if (!c->PartUser(u, reason))
-                               delete c;
+                       c->PartUser(u, reason);
                Utils->DoOneToAllButSender(prefix,"SVSPART",params,prefix);
        }