From e9a6ab44bf17e5fe61d76964b9cb09d42f0d627c Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Apr 2004 13:41:01 +0000 Subject: Added support for module-based chanmodes with parameters and the ability to query the mode states. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@374 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index fe4b69315..8e591ba0c 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -229,6 +229,21 @@ Admin Server::GetAdmin() bool Server::AddExtendedMode(char modechar, int type, bool default_on, int params_when_on, int params_when_off) { + if (type == MT_SERVER) + { + log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"); + return false; + } + if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) + { + log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"); + return false; + } + if ((params_when_on>1) || (params_when_off>1)) + { + log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"); + return false; + } return DoAddExtendedMode(modechar,type,default_on,params_when_on,params_when_off); } -- cgit v1.3.1-10-gc9f91