Bram Matthys
7cabd4b79e
Const const const
2021-09-11 08:17:12 +02:00
Bram Matthys
ac84d4f207
Const const const... modules.c and elsewhere.
2021-09-11 07:53:30 +02:00
Bram Matthys
5bc244c1f3
Add a lot more consts. This finishes the work for all hooktypes.
2021-09-10 20:36:38 +02:00
Bram Matthys
74d1481dcb
Do the same for RunHookReturn() and RunHookReturnInt().
...
NOTE: The arguments are swapped, it is now eg:
RunHookReturn(HOOKTYPE_SOMETHING, !=0, a, b, c);
2021-09-10 19:32:17 +02:00
Bram Matthys
7dac12e31e
Get rid of RunHook2/3/4/5/6/etc and just have RunHook with __VA_ARGS__
2021-09-10 19:27:18 +02:00
Bram Matthys
cb9b24686b
Module API changes:
...
- For HOOKTYPE_LOCAL_JOIN and HOOKTYPE_REMOTE_JOIN: drop parv[] argument
as it was useless anyway, it only contained the channel name in parv[1]
but never the key, sometimes was entirely NULL even.
- For HOOKTYPE_PRE_LOCAL_JOIN instead of char *parv[] we now pass
const char *key. As predicted more than a year ago when fixing
0902ed7a99
2021-09-10 19:22:47 +02:00
Bram Matthys
5b091975f5
Get rid of parv[] in HOOKTYPE_CAN_JOIN and HOOKTYPE_CAN_JOIN_LIMITEXCEEDED
...
as it already has a 'key' argument too.
2021-09-10 19:11:37 +02:00
k4be
e13815b604
Add extjwt module
2021-09-10 16:19:07 +02:00
Bram Matthys
86fa29aaee
Add consts in support.c
2021-09-10 15:48:58 +02:00
Bram Matthys
9438ddfd93
Add consts in user.c
2021-09-10 15:40:50 +02:00
Bram Matthys
09a412782d
Const stuff for misc.c
2021-09-10 15:25:21 +02:00
Bram Matthys
447555e044
More consts in stats.c
2021-09-10 15:07:17 +02:00
Bram Matthys
f085173d46
More const char * stuff... mostly in conf.c but also elsewhere.
2021-09-10 15:01:23 +02:00
Bram Matthys
2e82ab0eca
Make CommandOverrideAddEx() the new CommandOverrideAdd():
...
IOTW, change CommandOverrideAdd() to require a priority argument:
- CommandOverrideAdd(modinfo->handle, "TEST", override_test);
+ CommandOverrideAdd(modinfo->handle, "TEST", 0, override_test);
2021-09-10 14:13:07 +02:00
Bram Matthys
bba0124bd3
Drop the Ex... CallbackAdd*Ex() -> CallbackAdd*()
2021-09-10 14:09:22 +02:00
Bram Matthys
6ebddc8817
Update channel mode API to use more consts
2021-09-10 14:06:57 +02:00
Bram Matthys
08a32429ff
Update extban API to use more consts
2021-09-10 13:39:26 +02:00
Bram Matthys
d4d4da6a8d
Add another const to ValidatePermissionsForPath. Fix Windows build, maybe?
2021-09-10 12:58:15 +02:00
Bram Matthys
66a51fb659
Massive conversions from 'char *' to 'const char *' and 'char **' to 'const char **'
2021-09-10 12:46:31 +02:00
Bram Matthys
edfdfe4a03
Add HookAddConstString() and friends.
...
Also EfunctionAddPChar() -> EfunctionAddString(), and callbacks etc.
2021-09-10 11:59:14 +02:00
Bram Matthys
a3bfa210e9
HookAddPChar() -> HookAddString()
...
and .pcharfunc -> .stringfunc
2021-09-10 11:49:06 +02:00
Bram Matthys
fe3907f153
Use more const char *
2021-09-10 11:39:04 +02:00
Bram Matthys
d648cd0729
Use strlncpy() everywhere where we previously used strlncat() with a empty
...
buffer (due to the lack of strlncpy before...).
2021-09-10 11:26:36 +02:00
Bram Matthys
c550d95619
Add strlncpy(): works just like strlcpy except that it has an extra
...
argument which specifies how many characters to copy max.
strlncpy(dest, src, sizeof(dest), maxcopybytes);
vs
strlcpy(dest, src, MIN(sizeof(dest),maxcopybytes+1));
We already had a strlncat() vs strlcat()
2021-09-10 11:19:57 +02:00
Bram Matthys
cd88e02f3d
Use more const char *
2021-09-10 11:11:54 +02:00
Bram Matthys
463c7d4ddf
Spoof remote connecting/disconnecting notices with sender being the
...
server where the client is (or was) on. Just like we did in UnrealIRCd 5.
Not sure if API-wise and variable-name-wise I want to do it this way,
but whatever...
2021-09-10 08:54:29 +02:00
Bram Matthys
9ef1d06afd
Remove more unused stuff in dynconf.h, and drop set::dns which did
...
nothing since 3.2 or so.
2021-09-03 21:17:51 +02:00
Bram Matthys
13dc17f5dc
Code cleanup: remove unused structs and variables.
2021-09-03 21:07:38 +02:00
Bram Matthys
617288991e
Remove find_except(), conf_except and struct ConfigItem_except.
...
These are all unused since the addition of ELINE.
2021-09-03 20:46:06 +02:00
Bram Matthys
f3c7b8c456
Windows: fix an external variable not being MODVAR, causing a funny
...
"no more connections available" error. Oh Windows.... such a joy!!!
[skip ci]
2021-08-29 12:19:15 +02:00
Bram Matthys
4c2aeab75e
Windows compile fixes
2021-08-28 16:35:37 +02:00
k4be
ca3bbfeadf
Improve handling of missing files
2021-08-27 12:20:36 +02:00
k4be
f1bc9f37e1
Change watch notification hook to callback.
...
This fixes duplicate AWAY message with extended-monitor.
2021-08-25 09:02:24 +02:00
k4be
e7e82ad493
Move host-change-related code to chghost.c
2021-08-24 20:37:02 +02:00
k4be
f4a915bbb7
Update watch_notification argument name
...
Fix WATCH crash caused by that argument
2021-08-24 20:19:50 +02:00
k4be
fe51aaf357
Add wATCH_EVENT defines
2021-08-24 19:58:05 +02:00
k4be
502def9401
Add extended-monitor (work in progress)
2021-08-24 19:42:38 +02:00
k4be
d40853b71c
Add basic metadata module (no moderation)
2021-08-22 21:17:19 +02:00
Bram Matthys
52b4a44e94
Massively rename Cmode.flag to Cmode.letter.
...
(similar to 5a387f9c0b )
2021-08-22 18:45:13 +02:00
Bram Matthys
9838378550
Massive rename of:
...
* channel->mode.extmode to channel->mode.mode
* channel->mode.extmodeparams to channel->mode.mode_params
This because all channel modes that are set there are extended channel
modes, only lists are still in core atm and they never get set here.
2021-08-22 18:36:00 +02:00
Bram Matthys
e0504b2e52
Remove Mode.mode, it now only contains Mode.extmode and Mode.extmodeparams
...
Also make MODES_ON_JOIN point to iConf.modes_on_join.extmodes instead
of iConf.modes_on_join.mode
Actually in next commit I may reorder again...
2021-08-22 18:33:25 +02:00
Bram Matthys
783cc3ff5b
Cmode API: change from Channelmode_Table[<num>] to channelmodes linked list.
...
And now we can easily sort the channel modes too, makes it easier for
our test cases.
2021-08-22 17:57:14 +02:00
k4be
50ae1ca2df
Proxy validation by IP address.
...
TODO: add optional password too.
2021-08-22 16:46:52 +02:00
Bram Matthys
96b290536e
Rename Channelmode_Table.slot to .param_slot since this is only
...
about parameter slot mapping.
2021-08-22 16:37:18 +02:00
Bram Matthys
d35a90c80f
Fix various channel modes showing up as duplicate in 004 and 005.
...
Yeah I forgot we hardcoded these somewhere, now they are gone.. poof!
2021-08-22 14:06:51 +02:00
k4be
a2cdb8ff89
Merge branch 'unreal60_dev' of github.com:syzop/unrealircd-next into unreal60_dev
2021-08-22 13:36:06 +02:00
k4be
be78ecebfc
Parse "Forwarded:" header from proxy.
...
Not (yet) checking source address nor getting a hostname.
2021-08-22 13:34:54 +02:00
Bram Matthys
8a5a0723e9
Fix the default set::modes-on-join (+nt) not working anymore, since
...
at the time of setting the default settings the channel mode modules
are not fully initialized yet.
2021-08-22 13:12:55 +02:00
Bram Matthys
1a19de2de9
Move channel mode +r to module chanmodes/isregistered
2021-08-22 12:19:07 +02:00
Bram Matthys
57ec565051
Move channel mode +t to module chanmodes/topiclimit
...
TODO: move code from "topic" module to here, some hook call.
2021-08-22 12:09:53 +02:00