]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_callerid.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_callerid.cpp
index e28a4084b0b94a40987382913d1d2fa103868f1f..6ed1f957a84dcc2732c3432582d8798ac45d41c3 100644 (file)
@@ -144,7 +144,7 @@ public:
        {
                if (index != 0)
                        return;
-               std::string out = "";
+               std::string out;
                irc::commasepstream nicks(parameter);
                std::string tok;
                while (nicks.GetToken(tok))
@@ -338,7 +338,7 @@ public:
                ServerInstance->Modules->AddService(cmd.extInfo);
 
                Implementation eventlist[] = { I_OnRehash, I_OnUserPostNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage };
-               ServerInstance->Modules->Attach(eventlist, this, 6);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual ~ModuleCallerID()