Browse Source

Merge remote-tracking branch 'upstream/insp20' into production

James Lu 1 year ago
parent
commit
20e5e7aa8c

+ 1
- 1
configure View File

@@ -716,7 +716,7 @@ if (($config{USE_GNUTLS} eq "y") || ($config{USE_OPENSSL} eq "y")) {
716 716
 	print "Please note: for \e[1;32mSSL support\e[0m you will need to load required\n";
717 717
 	print "modules in your config. This configure script has added those modules to the\n";
718 718
 	print "build process. For more info, please refer to:\n";
719
-	print "\e[1;32mhttp://wiki.inspircd.org/Installation_From_Tarball\e[0m\n";
719
+	print "\e[1;32mhttps://wiki.inspircd.org/Installation_From_Tarball\e[0m\n";
720 720
 }
721 721
 print "*** \e[1;32mRemember to edit your configuration files!!!\e[0m ***\n\n\n";
722 722
 if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) {

+ 9
- 6
docs/conf/inspircd.conf.example View File

@@ -187,10 +187,18 @@
187 187
 
188 188
        # diepass: Password for opers to use if they need to shutdown (die)
189 189
        # a server.
190
+       #
191
+       # IMPORTANT: leaving this field empty does not disable the use of
192
+       # the DIE command. In order to prevent the use of this command you
193
+       # should remove it from the command privileges of your opers.
190 194
        diepass=""
191 195
 
192 196
        # restartpass: Password for opers to use if they need to restart
193 197
        # a server.
198
+       #
199
+       # IMPORTANT: leaving this field empty does not disable the use of
200
+       # the RESTART command. In order to prevent the use of this command
201
+       # you should remove it from the command privileges of your opers.
194 202
        restartpass="">
195 203
 
196 204
 
@@ -796,11 +804,6 @@
796 804
 # Logging is covered with the <log> tag, which you may use to change
797 805
 # the behaviour of the logging of the IRCd.
798 806
 #
799
-# In InspIRCd as of 1.2, logging is pluggable and very extensible.
800
-# Different files can log the same thing, different 'types' of log can
801
-# go to different places, and modules can even extend the log tag
802
-# to do what they want.
803
-#
804 807
 # An example log tag would be:
805 808
 #  <log method="file" type="OPER" level="default" target="logs/opers.log">
806 809
 # which would log all information on /oper (failed and successful) to
@@ -978,6 +981,6 @@
978 981
 #########################################################################
979 982
 #                                                                       #
980 983
 #                     - InspIRCd Development Team -                     #
981
-#                        http://www.inspircd.org                        #
984
+#                        https://www.inspircd.org                       #
982 985
 #                                                                       #
983 986
 #########################################################################

+ 1
- 1
docs/conf/links.conf.example View File

@@ -46,7 +46,7 @@
46 46
       ssl="gnutls"
47 47
 
48 48
       # fingerprint: If defined, this option will force servers to be
49
-      # authenticated using SSL Fingerprints. See http://wiki.inspircd.org/SSL
49
+      # authenticated using SSL Fingerprints. See https://wiki.inspircd.org/SSL
50 50
       # for more information. This will require an SSL link for both inbound
51 51
       # and outbound connections.
52 52
       #fingerprint=""

+ 21
- 16
docs/conf/modules.conf.example View File

@@ -10,7 +10,7 @@
10 10
 #                                                                     #
11 11
 #  By default, ALL modules are commented out. You must uncomment them #
12 12
 #  or add lines to your config to load modules. Please refer to       #
13
-#  http://wiki.inspircd.org/Modules for a list of modules and         #
13
+#  https://wiki.inspircd.org/2.0/Modules for a list of modules and    #
14 14
 #  each modules link for any additional conf tags they require.       #
15 15
 #                                                                     #
16 16
 #    ____                _   _____ _     _       ____  _ _   _        #
@@ -313,7 +313,7 @@
313 313
 #                                                                     #
314 314
 # Optional - If you specify to use the m_censor module, then you must #
315 315
 # specify some censor tags. See also:                                 #
316
-# http://wiki.inspircd.org/Modules/censor                             #
316
+# https://wiki.inspircd.org/Modules/2.0/censor                        #
317 317
 #
318 318
 #<include file="conf/examples/censor.conf.example">
319 319
 
@@ -327,7 +327,7 @@
327 327
 # Optional - If you specify to use m_cgiirc, then you must specify one
328 328
 # or more cgihost tags which indicate authorised CGI:IRC servers which
329 329
 # will be connecting to your network, and an optional cgiirc tag.
330
-# For more information see: http://wiki.inspircd.org/Modules/cgiirc
330
+# For more information see: https://wiki.inspircd.org/Modules/2.0/cgiirc
331 331
 #
332 332
 # Set to yes if you want to notice opers when CGI:IRC clients connect.
333 333
 # <cgiirc opernotice="no">
@@ -746,7 +746,7 @@
746 746
 #<module name="m_dnsbl.so">                                           #
747 747
 #                                                                     #
748 748
 # For configuration options please see the wiki page for m_dnsbl at   #
749
-# http://wiki.inspircd.org/Modules/dnsbl                              #
749
+# https://wiki.inspircd.org/Modules/2.0/dnsbl                         #
750 750
 
751 751
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
752 752
 # Exempt channel operators module: Provides support for allowing      #
@@ -869,7 +869,7 @@
869 869
 #
870 870
 #-#-#-#-#-#-#-#-#-#-#-  HOSTCHANGE  CONFIGURATION  -#-#-#-#-#-#-#-#-#-#
871 871
 #                                                                     #
872
-# See http://wiki.inspircd.org/Modules/hostchange for help.           #
872
+# See https://wiki.inspircd.org/Modules/2.0/hostchange for help.      #
873 873
 #                                                                     #
874 874
 #<host suffix="invalid.org" separator="." prefix="">
875 875
 #<hostchange mask="*@42.theanswer.example.org" action="addnick">
@@ -942,7 +942,7 @@
942 942
 #<inviteexception bypasskey="yes">
943 943
 
944 944
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
945
-# IRCv3 module: Provides the following IRCv3.1 extensions:
945
+# IRCv3 module: Provides the following IRCv3 extensions:
946 946
 # extended-join, away-notify and account-notify. These are optional
947 947
 # enhancements to the client-to-server protocol. An extension is only
948 948
 # active for a client when the client specifically requests it, so this
@@ -950,7 +950,7 @@
950 950
 #
951 951
 # Further information on these extensions can be found at the IRCv3
952 952
 # working group website:
953
-# http://ircv3.org/extensions/
953
+# http://ircv3.net/irc/
954 954
 #
955 955
 #<module name="m_ircv3.so">
956 956
 # The following block can be used to control which extensions are
@@ -1130,7 +1130,7 @@
1130 1130
 #-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#-#
1131 1131
 #                                                                     #
1132 1132
 # m_mssql.so is more complex than described here, see wiki for more   #
1133
-# info http://wiki.inspircd.org/Modules/mssql                         #
1133
+# info https://wiki.inspircd.org/Modules/2.0/mssql                    #
1134 1134
 #
1135 1135
 #<database module="mssql" name="db" user="user" pass="pass" host="localhost" id="db1">
1136 1136
 
@@ -1145,7 +1145,7 @@
1145 1145
 #-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#-#
1146 1146
 #                                                                     #
1147 1147
 # m_mysql.so is more complex than described here, see the wiki for    #
1148
-# more: http://wiki.inspircd.org/Modules/mysql                        #
1148
+# more: https://wiki.inspircd.org/Modules/2.0/mysql                   #
1149 1149
 #
1150 1150
 #<database module="mysql" name="mydb" user="myuser" pass="mypass" host="localhost" id="my_database2">
1151 1151
 
@@ -1310,7 +1310,7 @@
1310 1310
 #-#-#-#-#-#-#-#-#-#-#   OVERRIDE CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#
1311 1311
 #                                                                     #
1312 1312
 # m_override.so is too complex it describe here, see the wiki:        #
1313
-# http://wiki.inspircd.org/Modules/override                           #
1313
+# https://wiki.inspircd.org/Modules/2.0/override                      #
1314 1314
 
1315 1315
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
1316 1316
 # Oper levels module: Gives each oper a level and prevents actions
@@ -1403,7 +1403,7 @@
1403 1403
 #-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#-#
1404 1404
 #                                                                     #
1405 1405
 # m_pgsql.so is more complex than described here, see the wiki for    #
1406
-# more: http://wiki.inspircd.org/Modules/pgsql                        #
1406
+# more: https://wiki.inspircd.org/Modules/2.0/pgsql                   #
1407 1407
 #
1408 1408
 #<database module="pgsql" name="mydb" user="myuser" pass="mypass" host="localhost" id="my_database" ssl="no">
1409 1409
 
@@ -1592,6 +1592,11 @@
1592 1592
 # Layer via AUTHENTICATE. Note: You also need to have m_cap.so loaded
1593 1593
 # for SASL to work.
1594 1594
 #<module name="m_sasl.so">
1595
+# Define the following to your services server name to improve security
1596
+# by ensuring the SASL messages are only sent to the services server
1597
+# and not to all connected servers. This prevents a rogue server from
1598
+# capturing SASL messages.
1599
+#<sasl target="services.mynetwork.com">
1595 1600
 
1596 1601
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
1597 1602
 # Secure list module: Prevent /LIST in the first minute of connection,
@@ -1716,7 +1721,7 @@
1716 1721
 #-#-#-#-#-#-#-#-#-#-#-  GNUTLS CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#
1717 1722
 #                                                                     #
1718 1723
 # m_ssl_gnutls.so is too complex to describe here, see the wiki:      #
1719
-# http://wiki.inspircd.org/Modules/ssl_gnutls                         #
1724
+# https://wiki.inspircd.org/Modules/2.0/ssl_gnutls                    #
1720 1725
 
1721 1726
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
1722 1727
 # SSL info module: Allows users to retrieve information about other
@@ -1743,7 +1748,7 @@
1743 1748
 #-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#
1744 1749
 #                                                                     #
1745 1750
 # m_ssl_openssl.so is too complex to describe here, see the wiki:     #
1746
-# http://wiki.inspircd.org/Modules/ssl_openssl                        #
1751
+# https://wiki.inspircd.org/Modules/2.0/ssl_openssl                   #
1747 1752
 
1748 1753
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
1749 1754
 # Strip color module: Adds channel mode +S that strips mIRC color
@@ -1770,7 +1775,7 @@
1770 1775
 #-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#-#
1771 1776
 #                                                                     #
1772 1777
 # m_sqlite.so is more complex than described here, see the wiki for   #
1773
-# more: http://wiki.inspircd.org/Modules/sqlite3                      #
1778
+# more: https://wiki.inspircd.org/Modules/2.0/sqlite3                 #
1774 1779
 #
1775 1780
 #<database module="sqlite" hostname="/full/path/to/database.db" id="anytext">
1776 1781
 
@@ -1786,7 +1791,7 @@
1786 1791
 #-#-#-#-#-#-#-#-#-#-#- SQLAUTH CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#
1787 1792
 #                                                                     #
1788 1793
 # m_sqlauth.so is too complex to describe here, see the wiki:         #
1789
-# http://wiki.inspircd.org/Modules/sqlauth                            #
1794
+# https://wiki.inspircd.org/Modules/2.0/sqlauth                       #
1790 1795
 
1791 1796
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
1792 1797
 # SQL oper module: Allows you to store oper credentials in an SQL table
@@ -1801,7 +1806,7 @@
1801 1806
 # dbid       - Database ID to use (see SQL modules).                  #
1802 1807
 # hash       - Hashing provider to use for password hashing.          #
1803 1808
 #                                                                     #
1804
-# See also: http://wiki.inspircd.org/Modules/sqloper                  #
1809
+# See also: https://wiki.inspircd.org/Modules/2.0/sqloper             #
1805 1810
 #                                                                     #
1806 1811
 #<sqloper dbid="1" hash="md5">
1807 1812
 

+ 3
- 3
docs/conf/modules/charybdis.conf.example View File

@@ -37,7 +37,7 @@
37 37
 # Optional - If you specify to use m_cgiirc, then you must specify one
38 38
 # or more cgihost tags which indicate authorised CGI:IRC servers which
39 39
 # will be connecting to your network, and an optional cgiirc tag.
40
-# For more information see: http://wiki.inspircd.org/Modules/cgiirc
40
+# For more information see: https://wiki.inspircd.org/Modules/2.0/cgiirc
41 41
 #
42 42
 # Set to yes if you want to notice opers when CGI clients connect
43 43
 # <cgiirc opernotice="no">
@@ -262,7 +262,7 @@
262 262
 #-#-#-#-#-#-#-#-#-#-#-  GNUTLS CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#
263 263
 #                                                                     #
264 264
 # m_ssl_gnutls.so is too complex to describe here, see the wiki:      #
265
-# http://wiki.inspircd.org/Modules/ssl_gnutls                         #
265
+# https://wiki.inspircd.org/Modules/2.0/ssl_gnutls                    #
266 266
 
267 267
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
268 268
 # SSL Info module: Allows users to retrieve information about other
@@ -289,7 +289,7 @@
289 289
 #-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#
290 290
 #                                                                     #
291 291
 # m_ssl_openssl.so is too complex to describe here, see the wiki:     #
292
-# http://wiki.inspircd.org/Modules/ssl_openssl                        #
292
+# https://wiki.inspircd.org/Modules/2.0/ssl_openssl                   #
293 293
 
294 294
 <module name="m_stripcolor.so">
295 295
 <module name="m_svshold.so">

+ 4
- 4
docs/conf/modules/unrealircd.conf.example View File

@@ -59,7 +59,7 @@
59 59
 # Optional - If you specify to use m_cgiirc, then you must specify one
60 60
 # or more cgihost tags which indicate authorised CGI:IRC servers which
61 61
 # will be connecting to your network, and an optional cgiirc tag.
62
-# For more information see: http://wiki.inspircd.org/Modules/cgiirc
62
+# For more information see: https://wiki.inspircd.org/Modules/2.0/cgiirc
63 63
 #
64 64
 # Set to yes if you want to notice opers when CGI clients connect
65 65
 # <cgiirc opernotice="no">
@@ -283,7 +283,7 @@
283 283
 #-#-#-#-#-#-#-#-#-#-#   OVERRIDE CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#
284 284
 #                                                                     #
285 285
 # m_override.so is too complex to describe here, see the wiki:        #
286
-# http://wiki.inspircd.org/Modules/override                           #
286
+# https://wiki.inspircd.org/Modules/2.0/override                      #
287 287
 
288 288
 <module name="m_operlevels.so">
289 289
 <module name="m_opermodes.so">
@@ -371,7 +371,7 @@
371 371
 #-#-#-#-#-#-#-#-#-#-#-  GNUTLS CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#
372 372
 #                                                                     #
373 373
 # m_ssl_gnutls.so is too complex to describe here, see the wiki:      #
374
-# http://wiki.inspircd.org/Modules/ssl_gnutls                         #
374
+# https://wiki.inspircd.org/Modules/2.0/ssl_gnutls                    #
375 375
 
376 376
 <module name="m_sslinfo.so">
377 377
 
@@ -385,7 +385,7 @@
385 385
 #-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION   -#-#-#-#-#-#-#-#-#-#-#-#
386 386
 #                                                                     #
387 387
 # m_ssl_openssl.so is too complex to describe here, see the wiki:     #
388
-# http://wiki.inspircd.org/Modules/ssl_openssl                        #
388
+# https://wiki.inspircd.org/Modules/2.0/ssl_openssl                   #
389 389
 
390 390
 <module name="m_stripcolor.so">
391 391
 <module name="m_svshold.so">

+ 3
- 3
docs/conf/motd.txt.example View File

@@ -26,10 +26,10 @@
26 26
 
27 27
         ---- To change, see motd.txt.example -----
28 28
        /                                          \
29
-      /   * Web: http://www.inspircd.org           \
29
+      /   * Web: https://www.inspircd.org          \
30 30
       |   * IRC: irc.inspircd.org #inspircd        |
31
-      |   * Docs: http://wiki.inspircd.org         |
32
-      |   * Bugs: http://inspircd.org/bugs         |
31
+      |   * Docs: https://wiki.inspircd.org        |
32
+      |   * Bugs: https://inspircd.org/bugs        |
33 33
       |                                            |
34 34
       | We hope you like this software. Please do  |
35 35
       | make  sure  you  put  some  effort  into   |

+ 3
- 3
docs/conf/opermotd.txt.example View File

@@ -26,10 +26,10 @@
26 26
 
27 27
         -- To change, see opermotd.txt.example ---
28 28
        /                                          \
29
-      /   * Web: http://www.inspircd.org           \
29
+      /   * Web: https://www.inspircd.org          \
30 30
       |   * IRC: irc.inspircd.org #inspircd        |
31
-      |   * Docs: http://wiki.inspircd.org         |
32
-      |   * Bugs: http://inspircd.org/bugs         |
31
+      |   * Docs: https://wiki.inspircd.org        |
32
+      |   * Bugs: https://inspircd.org/bugs        |
33 33
       |                                            |
34 34
       | We hope you like this software. Please do  |
35 35
       | make  sure  you  put  some  effort  into   |

+ 5
- 1
include/typedefs.h View File

@@ -120,7 +120,11 @@ typedef std::map<std::string, file_cache> ConfigFileCache;
120 120
 
121 121
 /** A hash of commands used by the core
122 122
  */
123
-typedef nspace::hash_map<std::string,Command*> Commandtable;
123
+#ifdef HASHMAP_DEPRECATED
124
+	typedef nspace::hash_map<std::string, Command*, nspace::insensitive, irc::StrHashComp> Commandtable;
125
+#else
126
+	typedef nspace::hash_map<std::string, Command*, nspace::hash<std::string>, irc::StrHashComp> Commandtable;
127
+#endif
124 128
 
125 129
 /** Membership list of a channel */
126 130
 typedef std::map<User*, Membership*> UserMembList;

+ 2
- 2
modulemanager View File

@@ -75,7 +75,7 @@ sub parse_url {
75 75
 	}
76 76
 
77 77
 	my $mod;
78
-	for (split /\n+/, $response->decoded_content) {
78
+	for (split /\n+/, $response->content) {
79 79
 		s/^\s+//; # ignore whitespace at start
80 80
 		next if /^#/;
81 81
 		if (/^module (\S+) (\S+) (\S+)/) {
@@ -359,7 +359,7 @@ for my $mod (sort keys %todo) {
359 359
 
360 360
 	if ($response->is_success) {
361 361
 		open(MF, ">src/modules/$mod.cpp") or die "\nFilesystem not writable: $!";
362
-		print MF $response->decoded_content;
362
+		print MF $response->content;
363 363
 		close(MF);
364 364
 		print " - done\n";
365 365
 	} else {

+ 2
- 2
src/commands/cmd_restart.cpp View File

@@ -47,7 +47,7 @@ CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, Us
47 47
 		ServerInstance->SendError("Server restarting.");
48 48
 
49 49
 #ifndef _WIN32
50
-		/* XXX: This hack sets FD_CLOEXEC on all possible file descriptors, so they're closed if the execv() below succeeds.
50
+		/* XXX: This hack sets FD_CLOEXEC on all possible file descriptors, so they're closed if the execvp() below succeeds.
51 51
 		 * Certainly, this is not a nice way to do things and it's slow when the fd limit is high.
52 52
 		 *
53 53
 		 * A better solution would be to set the close-on-exec flag for each fd we create (or create them with O_CLOEXEC),
@@ -61,7 +61,7 @@ CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, Us
61 61
 		}
62 62
 #endif
63 63
 
64
-		execv(ServerInstance->Config->cmdline.argv[0], ServerInstance->Config->cmdline.argv);
64
+		execvp(ServerInstance->Config->cmdline.argv[0], ServerInstance->Config->cmdline.argv);
65 65
 		ServerInstance->SNO->WriteGlobalSno('a', "Failed RESTART - could not execute '%s' (%s)",
66 66
 			ServerInstance->Config->cmdline.argv[0], strerror(errno));
67 67
 	}

+ 6
- 3
src/modules.cpp View File

@@ -641,7 +641,8 @@ static ConfigTag* SlowGetTag(const std::string &tag, int index)
641 641
 std::string ConfigReader::ReadValue(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool allow_linefeeds)
642 642
 {
643 643
 	std::string result = default_value;
644
-	if (!SlowGetTag(tag, index)->readString(name, result, allow_linefeeds))
644
+	ConfigTag* conftag = SlowGetTag(tag, index);
645
+	if (!conftag || !conftag->readString(name, result, allow_linefeeds))
645 646
 	{
646 647
 		this->error = CONF_VALUE_NOT_FOUND;
647 648
 	}
@@ -656,7 +657,8 @@ std::string ConfigReader::ReadValue(const std::string &tag, const std::string &n
656 657
 bool ConfigReader::ReadFlag(const std::string &tag, const std::string &name, const std::string &default_value, int index)
657 658
 {
658 659
 	bool def = (default_value == "yes");
659
-	return SlowGetTag(tag, index)->getBool(name, def);
660
+	ConfigTag* conftag = SlowGetTag(tag, index);
661
+	return conftag ? conftag->getBool(name, def) : def;
660 662
 }
661 663
 
662 664
 bool ConfigReader::ReadFlag(const std::string &tag, const std::string &name, int index)
@@ -668,7 +670,8 @@ bool ConfigReader::ReadFlag(const std::string &tag, const std::string &name, int
668 670
 int ConfigReader::ReadInteger(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool need_positive)
669 671
 {
670 672
 	int v = atoi(default_value.c_str());
671
-	int result = SlowGetTag(tag, index)->getInt(name, v);
673
+	ConfigTag* conftag = SlowGetTag(tag, index);
674
+	int result = conftag ? conftag->getInt(name, v) : v;
672 675
 
673 676
 	if ((need_positive) && (result < 0))
674 677
 	{

+ 1
- 1
src/modules/extra/README View File

@@ -2,7 +2,7 @@ This directory stores modules which require external libraries to compile.
2 2
 For example, m_filter_pcre requires the PCRE libraries.
3 3
 
4 4
 To compile any of these modules first ensure you have the required dependencies
5
-(read the online documentation at http://wiki.inspircd.org/) and then symlink
5
+(read the online documentation at https://wiki.inspircd.org/) and then symlink
6 6
 the .cpp file from this directory into the parent directory (src/modules/).
7 7
 
8 8
 Alternatively, use the command: ./configure --enable-extras=m_extra.cpp, which will

+ 0
- 2
src/modules/extra/m_mysql.cpp View File

@@ -67,8 +67,6 @@
67 67
  * if a module is ever put in a re-enterant state (stack corruption could occur, crashes, data
68 68
  * corruption, and worse, so DONT think about it until the day comes when InspIRCd is 100%
69 69
  * gauranteed threadsafe!)
70
- *
71
- * For a diagram of this system please see http://wiki.inspircd.org/Mysql2
72 70
  */
73 71
 
74 72
 class SQLConnection;

+ 1
- 1
src/modules/m_cap.cpp View File

@@ -120,7 +120,7 @@ class CommandCAP : public Command
120 120
 		}
121 121
 		else
122 122
 		{
123
-			user->WriteNumeric(ERR_INVALIDCAPSUBCOMMAND, "%s %s :Invalid CAP subcommand", user->nick.c_str(), subcommand.c_str());
123
+			user->WriteNumeric(ERR_INVALIDCAPSUBCOMMAND, "%s %s :Invalid CAP subcommand", user->nick.c_str(), subcommand.empty() ? "*" : subcommand.c_str());
124 124
 			return CMD_FAILURE;
125 125
 		}
126 126
 

+ 9
- 0
src/modules/m_sasl.cpp View File

@@ -99,6 +99,15 @@ class SaslAuthenticator
99 99
 		params.push_back(host);
100 100
 		params.push_back(ip);
101 101
 
102
+		LocalUser* lu = IS_LOCAL(user);
103
+		if (lu)
104
+		{
105
+			// NOTE: SaslAuthenticator instances are only created for local
106
+			// users so this parameter will always be appended.
107
+			SocketCertificateRequest req(&lu->eh, ServerInstance->Modules->Find("m_sasl.so"));
108
+			params.push_back(req.cert ? "S" : "P");
109
+		}
110
+
102 111
 		SendSASL(params);
103 112
 	}
104 113
 

+ 6
- 2
src/modules/m_shun.cpp View File

@@ -114,13 +114,17 @@ class CommandShun : public Command
114 114
 
115 115
 		if (parameters.size() == 1)
116 116
 		{
117
-			if (ServerInstance->XLines->DelLine(target.c_str(), "SHUN", user))
117
+			if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "SHUN", user))
118
+			{
119
+				ServerInstance->SNO->WriteToSnoMask('x', "%s removed SHUN on %s", user->nick.c_str(), parameters[0].c_str());
120
+			}
121
+			else if (ServerInstance->XLines->DelLine(target.c_str(), "SHUN", user))
118 122
 			{
119 123
 				ServerInstance->SNO->WriteToSnoMask('x',"%s removed SHUN on %s",user->nick.c_str(),target.c_str());
120 124
 			}
121 125
 			else
122 126
 			{
123
-				user->WriteServ("NOTICE %s :*** Shun %s not found in list, try /stats H.",user->nick.c_str(),target.c_str());
127
+				user->WriteServ("NOTICE %s :*** Shun %s not found in list, try /stats H.", user->nick.c_str(), parameters[0].c_str());
124 128
 				return CMD_FAILURE;
125 129
 			}
126 130
 		}

+ 1
- 1
src/modules/m_spanningtree/main.h View File

@@ -31,7 +31,7 @@
31 31
  * If you  completely change the protocol, completely change the number.
32 32
  *
33 33
  * IMPORTANT: If you make changes, document your changes here, without fail:
34
- * http://wiki.inspircd.org/List_of_protocol_changes_between_versions
34
+ * https://wiki.inspircd.org/List_of_protocol_changes_between_versions
35 35
  *
36 36
  * Failure to document your protocol changes will result in a painfully
37 37
  * painful death by pain. You have been warned.

+ 10
- 4
src/modules/m_timedbans.cpp View File

@@ -117,11 +117,13 @@ class CommandTban : public Command
117 117
 		T.chan = channel;
118 118
 		TimedBanList.push_back(T);
119 119
 
120
+		const std::string addban = user->nick + " added a timed ban on " + mask + " lasting for " + ConvToStr(duration) + " seconds.";
120 121
 		// If halfop is loaded, send notice to halfops and above, otherwise send to ops and above
121 122
 		ModeHandler* mh = ServerInstance->Modes->FindMode('h', MODETYPE_CHANNEL);
122 123
 		char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@';
123 124
 
124
-		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);
125
+		channel->WriteAllExcept(ServerInstance->FakeClient, true, pfxchar, tmp, "NOTICE %s :%s", channel->name.c_str(), addban.c_str());
126
+		ServerInstance->PI->SendChannelNotice(channel, pfxchar, addban);
125 127
 		return CMD_SUCCESS;
126 128
 	}
