]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_saquit.cpp
API header and client module updates for new multi-parameter query request. Needs...
[user/henk/code/inspircd.git] / src / modules / m_saquit.cpp
index 212889e809924b8dde9b8b0a53a2a91b8d2a51e3..d43b9710238d0ac87ace78dd34096e68277e7269 100644 (file)
@@ -3,13 +3,13 @@
  *       +------------------------------------+
  *
  *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
+ *                    E-mail:
+ *             <brain@chatspike.net>
+ *               <Craig@chatspike.net>
  *     
  * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
- *            the file COPYING for details.
+ *         the file COPYING for details.
  *
  * ---------------------------------------------------
  */
@@ -34,7 +34,7 @@ using namespace std;
 
 /* $ModDesc: Provides support for an SAQUIT command, exits user with a reason */
 
-Server *Srv;
+static Server *Srv;
 
 class cmd_saquit : public command_t
 {
@@ -44,11 +44,16 @@ class cmd_saquit : public command_t
                this->source = "m_saquit.so";
        }
 
-       void Handle (char **parameters, int pcnt, userrec *user)
+       void Handle (const char** parameters, int pcnt, userrec *user)
        {
                userrec* dest = Srv->FindNick(std::string(parameters[0]));
                if (dest)
                {
+                       if (Srv->IsUlined(dest->server))
+                       {
+                               WriteServ(user->fd,"990 %s :Cannot use an SA command on a u-lined client",user->nick);
+                               return;
+                       }
                        std::string line = "";
                        for (int i = 1; i < pcnt - 1; i++)
                        {