]> git.netwichtig.de Git - user/henk/code/inspircd.git/log
user/henk/code/inspircd.git
5 years agoAdd support for the IRCv3 batch specification.
Peter Powell [Mon, 13 Aug 2018 20:48:06 +0000 (21:48 +0100)]
Add support for the IRCv3 batch specification.

Co-authored-by: Attila Molnar <attilamolnar@hush.com>
5 years agoAdd support for the IRCv3 server-time specification.
Peter Powell [Mon, 13 Aug 2018 20:44:11 +0000 (21:44 +0100)]
Add support for the IRCv3 server-time specification.

Co-authored-by: Attila Molnar <attilamolnar@hush.com>
5 years agoAdd support for the IRCv3 account-tag specification.
Peter Powell [Mon, 13 Aug 2018 20:35:28 +0000 (21:35 +0100)]
Add support for the IRCv3 account-tag specification.

Co-authored-by: Attila Molnar <attilamolnar@hush.com>
5 years agoImplement IRCv3 message tag support.
Peter Powell [Mon, 13 Aug 2018 19:17:46 +0000 (20:17 +0100)]
Implement IRCv3 message tag support.

Co-authored-by: Attila Molnar <attilamolnar@hush.com>
5 years agoAdd an accessor for the last mode change list to ModeParser.
Peter Powell [Mon, 13 Aug 2018 15:52:37 +0000 (16:52 +0100)]
Add an accessor for the last mode change list to ModeParser.

GetLastParse will be going away soon.

5 years agoConvert AWAY to use cross-module events and clean up slightly.
Peter Powell [Sun, 12 Aug 2018 13:56:27 +0000 (14:56 +0100)]
Convert AWAY to use cross-module events and clean up slightly.

OnSetAway has been replaced with four events. OnUserPreAway and
OnUserPreBack can be used to deny an away state change and/or
change the away message of a local user. OnUserAway and OnUserBack
allow modules to be notified that a user's away state has changed.

5 years agoPass the Extensible container to ExtensionItem::free().
Peter Powell [Sun, 12 Aug 2018 12:29:09 +0000 (13:29 +0100)]
Pass the Extensible container to ExtensionItem::free().

5 years agoMove message parsing to ProcessBuffer and fix edge cases in it.
Peter Powell [Fri, 10 Aug 2018 08:04:30 +0000 (09:04 +0100)]
Move message parsing to ProcessBuffer and fix edge cases in it.

5 years agoSplit irc::tokenparser::GetToken into GetMiddle and GetTrailing.
Peter Powell [Fri, 10 Aug 2018 06:46:42 +0000 (07:46 +0100)]
Split irc::tokenparser::GetToken into GetMiddle and GetTrailing.

This simplifies the logic of irc::tokenparser considerably and
removes all of the magic index guessing that was used previously.

5 years agoRemove the integer overloads of irc::tokenparser::GetToken().
Peter Powell [Thu, 9 Aug 2018 15:33:27 +0000 (16:33 +0100)]
Remove the integer overloads of irc::tokenparser::GetToken().

The int overload was never used and the long overload was used in
one place.

5 years agoParse CAPAB CAPABILITIES and FJOIN messages with spacesepstream.
Peter Powell [Fri, 10 Aug 2018 06:00:02 +0000 (07:00 +0100)]
Parse CAPAB CAPABILITIES and FJOIN messages with spacesepstream.

Special tokenisation rules are not necessary here.

5 years agoRemove the original line parameter of On{Pre,Post}Command.
Peter Powell [Thu, 9 Aug 2018 19:44:43 +0000 (20:44 +0100)]
Remove the original line parameter of On{Pre,Post}Command.

In the brave new world of message tags and alternate wire formats
this is no longer something that is appropriate to expose.

In reality it was only ever used by m_alias which now reconstitutes
the command name and parameters into a RFC 1459-style message for
whatever it needs to do.

5 years agoSwitch m_xline_db to use the xline snomask character.
Peter Powell [Fri, 10 Aug 2018 05:39:22 +0000 (06:39 +0100)]
Switch m_xline_db to use the xline snomask character.

5 years agoSwitch m_dnsbl to use its own snomask character.
Peter Powell [Tue, 7 Aug 2018 15:50:01 +0000 (16:50 +0100)]
Switch m_dnsbl to use its own snomask character.