127 129
 
@@ -207,9 +209,13 @@ class ModuleTimedBans : public Module
207 209
 				setban.push_back(mask);
208 210
 
209 211
 				CUList empty;
210
-				std::string expiry = "*** Timed ban on " + chan + " expired.";
211
-				cr->WriteAllExcept(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
212
-				ServerInstance->PI->SendChannelNotice(cr, '@', expiry);
212
+				const std::string expiry = "*** Timed ban on " + chan + " expired.";
213
+				// If halfop is loaded, send notice to halfops and above, otherwise send to ops and above
214
+				ModeHandler* mh = ServerInstance->Modes->FindMode('h', MODETYPE_CHANNEL);
215
+				char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@';
216
+
217
+				cr->WriteAllExcept(ServerInstance->FakeClient, true, pfxchar, empty, "NOTICE %s :%s", cr->name.c_str(), expiry.c_str());
218
+				ServerInstance->PI->SendChannelNotice(cr, pfxchar, expiry);
213 219
 
214 220
 				ServerInstance->SendGlobalMode(setban, ServerInstance->FakeClient);
215 221
 			}

+ 1
- 2
src/users.cpp View File

@@ -1008,8 +1008,7 @@ bool User::SetClientIP(const char* sip, bool recheck_eline)
1008 1008
 
1009 1009
 void User::SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline)
1010 1010
 {
1011
-	cachedip.clear();
1012
-	cached_hostip.clear();
1011
+	this->InvalidateCache();
1013 1012
 	memcpy(&client_sa, &sa, sizeof(irc::sockets::sockaddrs));
1014 1013
 }
1015 1014
 

+ 1
- 1
src/version.sh View File

@@ -1,2 +1,2 @@
1 1
 #!/bin/sh
2
-echo "InspIRCd-2.0.24"
2
+echo "InspIRCd-2.0.25"