summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-04 21:30:41 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-04 21:30:41 +0000
commitdae8024a466a0a90f03222d31e34555b9b612509 (patch)
tree3aef57f6c15c7fba0d574b3cc9041cab2143e026 /include
parent9ed9068cc693fe0e39e2d2e0848a212254609ae4 (diff)
Completed support for module-handled umodes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@377 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h2
-rw-r--r--include/modules.h7
-rw-r--r--include/users.h2
3 files changed, 7 insertions, 4 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 5eae2f189..4a0762dbd 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -85,5 +85,7 @@ std::string getadminemail();
std::string getadminnick();
void readfile(file_cache &F, const char* fname);
bool ModeDefined(char c, int i);
+bool ModeDefinedOper(char c, int i);
int ModeDefinedOn(char c, int i);
int ModeDefinedOff(char c, int i);
+
diff --git a/include/modules.h b/include/modules.h
index 74d7800d3..1391c5958 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -293,9 +293,10 @@ class Server : public classbase
* This allows modules to add extra mode letters, e.g. +x for hostcloak.
* the "type" parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to
* indicate wether the mode is a channel mode, a client mode, or a server mode.
- * default_on is true if the mode is to be applied to default connections.
+ * requires_oper is used with MT_CLIENT type modes only to indicate the mode can only
+ * be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored.
* params_when_on is the number of modes to expect when the mode is turned on
- * (for type MT_CHANNEL only), e.g. with mode +b, this would have a value of 1.
+ * (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1.
* the params_when_off value has a similar value to params_when_on, except it indicates
* the number of parameters to expect when the mode is disabled. Modes which act in a similar
* way to channel mode +l (e.g. require a parameter to enable, but not to disable) should
@@ -306,7 +307,7 @@ class Server : public classbase
* a mode can have at most one parameter, attempting to use more parameters will have undefined
* effects.
*/
- virtual bool AddExtendedMode(char modechar, int type, bool default_on, int params_when_on, int params_when_off);
+ virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off);
/** Adds a command to the command table.
* This allows modules to add extra commands into the command table. You must place a function within your
diff --git a/include/users.h b/include/users.h
index 728a82d00..901b30321 100644
--- a/include/users.h
+++ b/include/users.h
@@ -87,7 +87,7 @@ class userrec : public connection
* This may contain any of the following RFC characters: o, w, s, i
* Your module may define other mode characters as it sees fit.
*/
- char modes[32];
+ char modes[MAXBUF];
ucrec chans[MAXCHANS];