5 years agoRemove the 'debug' snotice character.
Peter Powell [Tue, 7 Aug 2018 15:45:03 +0000 (16:45 +0100)]
Remove the 'debug' snotice character.

5 years agoMake the FJOIN timestamp message easier for users to understand.
Peter Powell [Sun, 5 Aug 2018 16:18:43 +0000 (17:18 +0100)]
Make the FJOIN timestamp message easier for users to understand.

5 years agoRemove support for static modules.
Peter Powell [Mon, 30 Jul 2018 23:49:27 +0000 (00:49 +0100)]
Remove support for static modules.

This has been frequently broken in the past and as far as I know is
used by literally nobody.

Also, even if all modules are compiled into the core any libraries
linked against are and have always been linked dynamically making
this unusable on platforms without dynamic libraries.

5 years agoRename User::fullname to realname and make it private.
Peter Powell [Mon, 30 Jul 2018 17:50:34 +0000 (18:50 +0100)]
Rename User::fullname to realname and make it private.

5 years agoReplace most usages of "name" with "real" or "real name".
Peter Powell [Mon, 30 Jul 2018 17:34:57 +0000 (18:34 +0100)]
Replace most usages of "name" with "real" or "real name".

5 years agoReplace most usages of "GECOS" with "real" or "real name".
Peter Powell [Mon, 30 Jul 2018 17:30:11 +0000 (18:30 +0100)]
Replace most usages of "GECOS" with "real" or "real name".

5 years agoReplace irc::stringjoiner with a generic stdalgo::string::join.
Peter Powell [Thu, 26 Jul 2018 20:23:45 +0000 (21:23 +0100)]
Replace irc::stringjoiner with a generic stdalgo::string::join.

This can also be used with different types of collection containing
values which are not a string.

5 years agoUse CommandBase::Params instead of std::vector<std::string>.
Peter Powell [Thu, 26 Jul 2018 18:43:54 +0000 (19:43 +0100)]
Use CommandBase::Params instead of std::vector<std::string>.

This is presently a typedef but will soon be replaced with a class
that encapsulates both tags and parameters.

5 years agoAdd a module which implements the HAProxy PROXY v2 protocol.
Peter Powell [Thu, 26 Jul 2018 11:13:13 +0000 (12:13 +0100)]
Add a module which implements the HAProxy PROXY v2 protocol.

5 years agoMake more config stuff case insensitive.
Peter Powell [Tue, 24 Jul 2018 17:29:43 +0000 (18:29 +0100)]
Make more config stuff case insensitive.

5 years agoFix building on Windows.
Peter Powell [Tue, 24 Jul 2018 10:01:50 +0000 (11:01 +0100)]
Fix building on Windows.

5 years agoRename IntModuleList to Module::List.
Peter Powell [Tue, 24 Jul 2018 09:02:27 +0000 (10:02 +0100)]
Rename IntModuleList to Module::List.

5 years agoGet rid of the unused string_list typedef.
Peter Powell [Tue, 24 Jul 2018 09:02:07 +0000 (10:02 +0100)]
Get rid of the unused string_list typedef.

5 years agoFix the Windows build system to use the new license file location.
Peter Powell [Mon, 23 Jul 2018 14:12:08 +0000 (15:12 +0100)]
Fix the Windows build system to use the new license file location.

5 years agoRemove Log() calls made unnecessary by the previous commit.
Peter Powell [Mon, 25 Jun 2018 14:21:37 +0000 (15:21 +0100)]
Remove Log() calls made unnecessary by the previous commit.

5 years agoLog snotices with their description rather than just as "snomask".
Peter Powell [Mon, 25 Jun 2018 13:21:49 +0000 (14:21 +0100)]
Log snotices with their description rather than just as "snomask".

5 years agoDefine HAS_ARC4RANDOM_BUF in config.h if available.
Peter Powell [Fri, 20 Jul 2018 11:29:36 +0000 (12:29 +0100)]
Define HAS_ARC4RANDOM_BUF in config.h if available.

5 years agoUse arc4random_buf() instead of random() when available.
Peter Powell [Fri, 20 Jul 2018 10:43:41 +0000 (11:43 +0100)]
Use arc4random_buf() instead of random() when available.

5 years agoInitial support for listening on UNIX socket endpoints.
Peter Powell [Fri, 13 Jul 2018 09:28:28 +0000 (10:28 +0100)]
Initial support for listening on UNIX socket endpoints.

