diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-15 02:12:22 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-15 02:12:22 +0000 |
commit | 3cc3b745418494a654bedf38098c6aed54c2449b (patch) | |
tree | f6ff714514452b6a5ae6c23b4c30d5eeb0d439ec | |
parent | d46f8e0684a4891dc0a6b7b49174db919b1bfb79 (diff) |
- And in SAPARt
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3202 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_sapart.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 918a8ca56..ecda26050 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -39,13 +39,10 @@ class cmd_sapart : public command_t userrec* dest = Srv->FindNick(std::string(parameters[0])); if (dest) { - for (unsigned int x = 0; x < strlen(parameters[1]); x++) + if (!IsValidChannelName(parameters[1])) { - if ((parameters[1][0] != '#') || (parameters[1][x] == ' ') || (parameters[1][x] == ',')) - { - Srv->SendTo(NULL,user,"NOTICE "+std::string(user->nick)+" :*** Invalid characters in channel name"); - return; - } + Srv->SendTo(NULL,user,"NOTICE "+std::string(user->nick)+" :*** Invalid characters in channel name"); + return; } Srv->SendOpers(std::string(user->nick)+" used SAPART to make "+std::string(dest->nick)+" part "+parameters[1]); |