From ebcf1ac8f73785775eaac946a537e50bcb82f5b7 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 12 Dec 2017 20:20:33 +0000 Subject: [PATCH 01/20] Clarify the documentation of . --- docs/conf/inspircd.conf.example | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index 8ec6616bd..164f8130d 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -240,7 +240,9 @@ # you only want to adjust sendq and a password parent="main" - # allow: What IP addresses/hosts to allow for this block. + # allow: The IP address or hostname of clients that can use this + # class. You can specify either an exact match, a glob match, or + # a CIDR range here. allow="203.0.113.*" # hash: what hash this password is hashed with. requires the module @@ -320,7 +322,9 @@ # connect class inheriting. name="main" - # allow: What IP addresses/hosts to allow for this block. + # allow: The IP address or hostname of clients that can use this + # class. You can specify either an exact match, a glob match, or + # a CIDR range here. allow="*" # maxchans: Maximum number of channels a user in this class From 1b88e86f970124cb5c143fcd6ea85249d91ff3ad Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 4 Dec 2017 14:18:50 +0000 Subject: [PATCH 02/20] Fix m_xline_db storing the wrong setter in the XLine database. --- src/modules/m_xline_db.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 2237b0d08..fb2a6f65a 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -130,7 +130,7 @@ class ModuleXLineDB : public Module { XLine* line = i->second; fprintf(f, "LINE %s %s %s %lu %lu :%s\n", line->type.c_str(), line->Displayable(), - ServerInstance->Config->ServerName.c_str(), (unsigned long)line->set_time, (unsigned long)line->duration, line->reason.c_str()); + line->source.c_str(), (unsigned long)line->set_time, (unsigned long)line->duration, line->reason.c_str()); } } From 18ecf9d7e4056c4de789064508074266208e678f Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 4 Dec 2017 14:34:51 +0000 Subject: [PATCH 03/20] Fix m_spanningtree sending the wrong setter in S2S ADDLINE. --- src/modules/m_spanningtree/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 967b577b1..78d202c47 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -849,7 +849,7 @@ void ModuleSpanningTree::OnAddLine(User* user, XLine *x) parameterlist params; params.push_back(x->type); params.push_back(x->Displayable()); - params.push_back(ServerInstance->Config->ServerName); + params.push_back(x->source); params.push_back(ConvToStr(x->set_time)); params.push_back(ConvToStr(x->duration)); params.push_back(":" + x->reason); From 2989c948e4a7df75e0ff66d33b5f00c64c7ae87a Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 15 Dec 2017 12:05:30 +0000 Subject: [PATCH 04/20] Use HTTPS URLs in the executable file and include examples. --- docs/conf/inspircd.conf.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index 164f8130d..b131f15ea 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -53,7 +53,7 @@ # # # # # Executable include example: # -# +# # # @@ -443,7 +443,7 @@ # Example of an executable file include. Note this will be read on rehash, # not when the command is run. -# +# #-#-#-#-#-#-#-#-#-#-#-# MAXIMUM CHANNELS -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # # From 5307c897a3516f7bb23dbb79747f1d9aa7b1f6e6 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 16 Dec 2017 13:22:14 +0000 Subject: [PATCH 05/20] Always store something in the cgiirc hostname extension. This is used by modules like m_sasl to send the cgiirc hostname to services so it should contain something valid. Closes #1438. --- src/modules/m_cgiirc.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 9e1a546d6..6c94449b1 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -99,18 +99,14 @@ class CommandWebirc : public Command realhost.set(user, user->host); realip.set(user, user->GetIPString()); - bool host_ok = (parameters[2].length() < 64) && (parameters[2].find_first_not_of("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-") == std::string::npos); + // Check if we're happy with the provided hostname. If it's problematic then use the IP instead. + bool host_ok = (parameters[2].length() < 64) && (parameters[2].find_first_not_of("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:-") == std::string::npos); const std::string& newhost = (host_ok ? parameters[2] : parameters[3]); if (notify) ServerInstance->SNO->WriteGlobalSno('a', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", user->nick.c_str(), user->host.c_str(), newhost.c_str(), user->host.c_str()); - // Check if we're happy with the provided hostname. If it's problematic then make sure we won't set a host later, just the IP - if (host_ok) - webirc_hostname.set(user, parameters[2]); - else - webirc_hostname.unset(user); - + webirc_hostname.set(user, newhost); webirc_ip.set(user, parameters[3]); return CMD_SUCCESS; } From 05d92363f9aa4c89fd631426f78dd5299b667df2 Mon Sep 17 00:00:00 2001 From: B00mX0r Date: Wed, 20 Dec 2017 20:53:59 -0800 Subject: [PATCH 06/20] Fix two minor docs issues --- docs/conf/inspircd.conf.example | 8 ++++---- docs/conf/modules.conf.example | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index b131f15ea..893dfb5f0 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -724,10 +724,10 @@ # the ircd. This may be set for security reasons or vanity reasons. customversion="" - # operspywhois: show opers (users/auspex) the +s channels a user is in. Values: - # splitmsg Split with an explanatory message - # yes Split with no explanatory message - # no Do not show + # operspywhois: show opers (users/auspex) the +s and +p channels a user is in. Values: + # splitmsg Split secret/private from public channels with an explanatory message + # yes Show secret/private channels + # no Do not show secret/private channels operspywhois="no" # runasuser: If this is set, InspIRCd will attempt to switch diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index 7fb68995a..9c19e3e43 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -402,14 +402,14 @@ # that looks like the name of another channel on the network. # - + #allowrange=""> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Channelban: Implements extended ban j:, which stops anyone already @@ -426,26 +426,26 @@ # InspIRCd. You should use m_customprefix instead. # - + #deprotectothers="yes"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# From 758cf504f1b049c5a1b33f7f774042c5e3efaea5 Mon Sep 17 00:00:00 2001 From: Michael Hazell Date: Fri, 29 Dec 2017 18:16:39 -0500 Subject: [PATCH 07/20] m_chanhistory: optionally exempt bots from receiving history. Sending history to some bots can cause problems as without the IRCv3 chathistory batch they have no way of knowing what messages are history and what they should respond to. Closes #1450. --- docs/conf/modules.conf.example | 3 ++- src/modules/m_chanhistory.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index 9c19e3e43..4abd3ba58 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -383,7 +383,8 @@ # This is the hard limit for 'X'. # If notice is set to yes, joining users will get a NOTICE before playback # telling them about the following lines being the pre-join history. -# +# If bots is set to yes, it will also send to users marked with +B +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Channel logging module: Used to send snotice output to channels, to diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index e48e67fe5..08f316578 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -111,6 +111,7 @@ class ModuleChanHistory : public Module { HistoryMode m; bool sendnotice; + bool dobots; public: ModuleChanHistory() : m(this) { @@ -131,6 +132,7 @@ class ModuleChanHistory : public Module ConfigTag* tag = ServerInstance->Config->ConfValue("chanhistory"); m.maxlines = tag->getInt("maxlines", 50); sendnotice = tag->getBool("notice", true); + dobots = tag->getBool("bots", true); } void OnUserMessage(User* user,void* dest,int target_type, const std::string &text, char status, const CUList&) @@ -156,6 +158,9 @@ class ModuleChanHistory : public Module if (IS_REMOTE(memb->user)) return; + if (!dobots && ServerInstance->Modules->Find("m_botmode.so") && memb->user->IsModeSet('B')) + return; + HistoryList* list = m.ext.get(memb->chan); if (!list) return; From 8e5237cca1bf70ffe00291f48484d87b485908c8 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Thu, 25 Jan 2018 16:07:30 -0600 Subject: [PATCH 08/20] Make sure banredirect metadata can not be duplicated --- src/modules/m_banredirect.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 1b9e361bf..a0c9bc750 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -40,9 +40,17 @@ class BanRedirectEntry : targetchan(target), banmask(mask) { } + + bool operator<(const BanRedirectEntry& other) const + { + if (this->targetchan < other.targetchan) + return true; + + return this->banmask < other.banmask; + } }; -typedef std::vector BanRedirectList; +typedef std::set BanRedirectList; typedef std::deque StringDeque; class BanRedirect : public ModeWatcher @@ -180,7 +188,7 @@ class BanRedirect : public ModeWatcher } /* Here 'param' doesn't have the channel on it yet */ - redirects->push_back(BanRedirectEntry(mask[CHAN], param)); + redirects->insert(BanRedirectEntry(mask[CHAN], param)); /* Now it does */ param.append(mask[CHAN]); @@ -259,7 +267,7 @@ class ModuleBanRedirect : public Module for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++) { - modestack.Push('b', i->targetchan.insert(0, i->banmask)); + modestack.Push('b', i->banmask + i->targetchan); } for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++) From cf9fb00675cac902751f922018e4827f425dbca1 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Thu, 25 Jan 2018 19:12:23 -0600 Subject: [PATCH 09/20] Fix comparator logic for ordering by channel --- src/modules/m_banredirect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index a0c9bc750..64a5855ae 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -43,10 +43,10 @@ class BanRedirectEntry bool operator<(const BanRedirectEntry& other) const { - if (this->targetchan < other.targetchan) - return true; + if (targetchan != other.targetchan) + return targetchan < other.targetchan; - return this->banmask < other.banmask; + return banmask < other.banmask; } }; From 219e01b5ce7588efc5da9b8c5d1ce8e7a629b462 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Thu, 25 Jan 2018 21:34:40 -0600 Subject: [PATCH 10/20] Revert std::set changes and add duplicate checking in m_banredirect instead, as requested by @Adam- --- src/modules/m_banredirect.cpp | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 64a5855ae..1d35c2934 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -40,17 +40,9 @@ class BanRedirectEntry : targetchan(target), banmask(mask) { } - - bool operator<(const BanRedirectEntry& other) const - { - if (targetchan != other.targetchan) - return targetchan < other.targetchan; - - return banmask < other.banmask; - } }; -typedef std::set BanRedirectList; +typedef std::vector BanRedirectList; typedef std::deque StringDeque; class BanRedirect : public ModeWatcher @@ -186,9 +178,24 @@ class BanRedirect : public ModeWatcher redirects = new BanRedirectList; extItem.set(channel, redirects); } + else + { + for (BanRedirectList::iterator redir = redirects->begin(); redir != redirects->end(); ++redir) + { + // Mimic the functionality used when removing the mode + if ((irc::string(redir->targetchan.c_str()) == irc::string(mask[CHAN].c_str())) && (irc::string(redir->banmask.c_str()) == irc::string(param.c_str()))) + { + // Make sure the +b handler will still set the right ban + param.append(mask[CHAN]); + // Silently ignore the duplicate and don't set metadata + // This still allows channel ops to set/unset a redirect ban to clear "ghost" redirects + return true; + } + } + } /* Here 'param' doesn't have the channel on it yet */ - redirects->insert(BanRedirectEntry(mask[CHAN], param)); + redirects->push_back(BanRedirectEntry(mask[CHAN], param)); /* Now it does */ param.append(mask[CHAN]); @@ -267,7 +274,7 @@ class ModuleBanRedirect : public Module for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++) { - modestack.Push('b', i->banmask + i->targetchan); + modestack.Push('b', i->targetchan.insert(0, i->banmask)); } for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++) From f58ac460e63c83a01b6c889eb85329624f5ecc0f Mon Sep 17 00:00:00 2001 From: genius3000 Date: Sun, 11 Feb 2018 18:40:23 -0700 Subject: [PATCH 11/20] [2.0]: Helpop: Move extban 'U' from acting to matching Already fixed in master in 8587df2 --- docs/conf/helpop-full.conf.example | 4 ++-- docs/conf/helpop.conf.example | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf/helpop-full.conf.example b/docs/conf/helpop-full.conf.example index ed82c6e02..910689dfa 100644 --- a/docs/conf/helpop-full.conf.example +++ b/docs/conf/helpop-full.conf.example @@ -1051,6 +1051,8 @@ Matching extbans: an invite exception (requires operchans module). R: Matches users logged into a matching account (requires services account module). + U: Matches unregistered users matching the given banmask. + (requires services account module). Acting extbans: @@ -1074,8 +1076,6 @@ Acting extbans: users (requires stripcolor module). T: Blocks notices from matching users (requires nonotice module). - U: Blocks unregistered users matching the given banmask. - (requires services account). A ban given to an Acting extban may either be a nick!user@host mask (unless stated otherwise), matched against users as for a normal ban, diff --git a/docs/conf/helpop.conf.example b/docs/conf/helpop.conf.example index b4d3214f6..430b3ffd7 100644 --- a/docs/conf/helpop.conf.example +++ b/docs/conf/helpop.conf.example @@ -288,6 +288,8 @@ Matching extbans: an invite exception (requires operchans module). R: Matches users logged into a matching account (requires services account module). + U: Matches unregistered users matching the given banmask. + (requires services account module). Acting extbans: @@ -311,8 +313,6 @@ Acting extbans: users (requires stripcolor module). T: Blocks notices from matching users (requires nonotice module). - U: Blocks unregistered users matching the given banmask. - (requires services account). A ban given to an Acting extban may either be a nick!user@host mask (unless stated otherwise), matched against users as for a normal ban, From 4cfed4e5f68a1b9a2370dfceec3b97fb65e6ef46 Mon Sep 17 00:00:00 2001 From: Wade Cline Date: Fri, 2 Mar 2018 21:05:05 -0800 Subject: [PATCH 12/20] m_ssl_openssl: Remove deprecated API members. Backported from 2afc1af4639ae2bbef397f4f6acc834950017d91. --- src/modules/extra/m_ssl_openssl.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index aee7a5e34..f2189f257 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -33,6 +33,7 @@ #include "inspircd.h" #include #include +#include #include "ssl.h" #ifdef _WIN32 @@ -42,6 +43,15 @@ # define MAX_DESCRIPTORS 10000 #endif +// Compatibility layer to allow OpenSSL 1.0 to use the 1.1 API. +#if ((defined LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)) +# define X509_getm_notAfter X509_get_notAfter +# define X509_getm_notBefore X509_get_notBefore +# define OPENSSL_init_ssl(OPTIONS, SETTINGS) \ + SSL_library_init(); \ + SSL_load_error_strings(); +#endif + /* $ModDesc: Provides SSL support for clients */ /* $LinkerFlags: if("USE_FREEBSD_BASE_SSL") -lssl -lcrypto */ @@ -216,8 +226,7 @@ class ModuleSSLOpenSSL : public Module sessions = new issl_session[ServerInstance->SE->GetMaxFds()]; /* Global SSL library initialization*/ - SSL_library_init(); - SSL_load_error_strings(); + OPENSSL_init_ssl(0, NULL); /* Build our SSL contexts: * NOTE: OpenSSL makes us have two contexts, one for servers and one for clients. ICK. @@ -835,7 +844,7 @@ class ModuleSSLOpenSSL : public Module certinfo->fingerprint = irc::hex(md, n); } - if ((ASN1_UTCTIME_cmp_time_t(X509_get_notAfter(cert), ServerInstance->Time()) == -1) || (ASN1_UTCTIME_cmp_time_t(X509_get_notBefore(cert), ServerInstance->Time()) == 0)) + if ((ASN1_UTCTIME_cmp_time_t(X509_getm_notAfter(cert), ServerInstance->Time()) == -1) || (ASN1_UTCTIME_cmp_time_t(X509_getm_notBefore(cert), ServerInstance->Time()) == 0)) { certinfo->error = "Not activated, or expired certificate"; } From fdeccd7dd366ebac516ed66841fbf7f0952d8ed2 Mon Sep 17 00:00:00 2001 From: genius3000 Date: Fri, 30 Mar 2018 10:08:22 -0600 Subject: [PATCH 13/20] Update the GeoIP ExtItem when CGI:IRC sets the real IP (#1471) Since CGI:IRC calls it's 'ChangeIP()' either from 'OnCheckReady()' or 'OnUserRegister()', both of which are called after the user has sent NICK/USER, we can safely skip re-setting the ExtItem prior to this point. This skips the first 'OnSetUserIP()' from 'User::AddUser()' as the 'OnSetConnectClass()' catch handles the initial setting. --- src/modules/extra/m_geoip.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp index a36c39bc8..03b7a55f7 100644 --- a/src/modules/extra/m_geoip.cpp +++ b/src/modules/extra/m_geoip.cpp @@ -58,7 +58,7 @@ class ModuleGeoIP : public Module throw ModuleException("Unable to initialize geoip, are you missing GeoIP.dat?"); ServerInstance->Modules->AddService(ext); - Implementation eventlist[] = { I_OnSetConnectClass, I_OnStats }; + Implementation eventlist[] = { I_OnSetConnectClass, I_OnSetUserIP, I_OnStats }; ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i) @@ -99,6 +99,13 @@ class ModuleGeoIP : public Module return MOD_RES_DENY; } + void OnSetUserIP(LocalUser* user) + { + // If user has sent NICK/USER, re-set the ExtItem as this is likely CGI:IRC changing the IP + if (user->registered == REG_NICKUSER) + SetExt(user); + } + ModResult OnStats(char symbol, User* user, string_list &out) { if (symbol != 'G') From 1cc4cf341c6c8c1288fb25678bd36678d6a205a5 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 26 Mar 2018 05:52:35 -0600 Subject: [PATCH 14/20] Set User::host before calling ChangeIP() ChangeIP() calls SetClientIP() which revalidates whether the user matches an ELine. However, because the hostname has not changed yet the user may incorrectly be marked as non-exempt. --- src/modules/m_cgiirc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 6c94449b1..482c6447c 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -201,8 +201,8 @@ class ModuleCgiIRC : public Module { cmd.realhost.set(user, user->host); cmd.realip.set(user, user->GetIPString()); - ChangeIP(user, newip); user->host = user->dhost = user->GetIPString(); + ChangeIP(user, newip); user->InvalidateCache(); RecheckClass(user); // Don't create the resolver if the core couldn't put the user in a connect class or when dns is disabled @@ -296,10 +296,10 @@ public: if (!webirc_ip) return MOD_RES_PASSTHRU; - ChangeIP(user, *webirc_ip); - std::string* webirc_hostname = cmd.webirc_hostname.get(user); user->host = user->dhost = (webirc_hostname ? *webirc_hostname : user->GetIPString()); + + ChangeIP(user, *webirc_ip); user->InvalidateCache(); RecheckClass(user); From 3203d698ae8b2e69043ad3940e739b6bd1eb80e8 Mon Sep 17 00:00:00 2001 From: genius3000 Date: Mon, 26 Mar 2018 05:57:22 -0600 Subject: [PATCH 15/20] Fix ELine::Matches returning false on existing match When checking for an E-Line match, we want to actually check for a current match even if we previously matched and are set exempt. This fixes situations where you have an E-Lined CGI:IRC address, a G-Lined IP range for some area/host/etc and a smaller E-Lined IP range for known good clients. Currently when CGI:IRC changes the IP, E-Lines are rechecked but because the user is already exempt (from the CGI:IRC E-Line), they are set no longer exempt and match a G-Line, when they should match an E-Line. This exact change has been done before in commit 'c8b344e' and shortly reverted in 'c490a90' to fix issue #989 (CGI:IRC users remaining exempt when the CGI:IRC address is E-Lined but they are not). The actual cause to this issue was likely that the user's hostname was not changed from the CGI:IRC hostname/IP prior to rechecking E-Lines. This is being fixed in a separate commit. --- src/xline.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/xline.cpp b/src/xline.cpp index 0506005ad..586c7342a 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -593,9 +593,6 @@ void GLine::Apply(User* u) bool ELine::Matches(User *u) { - if (u->exempt) - return false; - if (InspIRCd::Match(u->ident, this->identmask, ascii_case_insensitive_map)) { if (InspIRCd::MatchCIDR(u->host, this->hostmask, ascii_case_insensitive_map) || From aa19c8fc021ce1cc704434a2c5a19e1517132c79 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 21 Jan 2018 13:33:44 +0000 Subject: [PATCH 16/20] Remove swhois messages set in the oper block on deoper. Closes #1240. --- include/modules.h | 9 +++++++-- src/modules.cpp | 1 + src/modules/m_swhois.cpp | 37 +++++++++++++++++++++++++++++++++---- src/users.cpp | 1 + 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/include/modules.h b/include/modules.h index 4d4d0871f..b16dcc49a 100644 --- a/include/modules.h +++ b/include/modules.h @@ -116,7 +116,7 @@ struct ModResult { * and numerical comparisons in preprocessor macros if they wish to support * multiple versions of InspIRCd in one file. */ -#define INSPIRCD_VERSION_API 10 +#define INSPIRCD_VERSION_API 11 /** * This #define allows us to call a method in all @@ -332,7 +332,7 @@ enum Implementation I_OnUserPostNick, I_OnPreMode, I_On005Numeric, I_OnKill, I_OnRemoteKill, I_OnLoadModule, I_OnUnloadModule, I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite, I_OnRawMode, I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckChannelBan, I_OnExtBanCheck, - I_OnStats, I_OnChangeLocalUserHost, I_OnPreTopicChange, + I_OnStats, I_OnChangeLocalUserHost, I_OnPreTopicChange, I_OnPostDeoper, I_OnPostTopicChange, I_OnEvent, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan, I_OnDelBan, I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnPostCommand, I_OnPostJoin, @@ -555,6 +555,11 @@ class CoreExport Module : public classbase, public usecountbase */ virtual void OnPostOper(User* user, const std::string &opername, const std::string &opertype); + /** Called after a user deopers locally. + * @param user The user who has deopered. + */ + virtual void OnPostDeoper(User* user); + /** Called whenever a user types /INFO. * The User will contain the information of the user who typed the command. Modules may use this * method to output their own credits in /INFO (which is the ircd's version of an about box). diff --git a/src/modules.cpp b/src/modules.cpp index 79a33e617..7df7579bf 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -99,6 +99,7 @@ ModResult Module::OnUserPreJoin(User*, Channel*, const char*, std::string&, cons void Module::OnMode(User*, void*, int, const std::vector&, const std::vector&) { } void Module::OnOper(User*, const std::string&) { } void Module::OnPostOper(User*, const std::string&, const std::string &) { } +void Module::OnPostDeoper(User*) { } void Module::OnInfo(User*) { } void Module::OnWhois(User*, User*) { } ModResult Module::OnUserPreInvite(User*, User*, Channel*, time_t) { return MOD_RES_PASSTHRU; } diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index 742781747..b29d268d1 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -32,8 +32,12 @@ class CommandSwhois : public Command { public: + LocalIntExt operblock; StringExtItem swhois; - CommandSwhois(Module* Creator) : Command(Creator,"SWHOIS", 2,2), swhois("swhois", Creator) + CommandSwhois(Module* Creator) + : Command(Creator,"SWHOIS", 2,2) + , operblock("swhois_operblock", Creator) + , swhois("swhois", Creator) { flags_needed = 'o'; syntax = " :"; TRANSLATE3(TR_NICK, TR_TEXT, TR_END); @@ -63,6 +67,7 @@ class CommandSwhois : public Command ServerInstance->SNO->WriteGlobalSno('a', "%s used SWHOIS to set %s's extra whois to '%s'", user->nick.c_str(), dest->nick.c_str(), parameters[1].c_str()); } + operblock.set(user, 0); if (parameters[1].empty()) swhois.unset(dest); else @@ -92,9 +97,9 @@ class ModuleSWhois : public Module void init() { - ServerInstance->Modules->AddService(cmd); - ServerInstance->Modules->AddService(cmd.swhois); - Implementation eventlist[] = { I_OnWhoisLine, I_OnPostOper }; + ServiceProvider* providerlist[] = { &cmd, &cmd.operblock, &cmd.swhois }; + ServerInstance->Modules->AddServices(providerlist, sizeof(providerlist)/sizeof(ServiceProvider*)); + Implementation eventlist[] = { I_OnWhoisLine, I_OnPostOper, I_OnPostDeoper, I_OnDecodeMetaData }; ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } @@ -126,10 +131,34 @@ class ModuleSWhois : public Module if (!swhois.length()) return; + cmd.operblock.set(user, 1); cmd.swhois.set(user, swhois); ServerInstance->PI->SendMetaData(user, "swhois", swhois); } + void OnPostDeoper(User* user) + { + std::string* swhois = cmd.swhois.get(user); + if (!swhois) + return; + + if (!cmd.operblock.get(user)) + return; + + cmd.operblock.set(user, 0); + cmd.swhois.unset(user); + ServerInstance->PI->SendMetaData(user, "swhois", ""); + } + + void OnDecodeMetaData(Extensible* target, const std::string& extname, const std::string&) + { + // XXX: We use a dynamic_cast in m_services_account so I used one + // here but do we actually need it or is static_cast okay? + User* dest = dynamic_cast(target); + if (dest && (extname == "swhois")) + cmd.operblock.set(dest, 0); + } + ~ModuleSWhois() { } diff --git a/src/users.cpp b/src/users.cpp index 9e06485e5..ac87f1187 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -692,6 +692,7 @@ void User::UnOper() ServerInstance->Users->all_opers.remove(this); this->modes[UM_OPERATOR] = 0; + FOREACH_MOD(I_OnPostDeoper, OnPostDeoper(this)); } /* adds or updates an entry in the whowas list */ From 3243c7d238fb347f5a239b8bc34af47b1281d874 Mon Sep 17 00:00:00 2001 From: B00mX0r Date: Sun, 8 Apr 2018 17:28:37 -0700 Subject: [PATCH 17/20] Fix blank instead of empty PART message when a user is shunned --- src/modules/m_shun.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 3147d5476..98e63f026 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -280,7 +280,7 @@ class ModuleShun : public Module else if ((command == "PART") && (parameters.size() > 1)) { /* same for PART */ - parameters[1].clear(); + parameters.pop_back(); } /* if we're here, allow the command. */ From ecfa0d3847d96cd63ddb5c814f99d2020c8b0a2e Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 12 Apr 2018 00:30:53 +0100 Subject: [PATCH 18/20] Fix ModuleManager's external source lists not working with HTTPS. --- modulemanager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modulemanager b/modulemanager index bc4619408..f00234994 100755 --- a/modulemanager +++ b/modulemanager @@ -99,7 +99,7 @@ sub parse_url { $mod->{description} = $1; } elsif (/^mask (.*)/) { $mod->{mask} = $1; - } elsif (m#^source (http://\S+)#) { + } elsif (/^source (\S+)/) { parse_url $1; } else { print "Unknown line in $src: $_\n"; From a2dcf9a1ad535e270cc6816373aa91a3bcdd06be Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Mon, 16 Apr 2018 03:02:49 -0600 Subject: [PATCH 19/20] Improve some documentation (#1483). * Improve exemptchanops in inspircd.conf.example () and modules.conf.example; along with both helpop examples. * Add "the" to all "requires X module" in both helpop examples. * Refer to customprefix instead of chanprotect and halfop. * Add SNOMASK 'r' and 'R' (OPERLOG) to both helpop examples. * Clean up unnecessarily split SNOMASK lines in both helpop examples. * Move chmode 'g' to be in alphabetical order in both helpops examples. * Specify the needed mask formats for TLINE in helpop-full example. * Remove extra '\' in RLINE mask format in helpop-full example. Force xml format in helpop-full * Generalize "color codes" to "formatting codes" * Fix file name in include for example helpop-full --- docs/conf/helpop-full.conf.example | 220 ++++++++++++++++------------- docs/conf/helpop.conf.example | 193 ++++++++++++------------- docs/conf/inspircd.conf.example | 34 ++++- docs/conf/modules.conf.example | 12 +- 4 files changed, 252 insertions(+), 207 deletions(-) diff --git a/docs/conf/helpop-full.conf.example b/docs/conf/helpop-full.conf.example index 910689dfa..72ec2a7d4 100644 --- a/docs/conf/helpop-full.conf.example +++ b/docs/conf/helpop-full.conf.example @@ -2,6 +2,8 @@ # Helpop Standard # ##################### + + Returns the ip and nickname of the given users."> - +(by IP address or by hostname). Mask should be given as either a +nick!user@host or user@IP (wildcards acceptable)."> ---------- c Blocks private messages and notices from users who do - not share a common channel with you (requires + not share a common channel with you (requires the commonchans module). d Deaf mode. User will not receive any messages or notices - from channels they are in (requires deaf module). + from channels they are in (requires the deaf module). g In combination with /ACCEPT, provides for server side - ignore (requires callerid module). + ignore (requires the callerid module). h Marks as 'available for help' in WHOIS (IRCop only, - requires helpop module). + requires the helpop module). i Makes invisible to /WHO if the user using /WHO is not in a common channel. k Prevents the user from being kicked from channels, or having op modes removed from them (services only, - requires servprotect module). + requires the servprotect module). o Marks as a IRC operator. s Receives server notices specified by (IRCop only). r Marks as a having a registered nickname - (requires services account module). + (requires the services account module). w Receives wallops messages. - x Gives a cloaked hostname (requires cloaking module). - B Marks as a bot (requires botmode module). + x Gives a cloaked hostname (requires the cloaking module). + B Marks as a bot (requires the botmode module). G Censors messages sent to the user based on filters - configured for the network (requires censor module). - H Hides an oper's oper status from WHOIS (requires + configured for the network (requires the censor module). + H Hides an oper's oper status from WHOIS (requires the hideoper module). I Hides a user's entire channel list in WHOIS from - non-IRCops (requires hidechans module). + non-IRCops (requires the hidechans module). L Stops redirections done by m_redirect (mode must be enabled in the config). R Blocks private messages from unregistered users - (requires services account module). - S Strips mIRC color/bold/underline codes out of private - messages to the user (requires stripcolor module). + (requires the services account module). + S Strips formatting codes out of private messages + to the user (requires the stripcolor module). W Receives notification when a user uses WHOIS on them - (IRCop only, requires showwhois module)."> + (IRCop only, requires the showwhois module)."> p Make channel private, hiding it in users' whoises and replacing it with * in /LIST. r Marks the channel as registered with Services - (requires services account module). + (requires the services account module). s Make channel secret, hiding it in users' whoises and /LIST. t Prevents users without +h or +o from changing the topic. u Makes the channel an auditorium; normal users only see themselves or themselves and the operators, - while operators see all the users (requires + while operators see all the users (requires the auditorium module). w : Adds basic channel access controls of to , via the +w listmode. For example, +w o:R:Brain will op anyone identified to the account 'Brain' on join. - (requires autoop module) + (requires the autoop module) z Blocks non-SSL clients from joining the channel. A Allows anyone to invite users to the channel (normally only chanops can invite, requires - allowinvite module). + the allowinvite module). B Blocks messages with too many capital letters, as determined by the network configuration - (requires blockcaps module). - C Blocks any CTCPs to the channel (requires noctcp - module). - D Delays join messages from users until they - message the channel (requires delayjoin module). + (requires the blockcaps module). + C Blocks any CTCPs to the channel (requires the + noctcp module). + D Delays join messages from users until they message + the channel (requires the delayjoin module). F : Blocks nick changes when they equal or exceed the - specified rate (requires nickflood module). + specified rate (requires the nickflood module). G Censors messages to the channel based on the - network configuration (requires censor module). + network configuration (requires the censor module). H : Displays the last lines of chat to joining users. is the maximum time to keep - lines in the history buffer (requires chanhistory - module). + lines in the history buffer (requires the + chanhistory module). J Prevents rejoin after kick for the specified number of seconds. This prevents auto-rejoin - (requires kicknorejoin module). + (requires the kicknorejoin module). K Blocks /KNOCK on the channel. L If the channel reaches its limit set by +l, - redirect users to (requires redirect - module). + redirect users to (requires the + redirect module). M Blocks unregistered users from speaking (requires - services account module). + the services account module). N Prevents users on the channel from changing nick - (requires nonicks module). + (requires the nonicks module). O Channel is IRCops only (can only be set by IRCops, - requires operchans module). + requires the operchans module). P Makes the channel permanent; Bans, invites, the topic, modes, and such will not be lost when it empties (can only be set by IRCops, requires - permchannels module). + the permchannels module). Q Only ulined servers and their users can kick - (requires nokicks module) + (requires the nokicks module) R Blocks unregistered users from joining (requires - services account module). - S Strips mIRC color codes from messages to the - channel (requires stripcolor module). + the services account module). + S Strips formatting codes from messages to the + channel (requires the stripcolor module). T Blocks /NOTICEs to the channel from users who are - not at least halfop (requires nonotice module). + not at least halfop (requires the nonotice module). + X : Makes users of or higher exempt to the + specified restriction . For example: flood:h + (requires the exemptchanops module). + Possible restriction types to exempt with +X are: - g Blocks messages matching the given glob mask - (requires chanfilter module). - X Makes channel operators immune to the specified - restrictive mode (requires exemptchanops module). + auditorium-see Permission required to see the full user list of + a +u channel (requires the auditorium module). + auditorium-vis Permission required to be visible in a +u channel + (requires the auditorium module). + blockcaps Channel mode +B + blockcolor Channel mode +c + censor Channel mode +G + filter Channel mode +g + flood Channel mode +f + nickflood Channel mode +F + noctcp Channel mode +C + nonick Channel mode +N + nonotice Channel mode +T + regmoderated Channel mode +M + stripcolor Channel mode +S + topiclock Channel mode +t ------------- NOTE: A large number of these modes are dependent upon server-side modules @@ -992,30 +1013,25 @@ Note that all /STATS use is broadcast to online IRC operators."> A Allows receipt of remote announcement messages. c Allows receipt of local connect messages. C Allows receipt of remote connect messages. - d Allows receipt of general (and sometimes random) debug - messages. + d Allows receipt of general (and sometimes random) debug messages. f Allows receipt of flooding notices. - g Allows receipt of globops (requires globops module). - j Allows receipt of channel creation notices (requires - chancreate module). - J Allows receipt of remote channel creation notices (requires - chancreate module). + g Allows receipt of globops (requires the globops module). + j Allows receipt of channel creation notices (requires the chancreate module). + J Allows receipt of remote channel creation notices (requires the chancreate module). k Allows receipt of local kill messages. K Allows receipt of remote kill messages. - l Allows receipt of local linking related - messages. - L Allows receipt of remote linking related - messages. - n See local nickname changes (requires seenicks module). - N See remote nickname changes (requires seenicks modules). - o Allows receipt of oper-up, oper-down, and oper-failure - messages. - O Allows receipt of remote oper-up, oper-down, and oper-failure - messages. + l Allows receipt of local linking related messages. + L Allows receipt of remote linking related messages. + n See local nickname changes (requires the seenicks module). + N See remote nickname changes (requires the seenicks modules). + o Allows receipt of oper-up, oper-down, and oper-failure messages. + O Allows receipt of remote oper-up, oper-down, and oper-failure messages. q Allows receipt of local quit messages. Q Allows receipt of remote quit messages. + r Allows receipt of local oper commands (requires the operlog module). + R Allows receipt of remote oper commands (requires the operlog module). t Allows receipt of attempts to use /STATS (local and remote). - v Allows receipt of oper-override notices (requires override module). + v Allows receipt of oper-override notices (requires the override module). x Allows receipt of local Xline notices (g/Z/q/k/e/R/shuns). X Allows receipt of remote Xline notices (g/Z/q/k/e/R/shuns)."> @@ -1040,42 +1056,42 @@ setting +I . Matching extbans: j: Matches anyone in the given channel. Does not support - wildcards (requires channelban module). - r: Matches users with a matching realname (requires gecosban - module). - s: Matches users on a matching server (requires serverban - module). + wildcards (requires the channelban module). + r: Matches users with a matching realname (requires the + gecosban module). + s: Matches users on a matching server (requires the + serverban module). z: Matches users having the given SSL certificate - fingerprint (requires sslmodes module). + fingerprint (requires the sslmodes module). O: Matches IRCops of a matching type, mostly useful as an - an invite exception (requires operchans module). + an invite exception (requires the operchans module). R: Matches users logged into a matching account (requires - services account module). + the services account module). U: Matches unregistered users matching the given banmask. - (requires services account module). + (requires the services account module). Acting extbans: - c: Blocks any messages that contain color codes from - matching users (requires blockcolor module). - m: Blocks messages from matching users (requires muteban + c: Blocks any messages that contain formatting codes from + matching users (requires the blockcolor module). + m: Blocks messages from matching users (requires the muteban module). Users with +v or above are not affected. p: Blocks part messages from matching users (requires - nopartmsg module). + the nopartmsg module). A: Blocks invites by matching users even when +A is set - (requires allowinvite module). + (requires the allowinvite module). B: Blocks all capital or nearly all capital messages from - matching users (requires blockcaps module). - C: Blocks CTCPs from matching users (requires noctcp + matching users (requires the blockcaps module). + C: Blocks CTCPs from matching users (requires the noctcp module). N: Blocks nick changes from matching users (requires - nonicks module). - Q: Blocks kicks by matching users (requires nokicks - module). - S: Strips color/bold/underline from messages from matching - users (requires stripcolor module). - T: Blocks notices from matching users (requires nonotice + the nonicks module). + Q: Blocks kicks by matching users (requires the nokicks module). + S: Strips formatting codes from messages from matching + users (requires the stripcolor module). + T: Blocks notices from matching users (requires the + nonotice module). A ban given to an Acting extban may either be a nick!user@host mask (unless stated otherwise), matched against users as for a normal ban, @@ -1084,4 +1100,4 @@ or a Matching extban. There is an additional special type of extended ban, a redirect ban: Redirect n!u@h#channel will redirect the banned user to #channel - when they try to join (requires banredirect module)."> + when they try to join (requires the banredirect module)."> diff --git a/docs/conf/helpop.conf.example b/docs/conf/helpop.conf.example index 430b3ffd7..bdd3c4605 100644 --- a/docs/conf/helpop.conf.example +++ b/docs/conf/helpop.conf.example @@ -76,77 +76,79 @@ LOCKSERV UNLOCKSERV"> ---------- c Blocks private messages and notices from users who do - not share a common channel with you (requires + not share a common channel with you (requires the commonchans module). d Deaf mode. User will not receive any messages or notices - from channels they are in (requires deaf module). + from channels they are in (requires the deaf module). g In combination with /ACCEPT, provides for server side - ignore (requires callerid module). + ignore (requires the callerid module). h Marks as 'available for help' in WHOIS (IRCop only, - requires helpop module). + requires the helpop module). i Makes invisible to /WHO if the user using /WHO is not in a common channel. k Prevents the user from being kicked from channels, or having op modes removed from them (services only, - requires servprotect module). + requires the servprotect module). o Marks as a IRC operator. s Receives server notices specified by (IRCop only). r Marks as a having a registered nickname - (requires services account module). + (requires the services account module). w Receives wallops messages. - x Gives a cloaked hostname (requires cloaking module). - B Marks as a bot (requires botmode module). + x Gives a cloaked hostname (requires the cloaking module). + B Marks as a bot (requires the botmode module). G Censors messages sent to the user based on filters - configured for the network (requires censor module). - H Hides an oper's oper status from WHOIS (requires + configured for the network (requires the censor module). + H Hides an oper's oper status from WHOIS (requires the hideoper module). I Hides a user's entire channel list in WHOIS from - non-IRCops (requires hidechans module). + non-IRCops (requires the hidechans module). L Stops redirections done by m_redirect (mode must be enabled in the config). R Blocks private messages from unregistered users - (requires services account module). - S Strips mIRC color/bold/underline codes out of private - messages to the user (requires stripcolor module). + (requires the services account module). + S Strips formatting codes out of private messages + to the user (requires the stripcolor module). W Receives notification when a user uses WHOIS on them - (IRCop only, requires showwhois module)."> + (IRCop only, requires the showwhois module)."> p Make channel private, hiding it in users' whoises and replacing it with * in /LIST. r Marks the channel as registered with Services - (requires services account module). + (requires the services account module). s Make channel secret, hiding it in users' whoises and /LIST. t Prevents users without +h or +o from changing the topic. u Makes the channel an auditorium; normal users only see themselves or themselves and the operators, - while operators see all the users (requires + while operators see all the users (requires the auditorium module). w : Adds basic channel access controls of to , via the +w listmode. For example, +w o:R:Brain will op anyone identified to the account 'Brain' on join. - (requires autoop module) + (requires the autoop module) z Blocks non-SSL clients from joining the channel. A Allows anyone to invite users to the channel (normally only chanops can invite, requires - allowinvite module). + the allowinvite module). B Blocks messages with too many capital letters, as determined by the network configuration - (requires blockcaps module). - C Blocks any CTCPs to the channel (requires noctcp - module). - D Delays join messages from users until they - message the channel (requires delayjoin module). + (requires the blockcaps module). + C Blocks any CTCPs to the channel (requires the + noctcp module). + D Delays join messages from users until they message + the channel (requires the delayjoin module). F : Blocks nick changes when they equal or exceed the - specified rate (requires nickflood module). + specified rate (requires the nickflood module). G Censors messages to the channel based on the - network configuration (requires censor module). + network configuration (requires the censor module). H : Displays the last lines of chat to joining users. is the maximum time to keep - lines in the history buffer (requires chanhistory - module). + lines in the history buffer (requires the + chanhistory module). J Prevents rejoin after kick for the specified number of seconds. This prevents auto-rejoin - (requires kicknorejoin module). + (requires the kicknorejoin module). K Blocks /KNOCK on the channel. L If the channel reaches its limit set by +l, - redirect users to (requires redirect - module). + redirect users to (requires the + redirect module). M Blocks unregistered users from speaking (requires - services account module). + the services account module). N Prevents users on the channel from changing nick - (requires nonicks module). + (requires the nonicks module). O Channel is IRCops only (can only be set by IRCops, - requires operchans module). + requires the operchans module). P Makes the channel permanent; Bans, invites, the topic, modes, and such will not be lost when it empties (can only be set by IRCops, requires - permchannels module). + the permchannels module). Q Only ulined servers and their users can kick - (requires nokicks module) + (requires the nokicks module) R Blocks unregistered users from joining (requires - services account module). - S Strips mIRC color codes from messages to the - channel (requires stripcolor module). + the services account module). + S Strips formatting codes from messages to the + channel (requires the stripcolor module). T Blocks /NOTICEs to the channel from users who are - not at least halfop (requires nonotice module). - - g Blocks messages matching the given glob mask - (requires chanfilter module). - X Makes channel operators immune to the specified - restrictive mode (requires exemptchanops module). + not at least halfop (requires the nonotice module). + X : Makes users of or higher exempt to the + specified restriction . For example: flood:h + (requires the exemptchanops module). ------------- NOTE: A large number of these modes are dependent upon server-side modules @@ -233,30 +233,25 @@ help channel if you have any questions."> A Allows receipt of remote announcement messages. c Allows receipt of local connect messages. C Allows receipt of remote connect messages. - d Allows receipt of general (and sometimes random) debug - messages. + d Allows receipt of general (and sometimes random) debug messages. f Allows receipt of flooding notices. - g Allows receipt of globops (requires globops module). - j Allows receipt of channel creation notices (requires - chancreate module). - J Allows receipt of remote channel creation notices (requires - chancreate module). + g Allows receipt of globops (requires the globops module). + j Allows receipt of channel creation notices (requires the chancreate module). + J Allows receipt of remote channel creation notices (requires the chancreate module). k Allows receipt of local kill messages. K Allows receipt of remote kill messages. - l Allows receipt of local linking related - messages. - L Allows receipt of remote linking related - messages. - n See local nickname changes (requires seenicks module). - N See remote nickname changes (requires seenicks modules). - o Allows receipt of oper-up, oper-down, and oper-failure - messages. - O Allows receipt of remote oper-up, oper-down, and oper-failure - messages. + l Allows receipt of local linking related messages. + L Allows receipt of remote linking related messages. + n See local nickname changes (requires the seenicks module). + N See remote nickname changes (requires the seenicks modules). + o Allows receipt of oper-up, oper-down, and oper-failure messages. + O Allows receipt of remote oper-up, oper-down, and oper-failure messages. q Allows receipt of local quit messages. Q Allows receipt of remote quit messages. + r Allows receipt of local oper commands (requires the operlog module). + R Allows receipt of remote oper commands (requires the operlog module). t Allows receipt of attempts to use /STATS (local and remote). - v Allows receipt of oper-override notices (requires override module). + v Allows receipt of oper-override notices (requires the override module). x Allows receipt of local Xline notices (g/Z/q/k/e/R/shuns). X Allows receipt of remote Xline notices (g/Z/q/k/e/R/shuns)."> @@ -277,42 +272,42 @@ setting +I . Matching extbans: j: Matches anyone in the given channel. Does not support - wildcards (requires channelban module). - r: Matches users with a matching realname (requires gecosban - module). - s: Matches users on a matching server (requires serverban - module). + wildcards (requires the channelban module). + r: Matches users with a matching realname (requires the + gecosban module). + s: Matches users on a matching server (requires the + serverban module). z: Matches users having the given SSL certificate - fingerprint (requires sslmodes module). + fingerprint (requires the sslmodes module). O: Matches IRCops of a matching type, mostly useful as an - an invite exception (requires operchans module). + an invite exception (requires the operchans module). R: Matches users logged into a matching account (requires - services account module). + the services account module). U: Matches unregistered users matching the given banmask. - (requires services account module). + (requires the services account module). Acting extbans: - c: Blocks any messages that contain color codes from - matching users (requires blockcolor module). - m: Blocks messages from matching users (requires muteban + c: Blocks any messages that contain formatting codes from + matching users (requires the blockcolor module). + m: Blocks messages from matching users (requires the muteban module). Users with +v or above are not affected. p: Blocks part messages from matching users (requires - nopartmsg module). + the nopartmsg module). A: Blocks invites by matching users even when +A is set - (requires allowinvite module). + (requires the allowinvite module). B: Blocks all capital or nearly all capital messages from - matching users (requires blockcaps module). - C: Blocks CTCPs from matching users (requires noctcp + matching users (requires the blockcaps module). + C: Blocks CTCPs from matching users (requires the noctcp module). N: Blocks nick changes from matching users (requires - nonicks module). - Q: Blocks kicks by matching users (requires nokicks - module). - S: Strips color/bold/underline from messages from matching - users (requires stripcolor module). - T: Blocks notices from matching users (requires nonotice + the nonicks module). + Q: Blocks kicks by matching users (requires the nokicks module). + S: Strips formatting codes from messages from matching + users (requires the stripcolor module). + T: Blocks notices from matching users (requires the + nonotice module). A ban given to an Acting extban may either be a nick!user@host mask (unless stated otherwise), matched against users as for a normal ban, @@ -321,4 +316,4 @@ or a Matching extban. There is an additional special type of extended ban, a redirect ban: Redirect n!u@h#channel will redirect the banned user to #channel - when they try to join (requires banredirect module)."> + when they try to join (requires the banredirect module)."> diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index 893dfb5f0..d54cdc916 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -613,8 +613,38 @@ # banned from the server. moronbanner="You're banned! Email abuse@example.com with the ERROR line below for help." - # exemptchanops: exemptions for channel access restrictions based on prefix. - exemptchanops="nonick:v flood:o" + # exemptchanops: Allows users with with a status mode to be exempt + # from various channel restrictions. Possible restrictions are: + # - auditorium-see Permission required to see the full user list of + # a +u channel (requires the auditorium module). + # - auditorium-vis Permission required to be visible in a +u channel + # (requires the auditorium module). + # - blockcaps Channel mode +B - blocks messages with too many capital + # letters (requires the blockcaps module). + # - blockcolor Channel mode +c - blocks messages with formatting codes + # (requires the blockcolor module). + # - censor Channel mode +G - censors messages based on the network + # configuration (requires the censor module). + # - filter Channel mode +g - blocks messages containing the given + # glob mask (requires the chanfilter module). + # - flood Channel mode +f - kicks (and bans) on text flood of a + # specified rate (requires the messageflood module). + # - nickflood Channel mode +F - blocks nick changes after a specified + # rate (requires the nickflood module). + # - noctcp Channel mode +C - blocks any CTCPs to the channel + # (requires the noctcp module). + # - nonick Channel mode +N - prevents users on the channel from + # changing nicks (requires the nonicks module). + # - nonotice Channel mode +T - blocks /NOTICEs to the channel + # (requires the nonotice module). + # - regmoderated Channel mode +M - blocks unregistered users from + # speaking (requires the services account module). + # - stripcolor Channel mode +S - strips formatting codes from + # messages (requires the stripcolor module). + # - topiclock Channel mode +t - limits changing the topic to (half)ops + # You can also configure this on a per-channel basis with a channel mode. + # See m_exemptchanops in modules.conf.example for more details. + exemptchanops="censor:o filter:o nickflood:o nonick:v regmoderated:o" # invitebypassmodes: This allows /invite to bypass other channel modes. # (Such as +k, +j, +l, etc.) diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index 4abd3ba58..c3f074b94 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -750,9 +750,13 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Exempt channel operators module: Provides support for allowing # -# channel operators to be exempt from some channel modes. Supported # -# modes are blockcaps, noctcp, blockcolor, nickflood, flood, censor, # -# filter, regmoderated, nonick, nonotice, and stripcolor. # +# users of a specified channel status to be exempt from some channel # +# restriction modes. Supported restrictions are # +# blockcaps, blockcolor, censor, filter, flood, nickflood, noctcp, # +# nonick, nonotice, regmoderated, stripcolor, and topiclock. # +# See in inspircd.conf.example for a more # +# detailed list of the restriction modes that can be exempted. # +# These are settable using /mode #chan +X : # # # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# @@ -845,7 +849,7 @@ # # # If you specify to use the m_helpop.so module, then specify below # # the path to the helpop.conf file. # -# +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Hide chans module: Allows users to hide their channels list from non- From dd3b11b3aa4eb6cb0b6aff4b245a9b075759737d Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 20 Apr 2018 19:53:01 +0100 Subject: [PATCH 20/20] Release v2.0.26 --- src/version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.sh b/src/version.sh index 4172331bf..b082ad6e1 100755 --- a/src/version.sh +++ b/src/version.sh @@ -1,2 +1,2 @@ #!/bin/sh -echo "InspIRCd-2.0.25" +echo "InspIRCd-2.0.26"