summaryrefslogtreecommitdiff
path: root/src/modules/m_sajoin.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-08 00:56:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-08 00:56:51 +0000
commit4cbb91509431fa68069c8f76202b85290f9f3b87 (patch)
tree78a200a829e43e481b477af92a6d472bb430586d /src/modules/m_sajoin.cpp
parentf5021f5e8b0de466e116da3049703319959d5d7f (diff)
Sanity checks in SAJOIN and SAPART
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@441 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sajoin.cpp')
-rw-r--r--src/modules/m_sajoin.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 94175a523..e687e474d 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -15,6 +15,16 @@ void handle_sajoin(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 SAJOIN to make "+std::string(dest->nick)+" join "+parameters[1]);
Srv->JoinUserToChannel(dest,std::string(parameters[1]),std::string(dest->nick));
}