5 years agoAdd the family() member to the sockaddrs union.
Peter Powell [Thu, 12 Jul 2018 23:47:53 +0000 (00:47 +0100)]
Add the family() member to the sockaddrs union.

5 years agoRelease v3.0.0 alpha 8.
Peter Powell [Sun, 15 Jul 2018 15:29:52 +0000 (16:29 +0100)]
Release v3.0.0 alpha 8.

5 years agoMerge branch 'insp20' into master.
Peter Powell [Sun, 15 Jul 2018 15:27:48 +0000 (16:27 +0100)]
Merge branch 'insp20' into master.

5 years agoUse mysql_real_escape_string instead of mysql_escape string.
Peter Powell [Sun, 15 Jul 2018 13:11:04 +0000 (14:11 +0100)]
Use mysql_real_escape_string instead of mysql_escape string.

This is not exploitable as far as I know but it is probably best
that we use the newer function just in case.

Closes #649 (although the attack mentioned in that issue was not
feasible).

5 years agoImplement support for the WHOX extension.
Peter Powell [Thu, 12 Jul 2018 13:30:59 +0000 (14:30 +0100)]
Implement support for the WHOX extension.

This is a massive rewrite of core_who which was initially developed
by Adam in 2014. I have rebased and cleaned it up and tightened up
compliance with the specifications.

Co-authored-by: Adam <Adam@anope.org>
5 years agoClean up the WHO helpop documentation.
Peter Powell [Thu, 12 Jul 2018 00:23:06 +0000 (01:23 +0100)]
Clean up the WHO helpop documentation.

5 years agoFix replying with the source user in oper-restricted WHO lookups.
Peter Powell [Wed, 11 Jul 2018 11:08:19 +0000 (12:08 +0100)]
Fix replying with the source user in oper-restricted WHO lookups.

5 years agoSwitch core_dns validation to use InspIRCd::IsHost.
Peter Powell [Fri, 29 Jun 2018 10:29:08 +0000 (11:29 +0100)]
Switch core_dns validation to use InspIRCd::IsHost.

5 years agoSwitch <server:name> validation to use InspIRCd::IsHost.
Peter Powell [Fri, 29 Jun 2018 10:28:53 +0000 (11:28 +0100)]
Switch <server:name> validation to use InspIRCd::IsHost.

5 years agoAdd InspIRCd::IsHost for checking the validity of hostnames.
Peter Powell [Fri, 29 Jun 2018 10:28:19 +0000 (11:28 +0100)]
Add InspIRCd::IsHost for checking the validity of hostnames.

5 years agoAdd a ConfigTag::getString overload that calls a validation method.
Peter Powell [Fri, 29 Jun 2018 10:26:51 +0000 (11:26 +0100)]
Add a ConfigTag::getString overload that calls a validation method.

5 years agoAllow exempting of registered users from securelist.
Peter Powell [Tue, 26 Jun 2018 15:27:57 +0000 (16:27 +0100)]
Allow exempting of registered users from securelist.

5 years agoAdd a silent option to <options:restrictbannedusers>.
Peter Powell [Tue, 10 Jul 2018 19:32:08 +0000 (20:32 +0100)]
Add a silent option to <options:restrictbannedusers>.

This is useful when dealing with spambots that switch method when
they receive ERR_CANNOTSENDTOCHAN.

5 years agoUpdate the readme so that it is actually useful.
Peter Powell [Tue, 10 Jul 2018 17:11:57 +0000 (18:11 +0100)]
Update the readme so that it is actually useful.

5 years agoRename the license file so that people can find it easier.
Peter Powell [Tue, 10 Jul 2018 15:24:54 +0000 (16:24 +0100)]
Rename the license file so that people can find it easier.

5 years agoFix the configure checks for eventfd(), <stdint.h>, and strlcpy().
Peter Powell [Tue, 3 Jul 2018 14:52:40 +0000 (15:52 +0100)]
Fix the configure checks for eventfd(), <stdint.h>, and strlcpy().

Closes #1503.

5 years agoUse !empty() instead of 'size() > 0' when checking parameter count.
B00mX0r [Tue, 3 Jul 2018 15:07:39 +0000 (16:07 +0100)]
Use !empty() instead of 'size() > 0' when checking parameter count.

6 years agoAlways show Make commands for the user to execute in quotes.
Peter Powell [Tue, 26 Jun 2018 15:38:34 +0000 (16:38 +0100)]
Always show Make commands for the user to execute in quotes.

Fixes #1189.

