diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-28 19:39:18 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-28 19:39:18 +0000 |
commit | 2470212ed18754d540a47198c4be320d63c44fd3 (patch) | |
tree | b793695067c161bace2b22e042ce9432e04d419b /src/modules.cpp | |
parent | e85c4b09ab8a320607076b54fb75d1f0e3fb636c (diff) |
Added remote versioning
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1244 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index af3ef5303..339374ae2 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -619,22 +619,30 @@ Admin Server::GetAdmin() bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) { - if (type == MT_SERVER) + if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) { - 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 (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,requires_oper,params_when_on,params_when_off); } - if ((params_when_on>1) || (params_when_off>1)) + else { - log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"); - return false; + log(DEBUG,"*** API ERROR *** Muppet modechar detected."); } - return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); + return false; } bool Server::AddExtendedListMode(char modechar) |