]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_antibottler.cpp
Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include lists
[user/henk/code/inspircd.git] / src / modules / m_antibottler.cpp
index 7d7f680843eb3ed6b9a8b3430d140ad4f22b584d..9c7d75ea26dd971e089d645fb06775a366473374 100644 (file)
@@ -23,20 +23,17 @@ using namespace std;
 
 class ModuleAntiBottler : public Module
 {
- private:
-        
-        Server *Srv;
  public:
-       ModuleAntiBottler(Server* Me)
+       ModuleAntiBottler(InspIRCd* Me)
                : Module::Module(Me)
        {
-               Srv = Me;
+               
        }
 
-        void Implements(char* List)
-        {
-                List[I_OnServerRaw] = 1;
-        }
+       void Implements(char* List)
+       {
+               List[I_OnServerRaw] = 1;
+       }
 
        
        virtual ~ModuleAntiBottler()
@@ -53,7 +50,7 @@ class ModuleAntiBottler : public Module
                if (inbound)
                {
                        char data[MAXBUF];
-                       strncpy(data,raw.c_str(),MAXBUF);
+                       strlcpy(data,raw.c_str(),MAXBUF);
                        bool not_bottler = false;
                        if (!strncmp(data,"user ",5))
                        {
@@ -72,11 +69,6 @@ class ModuleAntiBottler : public Module
                                if (!(data) || !(*data))
                                        return;
 
-                               /*
-                                * slight efficiency fix: strtok() just returns NULL if it has no more
-                                * tokens to return. Plus strlen's here really could have been replaced
-                                * with above pointer voodoo :-). --w00t
-                                */
                                strtok(data," ");
                                char *ident = strtok(NULL," ");
                                char *local = strtok(NULL," ");
@@ -115,7 +107,7 @@ class ModuleAntiBottlerFactory : public ModuleFactory
        {
        }
        
-       virtual Module * CreateModule(Server* Me)
+       virtual Module * CreateModule(InspIRCd* Me)
        {
                return new ModuleAntiBottler(Me);
        }