From 3cc3b745418494a654bedf38098c6aed54c2449b Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 15 Feb 2006 02:12:22 +0000 Subject: - And in SAPARt git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3202 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_sapart.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/modules') 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]); -- cgit v1.2.3