464 Commits

Author SHA1 Message Date
InspIRCd Robot
4f9abe96a4 Fixes by misspell-fixer 2020-04-21 00:52:12 -06:00
Sadie Powell
44834a66a7 Convert UserType to an enum class. 2020-04-21 04:17:14 +01:00
Matt Schatz
3ed1cc27b1
Switch User::usertype back to an unsigned int.
Leaving it up to the compiler to set the underlying type of the enum
can result in this being a signed int. This variable will not work
as intended as a 2 bit signed int.
This fixes an issue with the Windows build(s) where a server trying
to link would fail with "Protocol violation: Invalid source".
2020-04-19 05:01:04 -06:00
Sadie Powell
bafb721640 Merge branch 'insp3' into master. 2020-04-14 19:57:10 +01:00
Sadie Powell
6fcbfc0723 Add support for limiting what opers can subscribe to snomasks. 2020-04-11 15:44:51 +01:00
Sadie Powell
e1ed9b275f Merge branch 'insp3' into master. 2020-04-09 18:06:50 +01:00
Sadie Powell
9ebda853f5 Fix various documentation and formatting issues. 2020-03-30 17:24:12 +01:00
Sadie Powell
b9acde9aaf Merge branch 'insp3' into master. 2020-03-18 13:51:23 +00:00
Sadie Powell
0a67b8861a Warn if the server config contains an unhashed password.
This will be made a hard failure in v4.
2020-03-11 15:06:19 +00:00
Sadie Powell
98e4ddfb21 Use C++11 inline initialisation for class members. 2020-02-06 11:25:42 +00:00
Sadie Powell
1de6f5b4a9 Merge branch 'insp3' into master. 2020-01-17 12:36:09 +00:00
InspIRCd Robot
aa692dc103 Update copyright headers. 2020-01-11 22:14:43 +00:00
Sadie Powell
7b68936321 Merge branch 'insp3' into master. 2019-11-13 15:24:45 +00:00
Peter Powell
d0f802e30c Implement serialisation of users.
This allows for various things which will be coming in the future.

e.g. Transferring users to another server on upgrade.
2019-10-14 11:03:03 +01:00
Peter Powell
554308f654 Add null pointer checks to IS_{LOCAL,REMOTE,SERVER}.
I don't know of any places this causes issues but its better to be
safe than sorry.
2019-09-29 19:52:05 +01:00
Peter Powell
a4305d8f3c Add the server id to the Server class. 2019-09-23 13:18:14 +01:00
Sadie Powell
ada6646b65 Merge branch 'insp3' into master. 2019-07-27 19:12:29 +01:00
Peter Powell
5f387071d3 Add a method for swapping user I/O handlers. 2019-07-21 16:57:19 +01:00
Sadie Powell
1d5b18de82 Merge branch 'insp3' into master. 2019-05-15 15:26:55 +01:00
Peter Powell
2cd6efcc64 Rename HasPermission to HasCommandPermission. 2019-04-19 10:05:06 +01:00
Peter Powell
21f0718c4a Remove the 'noisy' mode for HasPrivPermission.
This was only used in one place.
2019-04-19 00:39:57 +01:00
Sadie Powell
e75f03d32f Merge branch 'insp3' into master. 2019-02-15 16:24:02 +00:00
Peter Powell
a7fc2fe0dc Replace GetServerPort() with server_sa.port(). 2019-02-15 11:35:25 +00:00
Peter Powell
168ee80490 Rename User::nping to nextping for consistency with lastping. 2019-02-15 11:35:25 +00:00
Sadie Powell
0fab643858 Convert repetitive functions to use C++11 variadic templates. 2019-01-25 15:17:37 +00:00
Sadie Powell
c78ecdf579 Replace the override macro with the override keyword. 2019-01-25 02:52:11 +00:00
Peter Powell
cbef0241a0 Implement support for the extended tag space for client tags. 2019-01-24 14:28:21 +00:00
linuxdaemon
f400d5f394 Redo OnSetEndPoint logic to fix duplicate clones (#1549). 2019-01-14 11:48:45 +00:00
Matt Schatz
f2e3fd5952 Improve X-line text consistency.
- Change any "-Line", ":Line", or "*line" to "-line" throughout
the X-line code, comments, and documentation.
- Add periods to the end of some notices.
- Correct a typo in the Q-line code comments.
- Update the filter module documentation (shun addition).

Co-authored-by: Robby <robby@chatbelgie.be>
2019-01-09 10:07:09 +00:00
Peter Powell
654355c2d1 Reject setting modes which are null or not registered. 2018-12-12 14:43:55 +00:00
Peter Powell
d62c870ffb Store the type of a StreamSocket within itself.
Similar to with IOHooks this allows you to convert StreamSocket to
a UserIOHandler quickly.
2018-10-25 13:50:43 +01:00
Peter Powell
98a80a730e Fix unregistered user modes thinking they are enabled. 2018-10-18 10:59:52 +01:00
Peter Powell
58a0a7e014 Implement IRCv3 message tag support.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13 21:51:11 +01:00
Peter Powell
abbf70b2a3 Rename User::fullname to realname and make it private. 2018-07-30 18:50:34 +01:00
Peter Powell
7bde9de9b3 Replace most usages of "name" with "real" or "real name". 2018-07-30 18:34:57 +01:00
Peter Powell
8cb20e3545 Replace most usages of "GECOS" with "real" or "real name". 2018-07-30 18:30:11 +01:00
Peter Powell
09c5439c02 Add a module which implements the HAProxy PROXY v2 protocol. 2018-07-26 12:35:22 +01:00
Peter Powell
91e0af0fc4 Add the override keyword in places that it is missing.
GCCs warnings for this are much better than Clangs.
2017-11-21 15:51:45 +00:00
Peter Powell
36040be295 Fix a ton of -Wsign-conversion warnings. 2017-11-17 15:33:01 +00:00
Peter Powell
d865b43486 Hide User#host and User#dhost and use accessors to modify them.
This removes the need to invalidate the cache after changing a
user's hostname.
2017-10-28 16:16:10 +01:00
Peter Powell
08f6f05666 Change SetClientIP to take a C++ string instead of a char array. 2017-10-27 19:15:23 +01:00
Peter Powell
a62ae50007 Fix a bunch of Doxygen warnings. 2017-08-26 09:58:15 +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
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
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
Peter Powell
02575ecbbb Allow classes to take a port range. 2016-10-25 09:36:54 +01: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
f67aba687b Remove User::SendText() and overrides completely 2016-03-30 12:37:29 +02:00
Attila Molnar
5fbb5a0b2c Make User::WriteRemoteNumeric() virtual, implement it in SpanningTree::RemoteUser 2016-03-29 16:43:30 +02:00