Bram Matthys
cfccc8f05c
Add $client.servername. Also add json_string_possibly_null() which is
...
a wrapper that will return a 'null' JSON object for null strings and
otherwise a string object for non-NULL. It seems by default this is
not the case which is a bit annoying. Maybe we should re-wrap all
code to use this. We'll see.
The problem is when this is not done, then a $variable won't be
expanded and would show up like literally "$variable" as if the
variable was never passed on.
2021-08-06 09:24:24 +02:00
Bram Matthys
5b44baab1f
ULOG_WARN -> ULOG_WARNING. Better be consistent. This was the only
...
ULOG_* level that used an abbreviated term.
2021-08-06 08:50:45 +02:00
Bram Matthys
e29fd0afdc
Show [debug] instead of [???]
2021-08-05 20:43:02 +02:00
Bram Matthys
29e4f8d56f
Newlog: FLOOD_BLOCKED (+s +f notices)
2021-08-05 20:42:24 +02:00
Bram Matthys
970c138711
Remove fullstatus-on-load from antirandom example conf
2021-08-05 20:24:50 +02:00
Bram Matthys
01e86d547d
Cleanup antirandom a bit (hardly used status on load option, and
...
lots of debugging). Also add newlog.
2021-08-05 20:16:27 +02:00
Bram Matthys
55f2ef502e
Newlog: add $client.info (gecos/realname for users, info on servers)
2021-08-05 20:16:09 +02:00
Bram Matthys
0bdf1e3c35
Newlog: tls_antidos
2021-08-05 20:15:54 +02:00
Bram Matthys
e341903e53
Newlog: update connthrottle
2021-08-05 17:46:24 +02:00
Bram Matthys
d3bd525eef
Fix "You were forced to part" message on SAPART that was accidentally deleted
2021-08-05 17:30:36 +02:00
Bram Matthys
4115eaf483
Use memory pool for channels
2021-08-05 17:20:24 +02:00
Bram Matthys
6ba6a8fd9a
Fix memory leak due to unreal_log() / unreal_log_raw() last argument
...
being NULL. This is a vararg argument and it causes a leak when
running in debug mode because we add some magic source file,
source line number and function.
Note to self: don't put NULL there :D
2021-08-05 17:05:25 +02:00
Bram Matthys
3c7112469b
Drop 2nd argument to find_channel which was always NULL everywhere anyway.
2021-08-05 17:02:39 +02:00
Bram Matthys
8dd6640bf5
Rename get_channel() to make_channel() to match make_user() and
...
change some more calls to make_channel() to use find_channel().
Also make it take 1 argument instead of 3.
Needed to be careful in sjoin code since the previous code set
channel->creationtime to 0 if client was a remote. Now merged
a few if's into one. Should be correct :D.
2021-08-05 16:55:28 +02:00
Bram Matthys
cf1a5c7090
Replace get_channel() calls with !NOCREATE or 0 with find_channel()
2021-08-05 16:43:33 +02:00
Bram Matthys
da07fbf28f
Make Channel struct fixed-size rather than the name[1] trick.
...
Also, do some more validations on remote names now that it is fixed.
2021-08-05 16:40:26 +02:00
Bram Matthys
6bad375ad7
Rename channel->chname to channel->name.
2021-08-05 16:34:45 +02:00
Bram Matthys
a118a3313d
Newlog: SAPART/SAJOIN and also broadcast SAJOIN now so all servers can log
...
it appropriately.
2021-08-05 16:30:14 +02:00
Bram Matthys
b21048c3e1
Broadcast SAPART so other servers now it is a forced part and can log it
...
appropriately.
2021-08-05 16:24:38 +02:00
Bram Matthys
149beb10e3
Update sajoin logging: use $channels rather than $channel since it may be a list.
2021-08-05 16:11:43 +02:00
Bram Matthys
bda671fa14
Newlog: Add ULOG_DEBUG log level, and update reputation.c to use newlog.
2021-08-05 14:17:39 +02:00
Bram Matthys
53fa3c44f5
Remove /REHASH -motd and -opermotd and get rid of some rehash quirks.
2021-08-05 14:00:37 +02:00
Bram Matthys
5e94b1cddb
Newlog updates in serv.c
2021-08-05 13:49:36 +02:00
Bram Matthys
b3fca01472
Newlog: update oper.c
2021-08-05 13:27:38 +02:00
Bram Matthys
a19135d2a2
Guard against ULOG_INFO / LOG_INFO mixups :D
...
No such mistakes have been made yet, but.. bound to happen.
2021-08-05 12:15:55 +02:00
Bram Matthys
9889ed386b
Newlog: for zero TS, such as a expiry_at of 0 which means never/infinity,
...
return a timestamp of null in JSON. And also blackhole some shit.
2021-08-05 11:47:21 +02:00
Bram Matthys
f5852ce534
Newlog: add log_data_timestamp() and use ISO8601 timestamps in JSON
...
logging. We already did so for the "timestamp" of the log message,
but now also do it in other log messages that have a timestamp,
such as "set_at" and "expire_at" in TKL entries.
2021-08-05 11:11:21 +02:00
Bram Matthys
91ba0ca441
More updates to TKL for new log system. Also in the spamfilter hit
...
message we now show the action that was taken.
2021-08-05 10:48:34 +02:00
Bram Matthys
dbdfb7c656
Update TKL code to use new logging system. Make the TKL add/del/expiry
...
messages more consistent at the same time.
2021-08-05 10:19:05 +02:00
Bram Matthys
952cb121c2
ircd.c: use new logging code
...
Also shorten the timesync messages a bit.. hope that won't cause confusion :D
2021-08-05 08:27:52 +02:00
Bram Matthys
c27ed2ed81
Log: CONFIG_LOADED / CONFIG_NOT_LOADED
2021-08-05 08:02:55 +02:00
Bram Matthys
4a62e6ddaa
Add log catagory 'config' and use CONFIG_ERROR_GENERIC,
...
CONFIG_WARNING_GENERIC and CONFIG_INFO_GENERIC from
config_error(), config_warn() and config_status() respectively.
...not that i like these generic ones, but it is a start.
2021-08-05 07:59:10 +02:00
Bram Matthys
b23f7e77c7
Add unreal_log_raw() if you want to log a buffer directly without expanding
...
the $stuff in it. This is unusual, but possible in some cases.
Generally people should use unreal_log(), though.
2021-08-05 07:54:22 +02:00
Bram Matthys
413def178c
Add early loglevel to snomask code. Hardcoded atm.
2021-08-05 07:34:03 +02:00
k4be
15ac841aea
Do not show "Read error" quit message on regularly closed connections
2021-07-19 16:53:05 +02:00
k4be
3a9e4f98ac
Add option for notifying chanops about invitations by normal users.
...
Normally, channel operators are only notified when another chanop
invites someone to their channel - as this would allow the user to
join the channel later if it becomes invite-only. This is still
the default behaviour. But now, it can be configured to notify
operators about any invitation done to their channel, eitner by
another op or by normal user. This will allow them to see whether
someone floods others with invitations to their channels.
Enable the option with set::normal-user-invite-notification yes;
2021-07-17 18:07:02 +02:00
k4be
b6bd9a4d97
Fix typo
2021-07-17 10:54:14 +02:00
k4be
47ec109fce
Fix crash on /REHASH with exceptionally large number of client capabilities loaded.
2021-07-16 22:58:23 +02:00
k4be
637ef7e99d
Add IRCv3 SETNAME support
2021-07-16 18:34:11 +02:00
k4be
e294656175
Merge branch 'unreal60_dev+invite' into unreal60_dev
2021-07-16 18:02:44 +02:00
k4be
be534a7aa1
Merge branch 'unreal60_dev' of github.com:syzop/unrealircd-next into unreal60_dev
2021-07-16 18:02:22 +02:00
k4be
12c2bb42c2
Remove unused piece of code
2021-07-15 19:29:19 +02:00
k4be
bbc2bc9cd5
Add IRCv3 invite-notify cap
2021-07-15 19:25:46 +02:00
k4be
036b61dbc6
Rewrite invite notification mechanism
2021-07-15 19:10:07 +02:00
k4be
3ede47c7fa
Remove invite moddata access from core (without breaking the api)
2021-07-15 16:13:02 +02:00
k4be
db8ff94e7a
Free invite moddata properly
2021-07-15 15:52:04 +02:00
k4be
cd64a34634
Fix for previous commit
2021-07-15 15:51:47 +02:00
k4be
8e676c1f2a
We are never going to store invite for remote clients
2021-07-15 15:22:41 +02:00
Bram Matthys
abc80cfdd9
Enable ASan (address sanitizer) during U6 development
2021-07-15 12:51:50 +02:00
k4be
c97b9bb494
Move invites from core to module
2021-07-14 20:20:56 +02:00