diff options
Diffstat (limited to 'src/modules/m_sapart.cpp')
-rw-r--r-- | src/modules/m_sapart.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 266ed5a04..fdbbcc102 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -15,6 +15,15 @@ void handle_sapart(char **parameters, int pcnt, userrec *user) userrec* dest = Srv->FindNick(std::string(parameters[0])); if (dest) { + for (int x = 0; x < strlen(parameters[0]); x++) + { + if ((parameters[0][0] != '#') || (parameters[0][x] == ' ') || (parameters[0][x]> ',')) + { + 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]); Srv->PartUserFromChannel(dest,std::string(parameters[1]),std::string(dest->nick)); } |