2879 Commits

Author SHA1 Message Date
Peter Powell
9bb631990d Improve the numerics we send in response to MAP.
- Send the same numerics as ircu/ircd-hybrid/charybdis/ratbox/etc.
  These are much more widespread and predate the Unreal numeric we
  currently send.
- Move RPL_MAPUSERS to 018. This numeric is unused and does not
  conflict with RPL_PRIVS like our current one does.
2017-07-13 16:54:18 +01:00
Peter Powell
7851faac62 Merge pull request #1267 from SaberUK/master+config
Store config values in a map instead of a unique vector of pairs.
2017-07-12 16:41:28 +01:00
Peter Powell
d1df2bce56 Add CXX11_OVERRIDE to overridden members that lack it.
This fixes a ton of warnings when building on compilers that
default to C++11 or newer.
2017-07-12 14:41:52 +01:00
Peter Powell
f471083cd0 Merge pull request #1337 from SaberUK/master+merge
Merge v2.0.23 and v2.0.24 into master.
2017-07-12 14:25:28 +01:00
Robin Burchell
8e8b0719bf Improve and centralize socket engine event counters.
The write counters were close to useless because they were only
incremented on a write "event" which is only triggered when writing
would block.

Read handling was a little more useful in that all reads must happen
through the socket engine, so these were happening at the correct time,
but we can clean this up by doing it in the SE itself rather than each
platform port.

This means that both read and write events are now easily and usefully
defined as "a syscall of either read or write was attempted".

We also count empty read and write events as being an event, because
they still were an attempt to poll a socket in some way. This may help
to identify "bad" code which is repeatedly trying to read a socket for
some reason.

Lastly, we check for failed read/write calls, and log them as an error
event. A lot of the time, this is how sockets are determined as being
disconnected (ie. at read/write time).

