From 7926238fd250ee8d2b5d8ba3118db2520c4a1a40 Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Fri, 31 Jan 2014 04:15:56 -0800 Subject: [PATCH] Improve IsChannelValid() --- src/protocol.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/protocol.cpp b/src/protocol.cpp index 2287447b6..01c8d31c8 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -322,6 +322,9 @@ bool IRCDProto::IsChannelValid(const Anope::string &chan) if (chan.empty() || chan[0] != '#' || chan.length() > Config->GetBlock("networkinfo")->Get("chanlen")) return false; + if (chan.find_first_of(" ,") != Anope::string::npos) + return false; + return true; }