]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sasl.cpp
Include explicit routing information in Command, will replace CMD_LOCALONLY return...
[user/henk/code/inspircd.git] / src / modules / m_sasl.cpp
index 17c932a0e9d597c8fe3fa725c988810e3cb73563..5241a14e57c085c5a58d3e9fe10eb700d3ea8306 100644 (file)
@@ -3,7 +3,7 @@
  *       +------------------------------------+
  *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *         the file COPYING for details.
@@ -40,7 +40,7 @@ class SaslAuthenticator : public classbase
        {
                this->user->Extend("sasl_authenticator", this);
 
-               std::deque<std::string> params;
+               parameterlist params;
                params.push_back("*");
                params.push_back("SASL");
                params.push_back(user->uuid);
@@ -63,7 +63,7 @@ class SaslAuthenticator : public classbase
        }
 
        /* checks for and deals with a state change. */
-       SaslState ProcessInboundMessage(std::deque<std::string> &msg)
+       SaslState ProcessInboundMessage(parameterlist &msg)
        {
                switch (this->state)
                {
@@ -106,7 +106,7 @@ class SaslAuthenticator : public classbase
                if (this->state != SASL_COMM)
                        return true;
 
-               std::deque<std::string> params;
+               parameterlist params;
                params.push_back("*");
                params.push_back("SASL");
                params.push_back(this->user->uuid);
@@ -186,17 +186,16 @@ class CommandAuthenticate : public Command
 
 class ModuleSASL : public Module
 {
-       CommandAuthenticate* sasl;
+       CommandAuthenticate sasl;
  public:
 
        ModuleSASL(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), sasl(Me, this)
        {
                Implementation eventlist[] = { I_OnEvent, I_OnUserRegister, I_OnPostConnect, I_OnUserDisconnect, I_OnCleanup };
                ServerInstance->Modules->Attach(eventlist, this, 5);
 
-               sasl = new CommandAuthenticate(ServerInstance, this);
-               ServerInstance->AddCommand(sasl);
+               ServerInstance->AddCommand(&sasl);
 
                if (!ServerInstance->Modules->Find("m_services_account.so") || !ServerInstance->Modules->Find("m_cap.so"))
                        ServerInstance->Logs->Log("m_sasl", DEFAULT, "WARNING: m_services_account.so and m_cap.so are not loaded! m_sasl.so will NOT function correctly until these two modules are loaded!");
@@ -259,7 +258,7 @@ class ModuleSASL : public Module
 
                if (ev->GetEventID() == "encap_received")
                {
-                       std::deque<std::string>* parameters = (std::deque<std::string>*)ev->GetData();
+                       parameterlist* parameters = (parameterlist*)ev->GetData();
 
                        if ((*parameters)[1] != "SASL")
                                return;