While we're at it, split Update() in two to make the calls more
self-describing. This has no real impact since only one call is made at
a time anyway.
2017-07-11 14:22:02 +02:00
Peter Powell
c0aba5b728 Merge v2.0.23 and v2.0.24 into master. 2017-07-09 22:45:00 +01:00
Adam
f2e3762ff4
core_dns: add support for txt records
This might be used later by m_dnsbl to get reasons for listings
2017-04-23 16:35:21 -04:00
Peter Powell
81027f3a08 Move the OnCheckExemption hook out of the core. 2017-03-20 11:47:59 +00:00
Peter Powell
756c89cfcc Fix some compiler warnings.
warning: macro name is a reserved identifier [-Wreserved-id-macro]
warning: extra ';' after member function definition [-Wextra-semi]
2017-03-20 10:24:01 +00:00
Peter Powell
7c30114988 Allow <log> tags to specify how often logs should be flushed.
Also use the behaviour behind this to fix #1290.
2017-02-28 05:19:12 +00:00
Peter Powell
4b37c61225 Make the config system case insensitive. 2017-02-04 18:23:22 +00:00
Attila Molnar
2b9f083cb1 cmd_mode Switch to a numeric for showing modes of other users 2016-12-30 19:05:00 +01:00
Attila Molnar
0c061aff64 Clean up User::FormatModes(), rename to GetModeLetters()
Prefix the returned string with '+'
2016-12-30 18:58:31 +01:00
Attila Molnar
03c5ffbdc3 Make ModeHandler::GetUserParameter() const, accept const User 2016-12-30 18:53:04 +01:00
Attila Molnar
8db52f66a2 Make all User::IsModeSet() methods const, accept const ModeHandler 2016-12-30 18:51:56 +01:00
Attila Molnar
0c3b041d1b Deduplicate nickname overruling code
Create LocalUser::OverruleNick(), call it from User::ChangeNick() and the UID handler in spanningtree
2016-12-30 18:44:39 +01:00
Attila Molnar
688275707a Remove remaining doxygen doc for "pcnt" parameters 2016-12-30 17:36:20 +01:00
Peter Powell
3fd1ba753d Store config values in a map instead of a unique vector of pairs. 2016-12-08 02:01:40 +00:00
Peter Powell
02575ecbbb Allow classes to take a port range. 2016-10-25 09:36:54 +01:00
Peter Powell
b8d85c6251 Update stuff for the new versioning system. 2016-09-02 22:13:22 +02:00
Attila Molnar
458ea2029c Bump version to 3.0 in comments and messages 2016-09-02 21:51:19 +02:00
Attila Molnar
65667e7cc2 Fix Windows build and most MSVC warnings 2016-09-02 19:58:44 +02:00
Attila Molnar
787ccb22dc Fix whitespace issues 2016-09-02 13:20:16 +02:00
Attila Molnar
6a35f493f3 Return std::string from Membership::GetAllPrefixChars() 2016-08-30 16:33:46 +02:00
Attila Molnar
e093134393 Change Membership:hasMode() to accept a PrefixMode 2016-08-30 16:19:31 +02:00
Attila Molnar
f0debf907a Pass the ModeHandler to User::HasModePermission()
Mark the method as const
2016-08-30 16:05:01 +02:00
Attila Molnar
f899ea2786 Add const versions of ModeHandler::IsPrefixMode(), IsListModeBase() and IsParameterMode() 2016-08-30 16:01:47 +02:00
Attila Molnar
5a5dcfa4f9 Mark ModeHandler::GetModeChar() and ModeWatcher::GetModeType() as const 2016-08-29 14:50:59 +02:00
Attila Molnar
19f0c09aa7 Convert ModeHandler::GetNumParams() to NeedsParam() that returns a bool 2016-08-29 14:50:08 +02:00
Attila Molnar
6c4a6b1753 Deduplicate mode unregistering code in ModuleManager::DoSafeUnload() and extract into a method 2016-08-29 14:33:25 +02:00
Attila Molnar
f9455b925d Remove unused EventHandlerIter typedef 2016-08-29 14:30:41 +02:00
Adam
14556541bb core_dns Make question a member of request, move common FindAnswerOfType to be a member of query 2016-08-25 17:12:48 +02:00
Attila Molnar
dfc00bf4ad Update UserManager documentation and comments 2016-08-24 12:41:02 +02:00
Attila Molnar
0aa6c41340 Update documentation in hashcomp.h 2016-08-22 17:22:19 +02:00
Attila Molnar
333fe87ca7 Remove all non-member irc::string operators 2016-08-22 17:13:18 +02:00
Attila Molnar
200062cd5e Remove now unused SearchAndReplace() function 2016-08-22 17:11:38 +02:00
Attila Molnar
5378b913a6 Add stdalgo::string::replace() and replace_all() 2016-08-22 17:10:41 +02:00
Attila Molnar
78b6ad984b Remove now unused assign() functions 2016-08-22 17:03:59 +02:00
Attila Molnar
ecef36edca Create irc::equals() from StrHashComp
Make StrHashComp a wrapper around it
2016-08-22 16:49:18 +02:00
Attila Molnar
90ea1b01b7 Add stdalgo::string::equalsci and use it instead of irc::string for case-insensitive comparison 2016-08-22 16:46:44 +02:00
Attila Molnar
adc366ab1d Replace irc::string in XLineLookup with irc::insensitive_swo map 2016-08-22 16:37:32 +02:00
Attila Molnar
c808355050 Replace irc::string usage in CommandParser::LoopCall() with irc::insensitive_swo set 2016-08-22 16:35:11 +02:00
Attila Molnar
e1e9341a84 Remove unused irc::tokenstream::GetToken() overload accepting an irc::string 2016-08-22 16:34:00 +02:00
Attila Molnar
0612de153f Remove unused irc::hash 2016-08-22 16:32:51 +02:00
Attila Molnar
0424d98e0e Remove unused trim() function 2016-08-22 16:30:02 +02:00
Attila Molnar
b9e11915a9 Merge insp20 2016-08-17 12:49:48 +02:00
Attila Molnar
96642de3b2 Update description of class EventHandler
Readable() and Writeable() was removed long ago
2016-08-11 11:23:38 +02:00
Attila Molnar
c6ebf05e02 Replace HandleEvent() references in the SocketEngine documentation with OnEventHandler*() 2016-08-11 11:19:28 +02:00
Attila Molnar
85456f0bd3 Remove virtual destructor of class Version
No classes inherit from it and it is only used as the return value from Module::GetVersion() which returns it by value
2016-08-11 10:58:21 +02:00
Attila Molnar
40e42a47a7 Update comments for classes IOHookProvider and IOHook 2016-08-08 16:30:04 +02:00