summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-05 13:35:09 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-05 13:35:09 +0000
commit95a017db9f3761e209bb3a43d02aad1630cfc022 (patch)
treee139fff9c2bb24897e52bfc7d795e62b5fcaa91a
parent187868def97ba9918de44a89003ac56878f38460 (diff)
Dont allow sending empty mode strings in check_modes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2610 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--src/chanserv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index a00b83f0c..dd9299e02 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -906,6 +906,9 @@ void check_modes(Channel * c)
if (modebuf[modebuf.length() - 1] == '-')
modebuf.erase(modebuf.length() - 1);
+
+ if (modebuf.empty())
+ return;
ircdproto->SendMode((ci ? whosends(ci) : findbot(s_OperServ)), c->name, "%s%s", modebuf.c_str(), argbuf.empty() ? "" : argbuf.c_str());
}