summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-02-06 15:01:30 +0000
committerPeter Powell <petpow@saberuk.com>2018-02-07 11:35:42 +0000
commit12a47e788b3eba8e395abdd46c2dc91692b9b292 (patch)
tree2f235069e4f714b9a01ef0abc01e00f5d75895ce /src
parent4132a44396d8fa3d23f87b5cbea5b928aa09769f (diff)
Send the ACCEPT and KEYLEN ISUPPORT tokens.
- The ACCEPT=[count] token specifies the maximum amount of nicks which can be added to a m_callerid accept list. This token was added by ircd-ratbox in 3.0.9. - The KEYLEN=[length] token specifies the maximum length of a channel key. This token was added by ircd-ratbox in 3.1 beta. For more info see http://defs.ircdocs.horse/defs/isupport.html
Diffstat (limited to 'src')
-rw-r--r--src/coremods/core_channel/cmode_k.cpp2
-rw-r--r--src/coremods/core_channel/core_channel.cpp2
-rw-r--r--src/coremods/core_channel/core_channel.h2
-rw-r--r--src/modules/m_callerid.cpp1
4 files changed, 6 insertions, 1 deletions
diff --git a/src/coremods/core_channel/cmode_k.cpp b/src/coremods/core_channel/cmode_k.cpp
index 992fbc1b5..4fc29e04c 100644
--- a/src/coremods/core_channel/cmode_k.cpp
+++ b/src/coremods/core_channel/cmode_k.cpp
@@ -23,6 +23,8 @@
#include "inspircd.h"
#include "core_channel.h"
+const std::string::size_type ModeChannelKey::maxkeylen = 32;
+
ModeChannelKey::ModeChannelKey(Module* Creator)
: ParamMode<ModeChannelKey, LocalStringExt>(Creator, "key", 'k', PARAM_ALWAYS)
{
diff --git a/src/coremods/core_channel/core_channel.cpp b/src/coremods/core_channel/core_channel.cpp
index 161f618d1..20e93ec07 100644
--- a/src/coremods/core_channel/core_channel.cpp
+++ b/src/coremods/core_channel/core_channel.cpp
@@ -114,6 +114,8 @@ class CoreModChannel : public Module, public CheckExemption::EventListener
void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
{
+ tokens["KEYLEN"] = ConvToStr(ModeChannelKey::maxkeylen);
+
// Build a map of limits to their mode character.
insp::flat_map<int, std::string> limits;
const ModeParser::ListModeList& listmodes = ServerInstance->Modes->GetListModes();
diff --git a/src/coremods/core_channel/core_channel.h b/src/coremods/core_channel/core_channel.h
index c500add07..3a74bc661 100644
--- a/src/coremods/core_channel/core_channel.h
+++ b/src/coremods/core_channel/core_channel.h
@@ -155,8 +155,8 @@ class ModeChannelBan : public ListModeBase
*/
class ModeChannelKey : public ParamMode<ModeChannelKey, LocalStringExt>
{
- static const std::string::size_type maxkeylen = 32;
public:
+ static const std::string::size_type maxkeylen;
ModeChannelKey(Module* Creator);
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string& parameter, bool adding) CXX11_OVERRIDE;
void SerializeParam(Channel* chan, const std::string* key, std::string& out) ;
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 349c48c29..d69f5606f 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -371,6 +371,7 @@ public:
void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
{
+ tokens["ACCEPT"] = ConvToStr(cmd.maxaccepts);
tokens["CALLERID"] = ConvToStr(myumode.GetModeChar());
}