]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_shun.cpp
Use !empty() instead of 'size() > 0' when checking parameter count.
[user/henk/code/inspircd.git] / src / modules / m_shun.cpp
index 5b0b42cae7d58c27d996c6d09b9f97daf0725e39..3e378a74c3e0b2a04d8218737433fc1047e971cb 100644 (file)
@@ -23,6 +23,7 @@
 #include "inspircd.h"
 #include "xline.h"
 #include "modules/shun.h"
+#include "modules/stats.h"
 
 
 /** An XLineFactory specialized to generate shun pointers
@@ -133,7 +134,7 @@ class CommandShun : public Command
        }
 };
 
-class ModuleShun : public Module
+class ModuleShun : public Module, public Stats::EventListener
 {
        CommandShun cmd;
        ShunFactory f;
@@ -142,7 +143,9 @@ class ModuleShun : public Module
        bool affectopers;
 
  public:
-       ModuleShun() : cmd(this)
+       ModuleShun()
+               : Stats::EventListener(this)
+               , cmd(this)
        {
        }
 
@@ -227,7 +230,7 @@ class ModuleShun : public Module
                else if ((command == "PART") && (parameters.size() > 1))
                {
                        /* same for PART */
-                       parameters[1].clear();
+                       parameters.pop_back();
                }
 
                /* if we're here, allow the command. */