6 years agoAllow relative paths to be passed in --config on boot.
Peter Powell [Mon, 25 Jun 2018 11:56:14 +0000 (12:56 +0100)]
Allow relative paths to be passed in --config on boot.

Closes #1115.

6 years agoShow the package name in the message when doing pkg-config lookups.
Peter Powell [Fri, 25 May 2018 10:09:51 +0000 (11:09 +0100)]
Show the package name in the message when doing pkg-config lookups.

6 years agoClarify the documentation for m_httpd and m_httpd_{config,stats}.
Peter Powell [Mon, 18 Jun 2018 02:28:58 +0000 (03:28 +0100)]
Clarify the documentation for m_httpd and m_httpd_{config,stats}.

Thanks to @SleepyEntropy for pointing out that multiple internet-
accessible servers do not have these modules correctly configured.

6 years agoFix invalid conversion from 'const char*' to 'char*' on FreeBSD.
Peter Powell [Fri, 8 Jun 2018 07:44:39 +0000 (08:44 +0100)]
Fix invalid conversion from 'const char*' to 'char*' on FreeBSD.

6 years agoAdd --nopid command line option (#1497).
Chris Novakovic [Mon, 4 Jun 2018 11:40:32 +0000 (12:40 +0100)]
Add --nopid command line option (#1497).

Add a --nopid command line option, which causes a PID file not to be
written to the file system regardless of the presence of the <pid> tag
in the configuration file or the value of its "file" variable if it is
present.

6 years agoUse the `pwd` tool that is in the path rather than `/bin/pwd`.
Peter Powell [Tue, 1 May 2018 17:47:08 +0000 (19:47 +0200)]
Use the `pwd` tool that is in the path rather than `/bin/pwd`.

6 years agoImprove support for MOTD escape codes.
Peter Powell [Thu, 29 Mar 2018 18:04:11 +0000 (19:04 +0100)]
Improve support for MOTD escape codes.

- Implement escapes for italic, monospace, and strikethrough.
- Use the escape codes in the example MOTDs to demonstrate their
  formatting effects.
- Remove support for octal escape codes. In modern computing octal
  is rarely used and is confusing for users who might confuse it
  for decimal.

6 years agoAlways process MOTD formatting escape codes.
Peter Powell [Thu, 29 Mar 2018 16:45:56 +0000 (17:45 +0100)]
Always process MOTD formatting escape codes.

The options for disabling these were added to keep compatibility
with previous 2.0 releases and are not needed any more.

6 years agoFix some oversights relating to numerics.
Peter Powell [Sun, 22 Apr 2018 20:58:15 +0000 (21:58 +0100)]
Fix some oversights relating to numerics.

- ERR_CANNOTSENDTOCHAN only takes the channel name and a message.
- ERR_INVALIDCAPCMD is 410 not 232.

6 years agoRelease v3.0.0 alpha 7.
Peter Powell [Sun, 22 Apr 2018 14:18:28 +0000 (15:18 +0100)]
Release v3.0.0 alpha 7.

6 years agoMove a bunch of optional module numerics to the module source file.
Peter Powell [Sun, 22 Apr 2018 13:31:28 +0000 (14:31 +0100)]
Move a bunch of optional module numerics to the module source file.

6 years agoReplace ERR_{NOCTCPALLOWED,WORDFILTERED} with ERR_CANNOTSENDTOCHAN.
Peter Powell [Sun, 22 Apr 2018 12:31:00 +0000 (13:31 +0100)]
Replace ERR_{NOCTCPALLOWED,WORDFILTERED} with ERR_CANNOTSENDTOCHAN.

There is no reason for these responses to have their own numerics
when other modules do not. The only thing this does is make life
harder for client developers.

6 years agoMerge tag 'v2.0.26' into master.
Peter Powell [Sat, 21 Apr 2018 11:04:43 +0000 (12:04 +0100)]
Merge tag 'v2.0.26' into master.

6 years agoRelease v2.0.26
Peter Powell [Fri, 20 Apr 2018 18:53:01 +0000 (19:53 +0100)]
Release v2.0.26

6 years agoOptionally do not notify users if their messages are blocked by certain modules ...
Robby [Fri, 20 Apr 2018 14:28:28 +0000 (16:28 +0200)]
Optionally do not notify users if their messages are blocked by certain modules (#1134).

Closes #711.

6 years agoTell the rehasher if an exception is thrown by a module on rehash.
Peter Powell [Mon, 16 Apr 2018 18:07:53 +0000 (19:07 +0100)]
Tell the rehasher if an exception is thrown by a module on rehash.

6 years agoRewrite m_denychans.
Peter Powell [Thu, 15 Feb 2018 11:30:57 +0000 (11:30 +0000)]
Rewrite m_denychans.

- The configuration is now validated on ReadConfig and parsed into
  objects.

- Allow redirecting to channels that don't yet exist. There is no
  technical reason to not allow this and I believe that it would
  be a lot less confusing to users if we allowed this.

- Flatten a bunch of nested if statements.

6 years agoConvert some usages of ato[il] to use ConvToNum.
Peter Powell [Mon, 16 Apr 2018 21:20:29 +0000 (22:20 +0100)]
Convert some usages of ato[il] to use ConvToNum.

6 years agoFix m_ircv3_sts not having the VF_VENDOR flag set.
Peter Powell [Mon, 16 Apr 2018 17:32:55 +0000 (18:32 +0100)]
Fix m_ircv3_sts not having the VF_VENDOR flag set.

6 years agoCall OnUserMessageBlocked when a PRIVMSG or a NOTICE is blocked.
Peter Powell [Mon, 16 Apr 2018 16:02:42 +0000 (17:02 +0100)]
Call OnUserMessageBlocked when a PRIVMSG or a NOTICE is blocked.

This is necessary to allow m_ircv3_echomessage to pretend that a
message was echoed successfully. This is useful as it doesn't let
spammers know that their message was blocked.

6 years agoAdd range checking to ConfigTag::getFloat.
Peter Powell [Sat, 14 Apr 2018 15:11:57 +0000 (16:11 +0100)]
Add range checking to ConfigTag::getFloat.

6 years agoAdd ConfigTag::getUInt for reading unsigned config values.
Peter Powell [Sat, 14 Apr 2018 14:43:03 +0000 (15:43 +0100)]
Add ConfigTag::getUInt for reading unsigned config values.

6 years agoConvert ConfigTag::getDuration to return an unsigned long.
Peter Powell [Sat, 14 Apr 2018 13:59:35 +0000 (14:59 +0100)]
Convert ConfigTag::getDuration to return an unsigned long.

6 years agoExtract ConfigTag::getInt magnitude logic to a function template.
Peter Powell [Sat, 14 Apr 2018 13:04:12 +0000 (14:04 +0100)]
Extract ConfigTag::getInt magnitude logic to a function template.

6 years agoConvert ConfigTag::CheckRange to a function template.
Peter Powell [Sat, 14 Apr 2018 12:17:20 +0000 (13:17 +0100)]
Convert ConfigTag::CheckRange to a function template.

6 years agoRemove the default value in ConfigTag::get{Duration,Float,Int}.
Peter Powell [Sat, 14 Apr 2018 15:53:03 +0000 (16:53 +0100)]
Remove the default value in ConfigTag::get{Duration,Float,Int}.

6 years agoUse an oper priv instead of a config flag for overriding nonicks.
Peter Powell [Mon, 16 Apr 2018 14:04:45 +0000 (15:04 +0100)]
Use an oper priv instead of a config flag for overriding nonicks.

6 years agoImprove some documentation (#1483).
Matt Schatz [Mon, 16 Apr 2018 09:02:49 +0000 (03:02 -0600)]
Improve some documentation (#1483).

* Improve exemptchanops in inspircd.conf.example (<options>)
  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

6 years agoUse an oper priv instead of a config flag for overriding callerid.
Peter Powell [Sun, 15 Apr 2018 21:37:04 +0000 (22:37 +0100)]
Use an oper priv instead of a config flag for overriding callerid.

6 years agoReplace the remaining use of irc::string with irc::find.
Peter Powell [Sat, 14 Apr 2018 23:20:56 +0000 (00:20 +0100)]
Replace the remaining use of irc::string with irc::find.

6 years agoRemove helpop sections which are now incorrect.
Peter Powell [Sat, 14 Apr 2018 19:02:44 +0000 (20:02 +0100)]
Remove helpop sections which are now incorrect.

Both the static module flag and the CLEARCHAN command have been
removed.

6 years agoFix customprefix modes not being deleted when the module unloads.
Peter Powell [Sat, 14 Apr 2018 16:30:30 +0000 (17:30 +0100)]
Fix customprefix modes not being deleted when the module unloads.

6 years agoFix ModuleManager's external source lists not working with HTTPS.
Peter Powell [Wed, 11 Apr 2018 23:30:53 +0000 (00:30 +0100)]
Fix ModuleManager's external source lists not working with HTTPS.

6 years agoFix blank instead of empty PART message when a user is shunned
B00mX0r [Mon, 9 Apr 2018 00:28:37 +0000 (17:28 -0700)]
Fix blank instead of empty PART message when a user is shunned

6 years agoChange some usage of "gecos" to "real name"
genius3000 [Tue, 10 Apr 2018 17:05:11 +0000 (11:05 -0600)]
Change some usage of "gecos" to "real name"

Within the example configs, helpops, some server sent messages, and
simple code comments: change the primary usage of "gecos" to
"real name" (or "realname" where fitting).

6 years agoChange ServerInfo::gecos to description
genius3000 [Tue, 10 Apr 2018 16:33:46 +0000 (10:33 -0600)]
Change ServerInfo::gecos to description

6 years agoRemove swhois messages set in the oper block on deoper.
Peter Powell [Sun, 21 Jan 2018 13:33:44 +0000 (13:33 +0000)]
Remove swhois messages set in the oper block on deoper.

Closes #1240.

6 years agoOptimize some behaviour in the core (#1476).
Dylan Frank [Mon, 9 Apr 2018 03:41:04 +0000 (20:41 -0700)]
Optimize some behaviour in the core  (#1476).

6 years agoFix an invalid mode parameters numeric upon attempting to view a list mode
B00mX0r [Sat, 7 Apr 2018 23:11:40 +0000 (16:11 -0700)]
Fix an invalid mode parameters numeric upon attempting to view a list mode

6 years agoInclude modules/whois.h directly from files that use it.
Peter Powell [Sat, 7 Apr 2018 14:48:30 +0000 (15:48 +0100)]
Include modules/whois.h directly from files that use it.

6 years agoMove OnStats from the core to a cross-module event.
Peter Powell [Sat, 7 Apr 2018 14:07:24 +0000 (15:07 +0100)]
Move OnStats from the core to a cross-module event.

Some core code still exists in the XLine system but this will be
replaced when the XLine system is replaced later.

6 years agoFix some more oversights in m_geoip.
Peter Powell [Sat, 7 Apr 2018 14:14:53 +0000 (15:14 +0100)]
Fix some more oversights in m_geoip.

- Add the G: extban to the EXTBAN 005 token.
- Use CXX11_OVERRIDE with ReadConfig and OnCheckBan.

Thanks to @genius3000 for pointing these out.

6 years agoFix disabling the GeoIP extban in m_geoip.
Peter Powell [Sat, 7 Apr 2018 13:06:25 +0000 (14:06 +0100)]
Fix disabling the GeoIP extban in m_geoip.

6 years agom_sqlauth: Allow specifying what hash algos to provide hashes from.
Daniel Vassdal [Sat, 21 Feb 2015 10:50:09 +0000 (11:50 +0100)]
m_sqlauth: Allow specifying what hash algos to provide hashes from.

Defaults to md5,sha256 to be compatible with old configs.

Adds new parameter `kdf`. If this is set (to e.g. bcrypt), the hash
will be compared locally. This requires the password column to be
specified in <sqlauth:column>.

Closes #741

6 years agoSQL: Add HasColumn() to check if a result contains a named column.
Daniel Vassdal [Mon, 2 Mar 2015 02:06:55 +0000 (03:06 +0100)]
SQL: Add HasColumn() to check if a result contains a named column.

6 years agoFix ELine::Matches returning false on existing match
genius3000 [Mon, 26 Mar 2018 11:57:22 +0000 (05:57 -0600)]
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.

6 years agoSet User::host before calling ChangeIP()
Peter Powell [Mon, 26 Mar 2018 11:52:35 +0000 (05:52 -0600)]
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.

6 years agoRefactor m_sqloper to be a full opers.conf replacement (#983).
Dylan Frank [Fri, 6 Apr 2018 17:34:15 +0000 (10:34 -0700)]
Refactor m_sqloper to be a full opers.conf replacement (#983).

m_sqloper now supports dynamic fields, works with m_sslinfo, and works with /stats o.

6 years agoImplement support for banning users from channels by country code.
Peter Powell [Fri, 6 Apr 2018 16:53:14 +0000 (17:53 +0100)]
Implement support for banning users from channels by country code.