]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_foobar.cpp
So much stuff changed in this one, i forgot most of it.
[user/henk/code/inspircd.git] / src / modules / m_foobar.cpp
index 531176299a1c3dd3ca240cc47d307b672947da30..93b1848fed8d820279a5b7ee665aa94120065ed1 100644 (file)
@@ -19,6 +19,8 @@ using namespace std;
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
+#include "helperfuncs.h"
+#include "inspircd.h"
 
 /* $ModDesc: A dummy module for testing */
 
@@ -66,15 +68,15 @@ class ModuleFoobar : public Module
                // method called when a user connects
        
                std::string b = user->nick;
-               Srv->Log(DEBUG,"Foobar: User connecting: " + b);
+               log(DEBUG,"Foobar: User connecting: "+b);
        }
 
-       virtual void OnUserQuit(userrec* user, std::string reason)
+       virtual void OnUserQuit(userrec* user, const std::string &reason)
        {
                // method called when a user disconnects
        
                std::string b = user->nick;
-               Srv->Log(DEBUG,"Foobar: User quitting: " + b);
+               log(DEBUG,"Foobar: User quitting: "+b);
        }
        
        virtual void OnUserJoin(userrec* user, chanrec* channel)
@@ -83,16 +85,16 @@ class ModuleFoobar : public Module
        
                std::string c = channel->name;
                std::string b = user->nick;
-               Srv->Log(DEBUG,"Foobar: User " + b + " joined " + c);
+               log(DEBUG,"Foobar: User "+b+" joined "+c);
        }
 
-       virtual void OnUserPart(userrec* user, chanrec* channel, std::string partreason)
+       virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partreason)
        {
                // method called when a user parts a channel
        
                std::string c = channel->name;
                std::string b = user->nick;
-               Srv->Log(DEBUG,"Foobar: User " + b + " parted " + c);
+               log(DEBUG,"Foobar: User "+b+" parted "+c);
        }
 
 };