]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_saquit.cpp
Added <oper:swhois> to m_swhois, which will override <type:swhois> if specified
[user/henk/code/inspircd.git] / src / modules / m_saquit.cpp
index 615ba5934ad4f224f2d22a130c8584ebf6317dea..388846803dcc414b910e1f354eff405d2a40d95a 100644 (file)
@@ -35,9 +35,8 @@ using namespace std;
 
 /* $ModDesc: Provides support for an SAQUIT command, exits user with a reason */
 
-
-
-
+/** Handle /SAQUIT
+ */
 class cmd_saquit : public command_t
 {
  public:
@@ -57,13 +56,9 @@ class cmd_saquit : public command_t
                                user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick);
                                return CMD_FAILURE;
                        }
-                       std::string line = "";
-                       for (int i = 1; i < pcnt - 1; i++)
-                       {
-                               line = line + std::string(parameters[i]) + " ";
-                       }
-                       line = line + std::string(parameters[pcnt-1]);
-               
+                       irc::stringjoiner reason_join(" ", parameters, 1, pcnt - 1);
+                       std::string line = reason_join.GetJoined();
+
                        ServerInstance->WriteOpers(std::string(user->nick)+" used SAQUIT to make "+std::string(dest->nick)+" quit with a reason of "+line);
                        userrec::QuitUser(ServerInstance, dest, line);
 
@@ -92,7 +87,7 @@ class ModuleSaquit : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,1,VF_VENDOR);
+               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
        }
        
 };