summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-04 13:41:01 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-04 13:41:01 +0000
commite9a6ab44bf17e5fe61d76964b9cb09d42f0d627c (patch)
tree1ec8f417d0e102f00d42bf4cf4957f849fc32f61 /src/modules.cpp
parent6d853575a51230b5b8905933423ed8cd94058435 (diff)
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
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp15
1 files changed, 15 insertions, 0 deletions
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);
}