summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-19 11:27:00 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-19 11:27:00 +0000
commit675698fff9da3b409386b17f18a3d8a7dfe15568 (patch)
tree873365334d54db4a70ddbc35a7e0d2d4501eea30
parentd5423812506f7017c7bc3a5cadedd2c793dcb378 (diff)
- Don't allow invalid channel names in /mode #chan +L #chan
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3238 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_redirect.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index a7115a15e..a91ddef7f 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -45,7 +45,15 @@ class ModuleRedirect : public Module
if (mode_on)
{
std::string ChanToJoin = params[0];
- chanrec* c = Srv->FindChannel(ChanToJoin);
+ chanrec *c;
+
+ if (!IsValidChannelName(ChanToJoin.c_str()))
+ {
+ WriteServ(user->fd,"403 %s %s :Invalid channel name",user->nick, ChanToJoin.c_str());
+ return 0;
+ }
+
+ c = Srv->FindChannel(ChanToJoin);
if (c)
{
/* Fix by brain: Dont let a channel be linked to *itself* either */