diff options
| author | 2021-05-11 03:53:43 +0100 | |
|---|---|---|
| committer | 2021-05-11 04:07:45 +0100 | |
| commit | 3ca912ad71cdc4004401e0977be73c674bb91fbc (patch) | |
| tree | cf57b43229becfc3d9c8532a2d4f18f095f024ec /src/modules | |
| parent | Optimise building the link data string. (diff) | |
| parent | Send ERR_BADCHANMASK when trying to OJOIN/SAJOIN an invalid channel. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules')
34 files changed, 65 insertions, 63 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 9f512a21a..b61b96b3c 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -185,11 +185,11 @@ class PgSQLresult : public SQL::Result class SQLConn : public SQL::Provider, public EventHandler { public: - std::shared_ptr<ConfigTag> conf; /* The <database> entry */ + std::shared_ptr<ConfigTag> conf; /* The <database> entry */ std::deque<QueueItem> queue; - PGconn* sql = nullptr; /* PgSQL database connection handle */ - SQLstatus status = CWRITE; /* PgSQL database connection status */ - QueueItem qinprog; /* If there is currently a query in progress */ + PGconn* sql = nullptr; /* PgSQL database connection handle */ + SQLstatus status = CWRITE; /* PgSQL database connection status */ + QueueItem qinprog; /* If there is currently a query in progress */ SQLConn(Module* Creator, std::shared_ptr<ConfigTag> tag) : SQL::Provider(Creator, tag->getString("id")) diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 55673ab3a..52003b675 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -37,7 +37,7 @@ /// $PackageInfo: require_system("centos") gnutls-devel pkgconfig /// $PackageInfo: require_system("darwin") gnutls pkg-config /// $PackageInfo: require_system("debian") gnutls-bin libgnutls28-dev pkg-config -/// $PackageInfo: require_system("ubuntu") gnutls-bin libgnutls-dev pkg-config +/// $PackageInfo: require_system("ubuntu") gnutls-bin libgnutls28-dev pkg-config #include "inspircd.h" #include "modules/ssl.h" @@ -1079,7 +1079,7 @@ class GnuTLSIOHookProvider : public SSLIOHookProvider GnuTLS::Profile profile; public: - GnuTLSIOHookProvider(Module* mod, GnuTLS::Profile::Config& config) + GnuTLSIOHookProvider(Module* mod, GnuTLS::Profile::Config& config) : SSLIOHookProvider(mod, config.name) , profile(config) { diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index 8f3b34a2b..7b8313f90 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -810,7 +810,7 @@ class mbedTLSIOHookProvider : public SSLIOHookProvider mbedTLS::Profile profile; public: - mbedTLSIOHookProvider(Module* mod, mbedTLS::Profile::Config& config) + mbedTLSIOHookProvider(Module* mod, mbedTLS::Profile::Config& config) : SSLIOHookProvider(mod, config.name) , profile(config) { diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 013055331..8da3dca19 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -46,7 +46,7 @@ enum class callerid_data { public: - typedef insp::flat_set<User*> UserSet; + typedef insp::flat_set<User*> UserSet; typedef std::vector<callerid_data*> CallerIdDataSet; time_t lastnotify = 0; diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 6afba34e4..6bd394e62 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -75,8 +75,6 @@ class CBanFactory : public XLineFactory public: CBanFactory() : XLineFactory("CBAN") { } - /** Generate a CBAN - */ XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) override { return new CBan(set_time, duration, source, reason, xline_specific_mask); @@ -204,7 +202,7 @@ class ModuleCBan : public Module, public Stats::EventListener // Channel is banned. user->WriteNumeric(ERR_BADCHANNEL, cname, InspIRCd::Format("Channel %s is CBANed: %s", cname.c_str(), rl->reason.c_str())); ServerInstance->SNO.WriteGlobalSno('a', "%s tried to join %s which is CBANed (%s)", - user->nick.c_str(), cname.c_str(), rl->reason.c_str()); + user->nick.c_str(), cname.c_str(), rl->reason.c_str()); return MOD_RES_DENY; } diff --git a/src/modules/m_classban.cpp b/src/modules/m_classban.cpp index a469b5e6f..466fd9d1c 100644 --- a/src/modules/m_classban.cpp +++ b/src/modules/m_classban.cpp @@ -56,8 +56,8 @@ class ModuleClassBan ClassExtBan extban; public: - ModuleClassBan() - : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the n extended ban which check whether users are in a connect class matching the specified glob pattern.") + ModuleClassBan() + : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the n extended ban which check whether users are in a connect class matching the specified glob pattern.") , extban(this) { } diff --git a/src/modules/m_clones.cpp b/src/modules/m_clones.cpp index f59d48a61..fc798a031 100644 --- a/src/modules/m_clones.cpp +++ b/src/modules/m_clones.cpp @@ -39,7 +39,7 @@ class CommandClones : public SplitCommand IRCv3::Batch::Batch batch; public: - CommandClones(Module* Creator) + CommandClones(Module* Creator) : SplitCommand(Creator,"CLONES", 1) , batchmanager(Creator) , batch("inspircd.org/clones") diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index bc5f9763a..36d86fa1d 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -352,7 +352,7 @@ class CommandDccallow : public Command void DisplayDCCAllowList(User* user) { - // display current DCCALLOW list + // display current DCCALLOW list user->WriteNumeric(RPL_DCCALLOWSTART, "Users on your DCCALLOW list:"); dl = ext.Get(user); diff --git a/src/modules/m_haproxy.cpp b/src/modules/m_haproxy.cpp index 42f5a9fc8..96c11a515 100644 --- a/src/modules/m_haproxy.cpp +++ b/src/modules/m_haproxy.cpp @@ -110,7 +110,7 @@ struct HAProxyHeader class HAProxyHookProvider : public IOHookProvider { private: - UserCertificateAPI sslapi; + UserCertificateAPI sslapi; public: HAProxyHookProvider(Module* mod) diff --git a/src/modules/m_hidemode.cpp b/src/modules/m_hidemode.cpp index 906d5de31..5799459c8 100644 --- a/src/modules/m_hidemode.cpp +++ b/src/modules/m_hidemode.cpp @@ -89,7 +89,7 @@ class ModeHook : public ClientProtocol::EventHook const Modes::Change& curr = *i; if (settings.GetRequiredRank(*curr.mh) <= rank) { - // No restriction on who can see this mode or there is one but the member's rank is sufficient + // No restriction on who can see this mode or there is one but the member's rank is sufficient if (modechangelist) modechangelist->push(curr); diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 340ac3c5e..64c8065f6 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -341,7 +341,7 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru { if (pathsegment == ".") { - // Stay at the current level. + // Stay at the current level. continue; } diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index cca21fbd5..3aaf57bc3 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -48,7 +48,7 @@ class ModuleHTTPAccessList : public Module, public HTTPACLEventListener HTTPdAPI API; public: - ModuleHTTPAccessList() + ModuleHTTPAccessList() : Module(VF_VENDOR, "Allows the server administrator to control who can access resources served over HTTP with the httpd module.") , HTTPACLEventListener(this) , API(this) diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp index d9af0f04f..802ca99d9 100644 --- a/src/modules/m_ircv3.cpp +++ b/src/modules/m_ircv3.cpp @@ -51,10 +51,10 @@ class JoinHook : public ClientProtocol::EventHook ClientProtocol::Events::Join extendedjoinmsg; public: - const std::string asterisk; + const std::string asterisk; ClientProtocol::EventProvider awayprotoev; AwayMessage awaymsg; - Cap::Capability extendedjoincap; + Cap::Capability extendedjoincap; Cap::Capability awaycap; JoinHook(Module* mod) diff --git a/src/modules/m_ircv3_batch.cpp b/src/modules/m_ircv3_batch.cpp index c41b9f395..eac86a705 100644 --- a/src/modules/m_ircv3_batch.cpp +++ b/src/modules/m_ircv3_batch.cpp @@ -59,12 +59,12 @@ struct IRCv3::Batch::BatchInfo class IRCv3::Batch::ManagerImpl : public Manager { - typedef std::vector<Batch*> BatchList; + typedef std::vector<Batch*> BatchList; Cap::Capability cap; ClientProtocol::EventProvider protoevprov; IntExtItem batchbits; - BatchList active_batches; + BatchList active_batches; bool unloading = false; bool ShouldSendTag(LocalUser* user, const ClientProtocol::MessageTagData& tagdata) override diff --git a/src/modules/m_ldapauth.cpp b/src/modules/m_ldapauth.cpp index ac8ff442b..4e531a3ca 100644 --- a/src/modules/m_ldapauth.cpp +++ b/src/modules/m_ldapauth.cpp @@ -325,7 +325,7 @@ public: whitelistedcidrs.clear(); requiredattributes.clear(); - base = tag->getString("baserdn"); + base = tag->getString("baserdn"); attribute = tag->getString("attribute"); killreason = tag->getString("killreason"); vhost = tag->getString("host"); diff --git a/src/modules/m_monitor.cpp b/src/modules/m_monitor.cpp index d1b10d5f3..4fd656a13 100644 --- a/src/modules/m_monitor.cpp +++ b/src/modules/m_monitor.cpp @@ -188,7 +188,7 @@ class IRCv3::Monitor::Manager } private: - typedef std::unordered_map<std::string, Entry, irc::insensitive, irc::StrHashComp> NickHash; + typedef std::unordered_map<std::string, Entry, irc::insensitive, irc::StrHashComp> NickHash; Entry* Find(const std::string& nick) { @@ -237,9 +237,9 @@ class IRCv3::Monitor::Manager return &extdata->list; } - NickHash nicks; - ExtItem ext; - WatchedList emptywatchedlist; + NickHash nicks; + ExtItem ext; + WatchedList emptywatchedlist; }; void IRCv3::Monitor::Manager::ExtItem::FromInternal(Extensible* container, const std::string& value) noexcept diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index cf957afc6..578a36ce3 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -40,7 +40,6 @@ class lwbNickHandler static bool Call(const std::string&); }; - /*,m_reverse_additionalUp[256];*/ static unsigned char m_reverse_additional[256],m_additionalMB[256],m_additionalUtf8[256],m_additionalUtf8range[256],m_additionalUtf8interval[256]; char utf8checkrest(unsigned char * mb, unsigned char cnt) @@ -411,7 +410,7 @@ class ModuleNationalChars : public Module if (*p == '0') { if (p[1] == 'x') - /* hex with the leading "0x" */ + /* hex with the leading "0x" */ chartable[i] = symtoi(p + 2, 16); else chartable[i] = symtoi(p + 1, 8); @@ -420,12 +419,13 @@ class ModuleNationalChars : public Module else if (*p == 'x') { chartable[i] = symtoi(p + 1, 16); - }else /* decimal form */ + } + else /* decimal form */ { chartable[i] = symtoi(p, 10); } } - else /* plain-text char between '' */ + else /* plain-text char between '' */ { if (*(p + 1) == '\\') { diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index 2ee355fc3..1f8a51f41 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -49,7 +49,7 @@ class CommandOjoin : public SplitCommand // Make sure the channel name is allowable. if (!ServerInstance->Channels.IsChannel(parameters[0])) { - user->WriteNotice("*** Invalid characters in channel name or name too long"); + user->WriteNumeric(ERR_BADCHANMASK, parameters[0], "Invalid channel name"); return CmdResult::FAILURE; } diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 5a570b3ad..1829ed0d8 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -45,7 +45,7 @@ class RemoveBase : public Command ChanModeReference& nokicksmode; public: - unsigned int protectedrank; + unsigned int protectedrank; RemoveBase(Module* Creator, bool& snk, ChanModeReference& nkm, const char* cmdn) : Command(Creator, cmdn, 2, 3) @@ -109,7 +109,7 @@ class RemoveBase : public Command { /* We'll let everyone remove their level and below, eg: * ops can remove ops, halfops, voices, and those with no mode (no moders actually are set to 1) - a services target will get a higher level than it's possible for a /remover to get..so they're safe. + * a services target will get a higher level than it's possible for a /remover to get..so they're safe. * Nobody may remove people with >= protectedrank rank. */ unsigned int ulevel = channel->GetPrefixValue(user); diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index bcbe18a5a..0b305257f 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -30,7 +30,7 @@ class ChannelSettings { public: - enum RepeatAction + enum RepeatAction { ACT_KICK, ACT_BLOCK, @@ -125,7 +125,7 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> > } public: - ModuleSettings ms; + ModuleSettings ms; SimpleExtItem<MemberInfo> MemberInfoExt; RepeatMode(Module* Creator) diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index aa7b94e8f..033f47900 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -210,7 +210,7 @@ class ModuleRLine , public Stats::EventListener { private: - Regex::EngineReference rxfactory; + Regex::EngineReference rxfactory; RLineFactory f; CommandRLine r; bool MatchOnNickChange; diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 8b06d54a4..32a79a90a 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -66,7 +66,7 @@ class CommandSajoin : public Command if (IS_LOCAL(user) && !ServerInstance->Channels.IsChannel(channel)) { /* we didn't need to check this for each character ;) */ - user->WriteNotice("*** Invalid characters in channel name or name too long"); + user->WriteNumeric(ERR_BADCHANMASK, channel, "Invalid channel name"); return CmdResult::FAILURE; } diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 01c441f53..e3d4ce4ef 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -287,13 +287,13 @@ class SaslAuthenticator switch (this->result) { - case SASL_OK: + case SASL_OK: this->user->WriteNumeric(RPL_SASLSUCCESS, "SASL authentication successful"); break; - case SASL_ABORT: + case SASL_ABORT: this->user->WriteNumeric(ERR_SASLABORTED, "SASL authentication aborted"); break; - case SASL_FAIL: + case SASL_FAIL: this->user->WriteNumeric(ERR_SASLFAIL, "SASL authentication failed"); break; } @@ -305,8 +305,8 @@ class SaslAuthenticator class CommandAuthenticate : public SplitCommand { private: - // The maximum length of an AUTHENTICATE request. - static const size_t MAX_AUTHENTICATE_SIZE = 400; + // The maximum length of an AUTHENTICATE request. + static const size_t MAX_AUTHENTICATE_SIZE = 400; public: SimpleExtItem<SaslAuthenticator>& authExt; diff --git a/src/modules/m_sha1.cpp b/src/modules/m_sha1.cpp index d4cdd9696..0cb87bc66 100644 --- a/src/modules/m_sha1.cpp +++ b/src/modules/m_sha1.cpp @@ -166,7 +166,7 @@ class SHA1Context class SHA1HashProvider : public HashProvider { public: - SHA1HashProvider(Module* mod) + SHA1HashProvider(Module* mod) : HashProvider(mod, "sha1", 20, 64) { } diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 404ddbb43..43d5d074c 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -42,8 +42,6 @@ class ShunFactory : public XLineFactory public: ShunFactory() : XLineFactory("SHUN") { } - /** Generate a shun - */ XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) override { return new Shun(set_time, duration, source, reason, xline_specific_mask); diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index e8012fc55..4df743b05 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -146,7 +146,7 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) { if (user->IsOper()) { - ShowLinks(server, user, hops+1); + ShowLinks(server, user, hops+1); } } else diff --git a/src/modules/m_spanningtree/nickcollide.cpp b/src/modules/m_spanningtree/nickcollide.cpp index f00ea2b70..0447d9548 100644 --- a/src/modules/m_spanningtree/nickcollide.cpp +++ b/src/modules/m_spanningtree/nickcollide.cpp @@ -78,8 +78,7 @@ bool SpanningTreeUtilities::DoCollision(User* u, TreeServer* server, time_t remo * if ident@ip is equal, and theirs is newer, or * ident@ip differ, and ours is newer */ - if((SamePerson && remotets < localts) || - (!SamePerson && remotets > localts)) + if ((SamePerson && remotets < localts) || (!SamePerson && remotets > localts)) { // Only remote needs to change bChangeLocal = false; diff --git a/src/modules/m_spanningtree/override_squit.cpp b/src/modules/m_spanningtree/override_squit.cpp index 72d34e87e..b46297b75 100644 --- a/src/modules/m_spanningtree/override_squit.cpp +++ b/src/modules/m_spanningtree/override_squit.cpp @@ -54,7 +54,7 @@ ModResult ModuleSpanningTree::HandleSquit(const CommandBase::Params& parameters, } else { - user->WriteNotice("*** SQUIT: The server \002" + parameters[0] + "\002 does not exist on the network."); + user->WriteNotice("*** SQUIT: The server \002" + parameters[0] + "\002 does not exist on the network."); } return MOD_RES_DENY; } diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index c3a03999e..89c2b9aec 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -55,10 +55,10 @@ * CONNECTING: indicates an outbound socket which is * waiting to be writeable. * WAIT_AUTH_1: indicates the socket is outbound and - * has successfully connected, but has not + * has successfully connected, but has not * yet sent and received SERVER strings. * WAIT_AUTH_2: indicates that the socket is inbound - * but has not yet sent and received + * but has not yet sent and received * SERVER strings. * CONNECTED: represents a fully authorized, fully * connected server. diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index fd42c57e9..532223818 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -50,7 +50,7 @@ class SpanningTreeUtilities : public Cullable CacheRefreshTimer RefreshTimer; public: - typedef std::set<TreeSocket*> TreeSocketSet; + typedef std::set<TreeSocket*> TreeSocketSet; typedef std::map<TreeSocket*, std::pair<std::string, unsigned int> > TimeoutList; /** Creator module diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index 5985ca95e..b83860166 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -239,7 +239,10 @@ class CommandSSLInfo : public SplitCommand } for (const auto& [u, _] : chan->GetUsers()) - HandleUserInternal(source, u, false); + { + if (!u->server->IsService()) + HandleUserInternal(source, u, false); + } return CmdResult::SUCCESS; } diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index e7b7027db..61865bffb 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -81,8 +81,6 @@ class SVSHoldFactory : public XLineFactory public: SVSHoldFactory() : XLineFactory("SVSHOLD") { } - /** Generate an SVSHOLD - */ XLine* Generate(time_t set_time, unsigned long duration, const std::string& source, const std::string& reason, const std::string& xline_specific_mask) override { return new SVSHold(set_time, duration, source, reason, xline_specific_mask); diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index fc3319b4d..2fe41140e 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -25,7 +25,8 @@ #include "iohook.h" #include "modules/hash.h" -#include <utf8.h> +#define UTF_CPP_CPLUSPLUS 199711L +#include <unchecked.h> static const char MagicGUID[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; static const char whitespace[] = " \t\r\n"; @@ -339,6 +340,11 @@ class WebSocketHook : public IOHookMiddle } } } + else + { + FailHandshake(sock, "HTTP/1.1 400 Bad Request\r\nConnection: close\r\n\r\n", "WebSocket: Received HTTP request that did not send the Origin header"); + return -1; + } if (!allowedorigin) { @@ -437,7 +443,7 @@ class WebSocketHook : public IOHookMiddle { // If we send messages as text then we need to ensure they are valid UTF-8. std::string encoded; - utf8::replace_invalid(message.begin(), message.end(), std::back_inserter(encoded)); + utf8::unchecked::replace_invalid(message.begin(), message.end(), std::back_inserter(encoded)); mysendq.push_back(PrepareSendQElem(encoded.length(), OP_TEXT)); mysendq.push_back(encoded); diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index a49208422..d399081e4 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -49,9 +49,9 @@ class ModuleXLineDB { /* Load the configuration * Note: - * This is on purpose not changed on a rehash. It would be non-trivial to change the database on-the-fly. - * Imagine a scenario where the new file already exists. Merging the current XLines with the existing database is likely a bad idea - * ...and so is discarding all current in-memory XLines for the ones in the database. + * This is on purpose not changed on a rehash. It would be non-trivial to change the database on-the-fly. + * Imagine a scenario where the new file already exists. Merging the current XLines with the existing database is likely a bad idea + * ...and so is discarding all current in-memory XLines for the ones in the database. */ auto Conf = ServerInstance->Config->ConfValue("xlinedb"); xlinedbpath = ServerInstance->Config->Paths.PrependData(Conf->getString("filename", "xline.db", 1)); @@ -120,7 +120,7 @@ class ModuleXLineDB * xline types may not have a conf tag, so let's just write them. * In addition, let's use a file version, so we can maintain some * semblance of backwards compatibility for reading on startup.. - * -- w00t + * -- w00t */ stream << "VERSION 1" << std::endl; |
