diff options
-rw-r--r-- | src/modules/m_redirect.cpp | 10 |
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 */ |