Bram Matthys
8603c2eb71
Update hunt_server() so command is really the command (eg "LUSERS") and
...
not a format string (eg ":%s LUSERS %s"). It now simply concats all parv[]'s.
That is, up to parc count. And it automatically does the :stuff for the
last parameter if it contains spaces or starts with a : etc.
This gets rid of a bit sketchy code with an arbitrary maximum etc.
Now it's just:
if (hunt_server(client, NULL, "REHASH", 1, parc, parv) != HUNTED_ISME)
return;
This has one side effect, though:
Previously we used the format string, so it may be possible for S2S
traffic to now have more arguments then before here and there.
Eg:
* It could be that the caller was using a format string to
intentionally cut off an extra parameter at the end.
You can still do that if you call with eg parc-1 instead of parc.
I don't think there were any such cases though, but hard to rule out.
* Extranous parameters may show up in S2S traffic where it was
previously unexpected.
2021-09-25 14:49:19 +02:00
Bram Matthys
b5375de52d
Move some reputation log msgs to ULOG_DEBUG (they already required DEBUGMODE)
2021-09-25 14:24:15 +02:00
Bram Matthys
299c885802
More room for log buffer
2021-09-25 14:23:20 +02:00
Bram Matthys
10ec3c164a
Rename the old cloaking module to "cloak_md5" (UnrealIRCd 3.2.1 - 5.2.X)
...
It was used from July 2004 and served us well it seems.
2021-09-25 11:23:14 +02:00
Bram Matthys
ec8f54ec26
Update cloaking key mismatch error and rename some stuff.
2021-09-25 11:19:15 +02:00
Bram Matthys
5100d4863c
Guard against multiple log blocks logging to the same file.
2021-09-25 11:12:00 +02:00
Bram Matthys
47279108e4
Use get_operclass() in extbans/operclass as well.
2021-09-25 11:02:39 +02:00
Bram Matthys
cac8c34bcc
JSON logging: expand operlogin and operclass for users who are ircop.
...
This uses the new get_operlogin() / get_operclass() functions.
Also updated whois code to use them too.
2021-09-25 10:58:39 +02:00
Bram Matthys
b95eb0b3b7
Add get_operlogin() and get_operclass() functions to make things easy.
...
This retrieves the oper login (/OPER thislogin ...) and operclass of
local and remote users.
2021-09-25 10:57:00 +02:00
Bram Matthys
c1378abc32
Initialize variables to NULL (duh)
2021-09-25 10:33:47 +02:00
Bram Matthys
677fcf6b71
Move the HOOKTYPE_LOCAL_OPER back out of remove_oper_privileges().
...
Can't have it in that function as it may be called even when the
user was not oper before (as a safety precaution). Pitty.
2021-09-25 10:32:25 +02:00
Bram Matthys
ce5917e0d9
Expose operlogin and operclass via moddata so they can be seen in WHOIS
...
and used for auditting purposes across servers (assuming the servers
itself can be trusted).
This is done via the 'operlogin' module which is loaded by default.
Obviously for opers of U5 and below this information is not available.
This also changes the HOOKTYPE_LOCAL_OPER hook to include oper block info:
-int hooktype_local_oper(Client *client, int add);
+int hooktype_local_oper(Client *client, int add, ConfigItem_oper *oper_block);
2021-09-25 10:28:36 +02:00
Bram Matthys
b00743fa79
Bump moddata slots
...
[skip ci]
2021-09-25 10:24:32 +02:00
Bram Matthys
edbfaaf95d
JSON logging: expand user modes, snomasks, and oper login (if available)
...
This also adds a function get_usermode_string_r(), which requires
you to specify the buffer (and buffer length) for building the
umode string.
2021-09-25 09:45:30 +02:00
Bram Matthys
6e74cd133b
Expand channel modes in JSON logging messages of 'channel'
2021-09-25 09:28:00 +02:00
Bram Matthys
135c5f0747
Use strlcpy()/strlcat()/strlcat_letter() in channel_modes() instead
...
of pointer calculations. We don't need the speed improvement anymore.
2021-09-25 09:21:31 +02:00
Bram Matthys
bf7a72a850
Usermode_Table[].flag -> Usermode_Table[].letter
...
just like how it is now in U6 in channel modes and extended bans
2021-09-25 09:13:34 +02:00
Bram Matthys
fbf3a51517
Add HOOKTYPE_CAN_SET_TOPIC, which works similar to HOOKTYPE_CAN_KICK.
...
Move checking of +t restrictions to chanmodes/topiclimit.
Move checking for +m restrictions to chanmodes/moderated.
Now the only check remaining in topic is for +b (banned users)
which is fine I think.
2021-09-25 09:04:19 +02:00
Bram Matthys
618049fca1
Add buildnumeric() function, which will only be used sporadically as you
...
would normally use sendnumeric() instead.
The buildnumeric() function prepares a buffer but does not send it.
It is used in eg CAN_KICK / CAN_SET_TOPIC, where you need to set an
'errbuf' with a full IRC protocol line to reject the request (which
then may or may not be sent depending on operoverride privileges).
2021-09-25 09:03:48 +02:00
Bram Matthys
847f2fc384
Remove is_ip_valid() as we already have is_valid_ip(), and update
...
the doxygen docs a bit for that function.
2021-09-25 08:17:47 +02:00
Bram Matthys
c582a29f09
Update doxygen docs a bit (minimal) for channel access functions.
2021-09-25 08:13:18 +02:00
Bram Matthys
fabe16a95c
Get rid of has_voice(), is_half_op(), is_skochanop(), is_chan_op(), is_chanadmin(),
...
is_chanowner(). Using check_channel_access() instead now.
2021-09-25 08:00:57 +02:00
Bram Matthys
0b6336c5f9
Update config.guess and config.sub from 2015-03-04 to 2021-06-03
2021-09-24 18:20:13 +02:00
Bram Matthys
ca9132b345
Update geoip-classic.tar.gz. Changes:
...
In configure remove AC_FUNC_MALLOC and AC_FUNC_REALLOC.
These don't do anything, except they cause a build failure on
Ubuntu 21 and later (together with openssl 3.0.0 anyway).
2021-09-24 18:11:43 +02:00
Bram Matthys
39ead41fae
Update notes about release notes a bit
...
[skip ci]
2021-09-24 17:50:39 +02:00
Bram Matthys
8acd17b0ef
Make the error a bit more clear (that the two lines are related)
...
[skip ci]
2021-09-24 17:46:57 +02:00
Bram Matthys
efb16159f3
Add check for missing include "snomasks.default.conf";
...
Well, not literally, but indirectly :D
2021-09-24 17:44:57 +02:00
Bram Matthys
f85732a7e0
When unreal_log() was called incorrectly and wanted to print a BUG
...
error message about this it crashed. Can't use NULL va and the
null_va trick didn't work either, so.. don't use va stuff at all..
2021-09-24 17:33:30 +02:00
Bram Matthys
fa9957ac6b
Add GeoIP engine prompt to ./Config
2021-09-24 17:19:02 +02:00
Bram Matthys
3fda96448d
Fix crash due to invalid subsystem use in tls.c
...
[skip ci]
2021-09-24 17:17:03 +02:00
Bram Matthys
4397450bd0
Revert LD_LIBRARY_PATH= in unrealircd script, as we use -rpath for that.
2021-09-24 16:57:52 +02:00
Bram Matthys
baa07b179f
Get rid of some other old upgrade conf stuff as well. Remove some,
...
but keep some other errors, since they may still be helpful,
or at least for now.
2021-09-24 16:47:23 +02:00
Bram Matthys
a2a9eebf98
Get rid of ./unrealircd upgrade-conf (was for 3.2.x to 4.x)
2021-09-24 16:40:42 +02:00
Bram Matthys
864aef89da
LOG_DEST_OTHER => LOG_DEST_DISK
2021-09-24 16:37:24 +02:00
Bram Matthys
f29e0fcfe1
Make sure nobody uses a subsystem of like "info" or "debug" etc,
...
which are reserved for log levels, and would otherwise clash in
the log::sources configuration.
2021-09-24 16:15:05 +02:00
Bram Matthys
4b079dbd1b
Add JOIN/PART/KICK logging (snomask 'j').
...
This also changes the remove_user_from_channel() function to have an
extra parameter to hide it from logs. This is used for KICK (already
logged) and QUIT (which would be stupid to generate 10 part log lines for).
2021-09-24 16:08:41 +02:00
Bram Matthys
4e511da9fb
Update default logging conf
...
[skip ci]
2021-09-24 15:52:41 +02:00
Bram Matthys
8de1adc1c0
Update SECURITY.md to include U6
...
[skip ci]
2021-09-24 11:33:26 +02:00
Bram Matthys
56c3b4ced6
Automatically add default log block that logs everything if no log
...
block to disk is present.
Also update the English example.conf.
Both may need some default filtering (or not)...
2021-09-24 11:30:04 +02:00
Bram Matthys
9852ec9991
No longer log everything, so apply source { } on log blocks for disk files.
...
This also adds the option "all" to log everything (after which you can
use exclusion if you wish, eg "!whatever".
2021-09-24 11:15:52 +02:00
Bram Matthys
d3dfa5f40c
Make negative matching work in log sources, update default snomasks.
...
No longer log to all ircops if no matching snomasks.
So yeah, if you don't load snomask.default.conf you will see nothing
(TODO: some warning / error for this)
2021-09-24 11:07:25 +02:00
Bram Matthys
1d73db560c
Get rid of modules/snomasks directory, since the snomask module API is gone.
...
(IRCOps can set any snomask dynamically now)
2021-09-24 10:10:27 +02:00
Bram Matthys
b41311ddaf
Update default snomask to +bBcdfkqsSoO
2021-09-24 10:03:18 +02:00
Bram Matthys
e14b463b60
Major update to default snomask configuration
2021-09-24 09:41:32 +02:00
Bram Matthys
bcfe43788d
Some unimportant unreal_log() updates.
...
[skip ci]
2021-09-24 09:41:21 +02:00
Bram Matthys
be6bbbcc6b
Convert all remaining sendto_umode()/sendto_umode_global() to unreal_log().
...
Except, of course, the ones that actually need to send to a user mode,
which is only LOCOPS and GLOBOPS.
2021-09-24 08:28:37 +02:00
Bram Matthys
52667445f2
Fix warning on vsendto_prefix_one (my mistake...)
2021-09-23 20:03:33 +02:00
Bram Matthys
43e4c5444f
We already got rid of sendto_ops(), now get rid of sendto_realops().
...
Use the new logging instead.
2021-09-23 19:57:05 +02:00
Bram Matthys
2a7da65574
Fix header: wallops -> usermodes/wallops
2021-09-23 19:31:28 +02:00
Bram Matthys
0439e4f89d
Move wallops module from "wallops" to "usermodes/wallops"
...
(which includes the command)
2021-09-23 19:25:38 +02:00