diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-14 16:08:48 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-14 16:08:48 +0000 |
commit | a551684ab05b850d1c9e84f710ec9d1ccf1e83d8 (patch) | |
tree | 3e51b1c4e3ab6a3de06d0aec9ff2a9d6bfd4ce38 | |
parent | b06846c089f66880bdd00834df95920d02b34800 (diff) |
Don't allow SAQUIT, SANICK, SAPART and SAJOIN on ulined clients :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4390 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_sajoin.cpp | 13 | ||||
-rw-r--r-- | src/modules/m_sanick.cpp | 13 | ||||
-rw-r--r-- | src/modules/m_sapart.cpp | 13 | ||||
-rw-r--r-- | src/modules/m_saquit.cpp | 13 |
4 files changed, 36 insertions, 16 deletions
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 2471efe91..2c9273e70 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -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. * * --------------------------------------------------- */ @@ -40,6 +40,11 @@ class cmd_sajoin : public command_t 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; + } if (!IsValidChannelName(parameters[1])) { /* we didn't need to check this for each character ;) */ diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 8fbf8dd5a..5d449d7e0 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -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. * * --------------------------------------------------- */ @@ -39,6 +39,11 @@ class cmd_sanick : public command_t userrec* source = Srv->FindNick(std::string(parameters[0])); if (source) { + if (Srv->IsUlined(source->server)) + { + WriteServ(user->fd,"990 %s :Cannot use an SA command on a u-lined client",user->nick); + return; + } if (Srv->IsNick(std::string(parameters[1]))) { // FIX by brain: Cant use source->nick here because if it traverses a server link then diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 33b323fea..9203b7d36 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -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. * * --------------------------------------------------- */ @@ -40,6 +40,11 @@ class cmd_sapart : public command_t 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; + } if (!IsValidChannelName(parameters[1])) { Srv->SendTo(NULL,user,"NOTICE "+std::string(user->nick)+" :*** Invalid characters in channel name"); diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index e5722bffe..8174d5a64 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -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. * * --------------------------------------------------- */ @@ -49,6 +49,11 @@ class cmd_saquit : public command_t 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++) { |