diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-02-10 23:40:54 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-02-10 23:40:54 +0000 |
commit | 2eb2cb7650e78612d8096b13f7cf075b1ec82a07 (patch) | |
tree | 0b0a7a3cfb5cd0fa429b95b61eab5c4259da0d00 /docs | |
parent | fcc08f61bc50f1f73bc1e3fe7d8e7c5b9a608668 (diff) |
Changed up a small part of the mode API for preparation for dynamic mode support at runtime
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2789 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'docs')
-rw-r--r-- | docs/IRCD | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -206,11 +206,11 @@ How To Add IRCd Support Anope is told about modes in the moduleAddModes() function.
For the most part, the syntax for adding channel and user modes are:
- ModeManager::AddUserMode('N', new UserMode(UMODE_NETADMIN));
+ ModeManager::AddUserMode(new UserMode(UMODE_NETADMIN, 'N'));
Where 'N' is the char for the mode, and UMODE_NETADMIN shows what the
mode does. Or:
- ModeManager::AddChannelMode('c', new ChannelMode(CMODE_BLOCKCOLOR));
+ ModeManager::AddChannelMode(new ChannelMode(CMODE_BLOCKCOLOR, 'c'));
Where 'c' is the char for the mode and CMODE_BLOCKCOLOR shows what
the mode does
@@ -219,11 +219,11 @@ How To Add IRCd Support If necessary, you can add additional modes to this list.
Adding simple modes with parameters is similar, instead adding a
- 'new ChannelMode', use 'new ChannelModeParam', set the second optional
+ 'new ChannelMode', use 'new ChannelModeParam', set the third optional
arg of ChannelModeParam to false if the param should NOT be sent when unsetting
it. Eg:
- ModeManager::AddChannelMode('j', new ChannelModeParam(CMODE_JOINFLOOD, true));
+ ModeManager::AddChannelMode(new ChannelModeParam(CMODE_JOINFLOOD, 'j', true));
Anope will internally track the params, and they can be retrieved through
Channel::GetParam();
@@ -235,13 +235,13 @@ How To Add IRCd Support from mlocking (or in CMODE_REGISTERED's case, anyone) from setting them.
This should be added like:
- ModeManager::AddChannelMode('O', new ChannelModeOper());
+ ModeManager::AddChannelMode(new ChannelModeOper('O'));
The CMODE_FLOOD param also has its own class, but due to the wide range of
valid parameters accepted across IRCds, your protocol module MUST have the
IsValid function for this.
- bool ChannelModeFlood::IsValid(const char *value) { }
+ bool ChannelModeFlood::IsValid(const std::string &value) { }
5) Functions and Events
|