summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/conf/inspircd.conf.example7
-rw-r--r--docs/conf/links.conf.example2
-rw-r--r--docs/conf/modules.conf.example34
-rw-r--r--docs/conf/modules/charybdis.conf.example6
-rw-r--r--docs/conf/modules/unrealircd.conf.example8
-rw-r--r--docs/conf/motd.txt.example6
-rw-r--r--docs/conf/opermotd.txt.example6
-rw-r--r--include/command_parse.h2
-rwxr-xr-xmodulemanager4
-rw-r--r--src/coremods/core_oper/cmd_restart.cpp4
-rw-r--r--src/modules/extra/README2
-rw-r--r--src/modules/extra/m_mysql.cpp2
-rw-r--r--src/modules/m_cap.cpp2
-rw-r--r--src/modules/m_shun.cpp10
-rw-r--r--src/modules/m_spanningtree/main.h2
-rw-r--r--src/modules/m_timedbans.cpp14
-rw-r--r--src/users.cpp3
17 files changed, 61 insertions, 53 deletions
diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example
index b9fa6d3a9..61d1a8c12 100644
--- a/docs/conf/inspircd.conf.example
+++ b/docs/conf/inspircd.conf.example
@@ -810,11 +810,6 @@
# Logging is covered with the <log> tag, which you may use to change
# the behaviour of the logging of the IRCd.
#
-# In InspIRCd as of 1.2, logging is pluggable and very extensible.
-# Different files can log the same thing, different 'types' of log can
-# go to different places, and modules can even extend the log tag
-# to do what they want.
-#
# An example log tag would be:
# <log method="file" type="OPER" level="default" target="opers.log">
# which would log all information on /oper (failed and successful) to
@@ -1007,6 +1002,6 @@
#########################################################################
# #
# - InspIRCd Development Team - #
-# http://www.inspircd.org #
+# https://www.inspircd.org #
# #
#########################################################################
diff --git a/docs/conf/links.conf.example b/docs/conf/links.conf.example
index f3c0807f8..e11c4fe32 100644
--- a/docs/conf/links.conf.example
+++ b/docs/conf/links.conf.example
@@ -49,7 +49,7 @@
# fingerprint: If defined, this option will force servers to be
# authenticated using SSL certificate fingerprints. See
- # http://wiki.inspircd.org/SSL for more information. This will
+ # https://wiki.inspircd.org/SSL for more information. This will
# require an SSL link for both inbound and outbound connections.
#fingerprint=""
diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example
index 5382eb354..cf79dafce 100644
--- a/docs/conf/modules.conf.example
+++ b/docs/conf/modules.conf.example
@@ -10,7 +10,7 @@
# #
# By default, ALL modules are commented out. You must uncomment them #
# or add lines to your config to load modules. Please refer to #
-# http://wiki.inspircd.org/Modules for a list of modules and #
+# https://wiki.inspircd.org/3.0/Modules for a list of modules and #
# each modules link for any additional conf tags they require. #
# #
# ____ _ _____ _ _ ____ _ _ _ #
@@ -309,7 +309,7 @@
# #
# Optional - If you specify to use the censor module, then you must #
# specify some censor tags. See also: #
-# http://wiki.inspircd.org/Modules/censor #
+# https://wiki.inspircd.org/Modules/3.0/censor #
#
#<include file="examples/censor.conf.example">
@@ -739,7 +739,7 @@
#<module name="dnsbl"> #
# #
# For configuration options please see the wiki page for dnsbl at #
-# http://wiki.inspircd.org/Modules/dnsbl #
+# https://wiki.inspircd.org/Modules/3.0/dnsbl #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Exempt channel operators module: Provides support for allowing #
@@ -886,7 +886,7 @@
#
#-#-#-#-#-#-#-#-#-#-#- HOSTCHANGE CONFIGURATION -#-#-#-#-#-#-#-#-#-#
# #
-# See http://wiki.inspircd.org/Modules/hostchange for help. #
+# See https://wiki.inspircd.org/Modules/3.0/hostchange for help. #
# #
#<host suffix="invalid.org" separator="." prefix="">
#<hostchange mask="*@42.theanswer.example.org" action="addnick">
@@ -971,7 +971,7 @@
#<inviteexception bypasskey="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
-# IRCv3 module: Provides the following IRCv3.1 extensions:
+# IRCv3 module: Provides the following IRCv3 extensions:
# extended-join, away-notify and account-notify. These are optional
# enhancements to the client-to-server protocol. An extension is only
# active for a client when the client specifically requests it, so this
@@ -979,7 +979,7 @@
#
# Further information on these extensions can be found at the IRCv3
# working group website:
-# http://ircv3.org/extensions/
+# http://ircv3.net/irc/
#
#<module name="ircv3">
# The following block can be used to control which extensions are
@@ -1195,7 +1195,7 @@
#-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
# mysql is more complex than described here, see the wiki for more #
-# info: http://wiki.inspircd.org/Modules/mysql #
+# info: https://wiki.inspircd.org/Modules/3.0/mysql #
#
#<database module="mysql" name="mydb" user="myuser" pass="mypass" host="localhost" id="my_database2">
@@ -1472,8 +1472,8 @@
#
#-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
-# pgsql is more complex than described here, see the wiki for #
-# more: http://wiki.inspircd.org/Modules/pgsql #
+# pgsql is more complex than described here, see the wiki for #
+# more: https://wiki.inspircd.org/Modules/3.0/pgsql #
#
#<database module="pgsql" name="mydb" user="myuser" pass="mypass" host="localhost" id="my_database" ssl="no">
@@ -1700,6 +1700,12 @@
# Layer via AUTHENTICATE. Note: You also need to have cap loaded
# for SASL to work.
#<module name="sasl">
+# Define the following to your services server name to improve security
+# by ensuring the SASL messages are only sent to the services server
+# and not to all connected servers. This prevents a rogue server from
+# capturing SASL messages and disables the SASL cap when services is
+# down.
+#<sasl target="services.mynetwork.com">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Secure list module: Prevent /LIST in the first minute of connection,
@@ -1865,7 +1871,7 @@
#-#-#-#-#-#-#-#-#-#-#- GNUTLS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
# ssl_gnutls is too complex to describe here, see the wiki: #
-# http://wiki.inspircd.org/Modules/ssl_gnutls #
+# https://wiki.inspircd.org/Modules/3.0/ssl_gnutls #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SSL info module: Allows users to retrieve information about other
@@ -1896,7 +1902,7 @@
#-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
# ssl_openssl is too complex to describe here, see the wiki: #
-# http://wiki.inspircd.org/Modules/ssl_openssl #
+# https://wiki.inspircd.org/Modules/3.0/ssl_openssl #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Strip color module: Adds channel mode +S that strips color codes and
@@ -1926,7 +1932,7 @@
#-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
# sqlite is more complex than described here, see the wiki for more #
-# info: http://wiki.inspircd.org/Modules/sqlite3 #
+# info: https://wiki.inspircd.org/Modules/3.0/sqlite3 #
#
#<database module="sqlite" hostname="/full/path/to/database.db" id="anytext">
@@ -1942,7 +1948,7 @@
#-#-#-#-#-#-#-#-#-#-#- SQLAUTH CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
# sqlauth is too complex to describe here, see the wiki: #
-# http://wiki.inspircd.org/Modules/sqlauth #
+# https://wiki.inspircd.org/Modules/3.0/sqlauth #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SQL oper module: Allows you to store oper credentials in an SQL table
@@ -1957,7 +1963,7 @@
# dbid - Database ID to use (see SQL modules). #
# hash - Hashing provider to use for password hashing. #
# #
-# See also: http://wiki.inspircd.org/Modules/sqloper #
+# See also: https://wiki.inspircd.org/Modules/3.0/sqloper #
# #
#<sqloper dbid="1" hash="bcrypt">
diff --git a/docs/conf/modules/charybdis.conf.example b/docs/conf/modules/charybdis.conf.example
index 6f8171b41..97436c548 100644
--- a/docs/conf/modules/charybdis.conf.example
+++ b/docs/conf/modules/charybdis.conf.example
@@ -37,7 +37,7 @@
# Optional - If you specify to use cgiirc, then you must specify one
# or more cgihost tags which indicate authorised CGI:IRC servers which
# will be connecting to your network, and an optional cgiirc tag.
-# For more information see: http://wiki.inspircd.org/Modules/cgiirc
+# For more information see: https://wiki.inspircd.org/Modules/3.0/cgiirc
#
# Set to yes if you want to notice opers when CGI clients connect
# <cgiirc opernotice="no">
@@ -262,7 +262,7 @@
#-#-#-#-#-#-#-#-#-#-#- GNUTLS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
# ssl_gnutls is too complex to describe here, see the wiki: #
-# http://wiki.inspircd.org/Modules/ssl_gnutls #
+# https://wiki.inspircd.org/Modules/3.0/ssl_gnutls #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SSL Info module: Allows users to retrieve information about other
@@ -289,7 +289,7 @@
#-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
# ssl_openssl is too complex to describe here, see the wiki: #
-# http://wiki.inspircd.org/Modules/ssl_openssl #
+# https://wiki.inspircd.org/Modules/3.0/ssl_openssl #
<module name="stripcolor">
<module name="svshold">
diff --git a/docs/conf/modules/unrealircd.conf.example b/docs/conf/modules/unrealircd.conf.example
index 45a0ac3d6..8ebdd2c1f 100644
--- a/docs/conf/modules/unrealircd.conf.example
+++ b/docs/conf/modules/unrealircd.conf.example
@@ -59,7 +59,7 @@
# Optional - If you specify to use cgiirc, then you must specify one
# or more cgihost tags which indicate authorised CGI:IRC servers which
# will be connecting to your network, and an optional cgiirc tag.
-# For more information see: http://wiki.inspircd.org/Modules/cgiirc
+# For more information see: https://wiki.inspircd.org/Modules/3.0/cgiirc
#
# Set to yes if you want to notice opers when CGI clients connect
# <cgiirc opernotice="no">
@@ -273,7 +273,7 @@
#-#-#-#-#-#-#-#-#-#-# OVERRIDE CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
# The override module is too complex to describe here, see the wiki: #
-# http://wiki.inspircd.org/Modules/override #
+# https://wiki.inspircd.org/Modules/3.0/override #
<module name="operlevels">
<module name="opermodes">
@@ -361,7 +361,7 @@
#-#-#-#-#-#-#-#-#-#-#- GNUTLS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
# ssl_gnutls is too complex to describe here, see the wiki: #
-# http://wiki.inspircd.org/Modules/ssl_gnutls #
+# https://wiki.inspircd.org/Modules/3.0/ssl_gnutls #
<module name="sslinfo">
@@ -375,7 +375,7 @@
#-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
# ssl_openssl is too complex to describe here, see the wiki: #
-# http://wiki.inspircd.org/Modules/ssl_openssl #
+# https://wiki.inspircd.org/Modules/3.0/ssl_openssl #
<module name="stripcolor">
<module name="svshold">
diff --git a/docs/conf/motd.txt.example b/docs/conf/motd.txt.example
index 04f7b11b2..891aaa51c 100644
--- a/docs/conf/motd.txt.example
+++ b/docs/conf/motd.txt.example
@@ -26,10 +26,10 @@
---- To change, see motd.txt.example -----
/ \
- / * Web: http://www.inspircd.org \
+ / * Web: https://www.inspircd.org \
| * IRC: irc.inspircd.org #inspircd |
- | * Docs: http://wiki.inspircd.org |
- | * Bugs: http://inspircd.org/bugs |
+ | * Docs: https://wiki.inspircd.org |
+ | * Bugs: https://inspircd.org/bugs |
| |
| We hope you like this software. Please do |
| make sure you put some effort into |
diff --git a/docs/conf/opermotd.txt.example b/docs/conf/opermotd.txt.example
index 0ac4cfea1..4bf7c85e4 100644
--- a/docs/conf/opermotd.txt.example
+++ b/docs/conf/opermotd.txt.example
@@ -26,10 +26,10 @@
-- To change, see opermotd.txt.example ---
/ \
- / * Web: http://www.inspircd.org \
+ / * Web: https://www.inspircd.org \
| * IRC: irc.inspircd.org #inspircd |
- | * Docs: http://wiki.inspircd.org |
- | * Bugs: http://inspircd.org/bugs |
+ | * Docs: https://wiki.inspircd.org |
+ | * Bugs: https://inspircd.org/bugs |
| |
| We hope you like this software. Please do |
| make sure you put some effort into |
diff --git a/include/command_parse.h b/include/command_parse.h
index c3d67af23..ec5ebba48 100644
--- a/include/command_parse.h
+++ b/include/command_parse.h
@@ -30,7 +30,7 @@
class CoreExport CommandParser
{
public:
- typedef TR1NS::unordered_map<std::string, Command*> CommandMap;
+ typedef TR1NS::unordered_map<std::string, Command*, irc::insensitive, irc::StrHashComp> CommandMap;
private:
/** Process a command from a user.
diff --git a/modulemanager b/modulemanager
index 7471dcc77..3e4eee9c9 100755
--- a/modulemanager
+++ b/modulemanager
@@ -73,7 +73,7 @@ sub parse_url {
}
my $mod;
- for (split /\n+/, $response->decoded_content) {
+ for (split /\n+/, $response->content) {
s/^\s+//; # ignore whitespace at start
next if /^#/;
if (/^module (\S+) (\S+) (\S+)/) {
@@ -334,7 +334,7 @@ for my $mod (sort keys %todo) {
if ($response->is_success) {
open(MF, ">src/modules/$mod.cpp") or die "\nFilesystem not writable: $!";
- print MF $response->decoded_content;
+ print MF $response->content;
close(MF);
print " - done\n";
} else {
diff --git a/src/coremods/core_oper/cmd_restart.cpp b/src/coremods/core_oper/cmd_restart.cpp
index f76fd098d..6c19329c3 100644
--- a/src/coremods/core_oper/cmd_restart.cpp
+++ b/src/coremods/core_oper/cmd_restart.cpp
@@ -38,7 +38,7 @@ CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, Us
DieRestart::SendError("Server restarting.");
#ifndef _WIN32
- /* XXX: This hack sets FD_CLOEXEC on all possible file descriptors, so they're closed if the execv() below succeeds.
+ /* XXX: This hack sets FD_CLOEXEC on all possible file descriptors, so they're closed if the execvp() below succeeds.
* Certainly, this is not a nice way to do things and it's slow when the fd limit is high.
*
* A better solution would be to set the close-on-exec flag for each fd we create (or create them with O_CLOEXEC),
@@ -52,7 +52,7 @@ CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, Us
}
#endif
- execv(ServerInstance->Config->cmdline.argv[0], ServerInstance->Config->cmdline.argv);
+ execvp(ServerInstance->Config->cmdline.argv[0], ServerInstance->Config->cmdline.argv);
ServerInstance->SNO->WriteGlobalSno('a', "Failed RESTART - could not execute '%s' (%s)",
ServerInstance->Config->cmdline.argv[0], strerror(errno));
}
diff --git a/src/modules/extra/README b/src/modules/extra/README
index 2478b57cf..b59494df9 100644
--- a/src/modules/extra/README
+++ b/src/modules/extra/README
@@ -2,7 +2,7 @@ This directory stores modules which require external libraries to compile.
For example, m_filter_pcre requires the PCRE libraries.
To compile any of these modules first ensure you have the required dependencies
-(read the online documentation at http://wiki.inspircd.org/) and then symlink
+(read the online documentation at https://wiki.inspircd.org/) and then symlink
the .cpp file from this directory into the parent directory (src/modules/).
Alternatively, use the command: ./configure --enable-extras=m_extra.cpp, which will
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index f9986f3f1..3490f7fa6 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -76,8 +76,6 @@
* if a module is ever put in a re-enterant state (stack corruption could occur, crashes, data
* corruption, and worse, so DONT think about it until the day comes when InspIRCd is 100%
* gauranteed threadsafe!)
- *
- * For a diagram of this system please see http://wiki.inspircd.org/Mysql2
*/
class SQLConnection;
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index 868294fe4..86de15d95 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -399,7 +399,7 @@ class CommandCap : public SplitCommand
}
else
{
- user->WriteNumeric(ERR_INVALIDCAPSUBCOMMAND, subcommand, "Invalid CAP subcommand");
+ user->WriteNumeric(ERR_INVALIDCAPSUBCOMMAND, subcommand.empty() ? "*" : subcommand, "Invalid CAP subcommand");
return CMD_FAILURE;
}
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index 417d67b69..66cc7fd58 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -106,13 +106,17 @@ class CommandShun : public Command
if (parameters.size() == 1)
{
- if (ServerInstance->XLines->DelLine(target.c_str(), "SHUN", user))
+ if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "SHUN", user))
{
- ServerInstance->SNO->WriteToSnoMask('x',"%s removed SHUN on %s",user->nick.c_str(),target.c_str());
+ ServerInstance->SNO->WriteToSnoMask('x', "%s removed SHUN on %s", user->nick.c_str(), parameters[0].c_str());
+ }
+ else if (ServerInstance->XLines->DelLine(target.c_str(), "SHUN", user))
+ {
+ ServerInstance->SNO->WriteToSnoMask('x',"%s removed SHUN on %s", user->nick.c_str(), target.c_str());
}
else
{
- user->WriteNotice("*** Shun " + target + " not found in list, try /stats H.");
+ user->WriteNotice("*** Shun " + parameters[0] + " not found in list, try /stats H.");
return CMD_FAILURE;
}
}
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 00cbd3dcd..13bab4cff 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -34,7 +34,7 @@
* If you completely change the protocol, completely change the number.
*
* IMPORTANT: If you make changes, document your changes here, without fail:
- * http://wiki.inspircd.org/List_of_protocol_changes_between_versions
+ * https://wiki.inspircd.org/List_of_protocol_changes_between_versions
*
* Failure to document your protocol changes will result in a painfully
* painful death by pain. You have been warned.
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 9890800e4..8c1454d7e 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -117,11 +117,13 @@ class CommandTban : public Command
T.chan = channel;
TimedBanList.push_back(T);
+ const std::string addban = user->nick + " added a timed ban on " + mask + " lasting for " + ConvToStr(duration) + " seconds.";
// If halfop is loaded, send notice to halfops and above, otherwise send to ops and above
PrefixMode* mh = ServerInstance->Modes->FindPrefixMode('h');
char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@';
- channel->WriteAllExcept(ServerInstance->FakeClient, true, pfxchar, tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name.c_str(), user->nick.c_str(), mask.c_str(), duration);
+ channel->WriteAllExcept(ServerInstance->FakeClient, true, pfxchar, tmp, "NOTICE %s :%s", channel->name.c_str(), addban.c_str());
+ ServerInstance->PI->SendChannelNotice(channel, pfxchar, addban);
return CMD_SUCCESS;
}
@@ -207,9 +209,13 @@ class ModuleTimedBans : public Module
Channel* cr = i->chan;
{
CUList empty;
- std::string expiry = "*** Timed ban on " + cr->name + " expired.";
- cr->WriteAllExcept(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
- ServerInstance->PI->SendChannelNotice(cr, '@', expiry);
+ const std::string expiry = "*** Timed ban on " + cr->name + " expired.";
+ // If halfop is loaded, send notice to halfops and above, otherwise send to ops and above
+ PrefixMode* mh = ServerInstance->Modes->FindPrefixMode('h');
+ char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@';
+
+ cr->WriteAllExcept(ServerInstance->FakeClient, true, pfxchar, empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
+ ServerInstance->PI->SendChannelNotice(cr, pfxchar, expiry);
Modes::ChangeList setban;
setban.push_remove(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), mask);
diff --git a/src/users.cpp b/src/users.cpp
index aa5031b2b..397a13267 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -730,8 +730,7 @@ bool User::SetClientIP(const std::string& address, bool recheck_eline)
void User::SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline)
{
- cachedip.clear();
- cached_hostip.clear();
+ this->InvalidateCache();
memcpy(&client_sa, &sa, sizeof(irc::sockets::sockaddrs));
}