GottemHams
43b03e75a6
Fixed some now-outdated comments in require-module, also send deny module notices globally instead of locally and change the default message for this
2019-09-12 21:45:33 +02:00
GottemHams
4a85e4cd8b
Load require-module by default [skip-ci]
2019-09-12 20:54:09 +02:00
GottemHams
ab7cdbf2a7
Fix a couple of bugs recently introduced in require-module, also delay SQUITting until after the current SMOD command has been parsed
2019-09-12 19:48:33 +02:00
Bram Matthys
70410b3f33
Remove unused variables (67 files done, will do rest another time).
2019-09-12 17:57:01 +02:00
Bram Matthys
8d2dad4796
chanmodes/floodprot: remove old +f 1:1 conversion code, cleanup a bit
...
and remove unused variables (unused now, that is).
2019-09-12 16:49:20 +02:00
Bram Matthys
c3f7bbd9c0
require-mode: account for a little bit more room in S2S command
...
(not just hostname but also the command "SMOD" etc.. let's just say
16 bytes for now)
..and some minor cleanups of variables that are not needed.
2019-09-12 07:55:34 +02:00
Bram Matthys
cafe3cfd6d
Some S2S command changes to new require-modules module:
...
REQMODS Gmodname:version ....
to:
SMOD G:modname:version ....
Also, call the module require-module to be consistent with the
naming of the configuration directive.
Not sure yet of the set name, but call it set::require-module for
now as well.
2019-09-12 07:38:55 +02:00
Bram Matthys
88cbc38ff2
Do some more syntax checking, even for servers.
...
This fixes a crash in case of incorrect server to server traffic.
2019-09-12 07:16:18 +02:00
GottemHams
3948c3a74b
Forgot to remove a lil' comment :D [skip-ci]
2019-09-11 22:26:53 +02:00
GottemHams
358a31eaee
First draft of require-modules module (require modules globally or deny them)
2019-09-11 22:18:03 +02:00
GottemHams
daa2441c1c
Stray tab in rmtkl :D
2019-09-11 22:14:03 +02:00
Bram Matthys
c833ac2082
And some final cleanups of today, nothing important.
2019-09-11 20:07:47 +02:00
Bram Matthys
482c85de44
Get rid of this sptr->serv->user, as we already have sptr->serv->by
...
to track who initiated the connect. It also didn't seem to be displayed
anywhere but in /TRACE.
2019-09-11 19:46:52 +02:00
Bram Matthys
5659a2b177
Document more core structs.
...
[skip ci]
2019-09-11 19:44:10 +02:00
Bram Matthys
9b113c27e4
Document some more structs and group them in a logical place.
2019-09-11 19:07:11 +02:00
Bram Matthys
c72d848b61
Get rid of MembershipL since there's no difference anymore between
...
local membership structs (MembershipL) and remote ones (Membership),
so they are now all called... Membership.
2019-09-11 17:53:29 +02:00
Bram Matthys
bf2c5110db
IsPerson() -> IsUser(), MyClient() -> MyUser(), etc.
...
This so we have a few simple concepts:
Client: this can be a user, server, or something unknown yet
Then the type of clients:
User: this is a user, someone with a nick name.
Server: this is a server
Etc.
2019-09-11 17:43:17 +02:00
Bram Matthys
fcf0ff4e3c
Document client statuses (cptr->status) and some more renames.
2019-09-11 16:52:11 +02:00
Bram Matthys
2df5326615
Overhaul of all client flag macros (mass renaming, always use getters/setters/checkers)
2019-09-11 16:00:47 +02:00
Bram Matthys
e372e9118d
Move cptr->count to cptr->local->identbufcnt since this only used by
...
the ident reading code nowadays, which obviously only happens for
locally connected users.
2019-09-11 14:36:12 +02:00
Bram Matthys
d80e601760
Rename sptr->username to sptr->ident, since that is what it is.
...
[skip ci]
2019-09-11 14:31:14 +02:00
Bram Matthys
c69bdbe175
->status is now an enum of ClientStatus and STAT_xx -> CLIENT_STATUS_xx
2019-09-11 14:27:32 +02:00
Bram Matthys
792709bf4f
Move cptr->fd to cptr->local->fd. This may cause some crashes while
...
the rest of the code is audited / checked ;)
2019-09-11 14:21:07 +02:00
Bram Matthys
68b7368305
Document Client struct
...
[skip ci]
2019-09-11 14:14:09 +02:00
Bram Matthys
cb236eea88
Rename cptr->from to cptr->direction, since the 'from' is rather misleading
...
as cptr->from is NOT (necessarily) the server where cptr is connected to.
So we now call it cptr->direction since it indicates the directly connected
server (or &me)... in other words: the direction of the client path.
2019-09-11 14:03:27 +02:00
Bram Matthys
6a019d6188
Let's allow user connections.
...
*sigh*
(at least we have automated tests for this)
2019-09-11 13:44:55 +02:00
Bram Matthys
628aab3a76
Duh, check NULL pointer properly in Auth_Check() in case of NULL structs.
...
Fixes crash-on-connect due to an earlier commit last hour.
2019-09-11 13:38:49 +02:00
Bram Matthys
1e6a3bdd55
Bump PASSWDLEN to something "large enough for everyone" (256) rather than current (48).
2019-09-11 13:27:45 +02:00
Bram Matthys
786054e6b7
Remove 'md5', 'sha1' and 'ripemd160' from auth code. These are insecure and
...
old authentication types that are already deprecated in UnrealIRCd 4.x.
They don't contain any rounds which means they can be cracked at a rate of
millions per second. Use the secure hashing type 'argon2' instead
(or, if you must, use the less secure 'bcrypt' type).
2019-09-11 13:17:28 +02:00
Bram Matthys
04607f5b1a
Various auth cleanups: Auth_Check() now returns 1 on allow and 0 on deny (!)
...
to keep things simple, rather than having 4 different return values
(yes.. FOUR!).
[skip ci]
2019-09-11 13:10:15 +02:00
Bram Matthys
05e776fb71
More cleanups: now mostly auth-related: use better names and use enums
...
for authentication types. Rename Auth_Make to Auth_Hash. Add docs. etc.
2019-09-11 12:37:34 +02:00
Bram Matthys
e8d53ffe8e
And more type changes to make things consistent and more readable.
2019-09-11 11:04:31 +02:00
Bram Matthys
2a5ea10453
Lots of changes again. Most notable: Cmdoverride -> CommandOverride,
...
including things like CallCmdoverride() to CallCommandOverride().
Type changes like aTKline -> TKL and many more (in particular
aSomething to Something etc. such as aWatch to Watch) but these are
less used by 3rd party module coders.
2019-09-11 10:20:00 +02:00
Bram Matthys
f55682cbaa
More (typedef) struct name changes. Mostly configuration but also
...
aCommand to RealCommand. Although not sure if this latter makes
things a lot more descriptive :D. Can revisit later.
(more to follow)
2019-09-11 10:04:47 +02:00
Bram Matthys
23116d344a
Give structs the same name as the typedefs. Rename aClient to Client,
...
aChannel to Channel, and some more. Third party module coders will
love this. But.. it makes things more logical and the doxygen output
will look more clean and logical as well.
(More changes will follow)
2019-09-11 09:48:00 +02:00
GottemHams
fbd7ff1f5a
Implemented set::min-nick-length (default 0 aka no minimum required) and added a line for it to /stats S, as a bonus my editor strips trailing whitespace :D
2019-09-09 20:33:38 +02:00
GottemHams
a0db737408
hideserver module still used old-style version string [skip-ci]
2019-09-09 19:46:46 +02:00
Bram Matthys
5b361e69bb
Get rid of configure check for strtoul and the src/strtoul.c file.
2019-09-09 17:49:10 +02:00
Bram Matthys
ec2fdb82e0
Get rid of configure check for strerror()
2019-09-09 17:45:24 +02:00
Bram Matthys
80bc15c6d3
Apparently our strtoken() is special, don't bother then. Still, get rid of
...
the configure check.
2019-09-09 17:32:59 +02:00
Bram Matthys
1cdbbe043f
Make strtoken() use strtok_r / strtok_s.
...
And get rid of the config check, as strtoken() never existed anyway.
2019-09-09 17:19:25 +02:00
Bram Matthys
e5f73fdbcd
Don't use custom inet_pton{4,6} functions
...
[skip ci]
2019-09-09 17:08:25 +02:00
Bram Matthys
078cfa88ea
Get rid of configure check for strtok()
...
[skip ci]
2019-09-09 16:58:44 +02:00
Bram Matthys
36cb2226cc
Get rid of checking inet_pton/net_ntop. Should be available on IPv6-capable
...
operating systems. And we require IPv6-capable since UnrealIRCd 4 already,
so.. ;)
2019-09-09 16:51:31 +02:00
Bram Matthys
c86d03dcca
Windows build fixes
2019-09-09 16:46:57 +02:00
Bram Matthys
5f9e919b18
Remove more configure checks: malloc.h, AC_FUNC_SETPGRP, AC_FUNC_SETVBUF_REVERSED
...
[skip ci]
2019-09-09 16:38:24 +02:00
Bram Matthys
5e4c481d93
Yes, strcasecmp is always available, configure.
2019-09-09 16:30:02 +02:00
Bram Matthys
ca2239827e
Get rid of NICK_GB2312/NICK_GBK/NICK_GBK_JAP in config.h. I am not aware
...
of anyone actually using these. So running with this was rather untested
(if it worked at all, which I doubt).
2019-09-09 16:20:26 +02:00
Bram Matthys
7d4b7c2fed
Get rid of stricmp/strnicmp (use strcasecmp/strncasecmp)
2019-09-09 16:13:32 +02:00
Bram Matthys
9636f83a2b
Always assume POSIX signals (on non-Windows, that is).
2019-09-09 16:08:18 +02:00