From dc8f7923f4c9cd685a338072bcc2bb351bf575d9 Mon Sep 17 00:00:00 2001 From: adam- Date: Tue, 23 Jun 2009 16:56:38 +0000 Subject: Adds check for using commands on non-registered channels before the commands are called git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2336 5417fbe8-f217-4b02-8779-1006273d7864 --- src/commands.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/commands.c') diff --git a/src/commands.c b/src/commands.c index 344805f9a..7fe9f829b 100644 --- a/src/commands.c +++ b/src/commands.c @@ -144,6 +144,11 @@ void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[], const char * return; } } + else if (!c->HasFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL)) + { + notice_lang(service, u, CHAN_X_NOT_REGISTERED, params[0].c_str()); + return; + } } // If the command requires a permission, and they aren't registered or don't have the required perm, DENIED -- cgit