Bram Matthys
ee8cc0e8e2
Get rid of Usermode_Table[] and use a linked list called usermodes.
...
Just like already done for Channelmode_Table[] -> channelmodes.
2021-09-26 12:46:34 +02:00
Bram Matthys
3033fd9b6d
Fix some todo items such as validating extban letter and names in ExtbanAdd()
2021-09-25 16:38:15 +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
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
864aef89da
LOG_DEST_OTHER => LOG_DEST_DISK
2021-09-24 16:37:24 +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
b41311ddaf
Update default snomask to +bBcdfkqsSoO
2021-09-24 10:03:18 +02:00
Bram Matthys
20c4ac2cd1
Move all wallops code out of the core.
2021-09-23 19:21:19 +02:00
Bram Matthys
720f597ad6
Get rid of current snomask system and allow ircops to set any snomask
...
(that is: a-z A-Z) so to use the dynamic system with the new logging.
Largely untested.
2021-09-22 15:49:20 +02:00
Bram Matthys
4cea88645c
Modularize member modes (vhoaq).
...
Still need to clean up a bit after this, but it passes all tests :)
2021-09-13 18:44:18 +02:00
Bram Matthys
8353a9e17b
Change char *parv[] to const char *parv[] everywhere. This is a BIG change.
...
It means you can no longer modify eg parv[1] in-place with strtoken and such.
The main reason for this is that as a command handler you have no idea
where the arguments may come from. It could be from a do_cmd() with
read-only storage (eg a string literal) and so on.
It started with an experiment of how far I could get and how annoying the
side-effects would be, but they seem to be quite managable, so I'm
committing this stuff.
Hopefully this catches/solves some stupid bugs somewhere :)
2021-09-11 16:02:44 +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
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
k4be
fe51aaf357
Add wATCH_EVENT defines
2021-08-24 19:58:05 +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
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
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
Bram Matthys
6dd539d760
Move channel mode +m to module chanmodes/moderated
...
(and nearly all the code related to it)
2021-08-22 12:01:54 +02:00
Bram Matthys
24f73c28e4
Move channel mode +l to module chanmodes/limit
...
(and all the code related to it)
2021-08-22 11:45:08 +02:00
Bram Matthys
1533c6431e
Move channel mode +n to module chanmodes/noexternalmsgs
...
(and all the code related to it)
2021-08-22 11:22:33 +02:00
Bram Matthys
8066c13876
Move +s/+p to chanmodes/secret and chanmodes/private.
...
To be honest, the modules don't do much other than handling the
mode stuff, but.. we can look at that again later.
2021-08-22 11:11:26 +02:00
Bram Matthys
295b3505ef
Move channel mode +i to module chanmodes/inviteonly
2021-08-22 10:37:37 +02:00
Bram Matthys
c403a47daf
Move channel mode +k to module chanmodes/key
2021-08-22 10:06:51 +02:00
Bram Matthys
5b90fd0c0d
Get rid of old MOTD downloading code and several USE_LIBCURL defines
...
that are no longer needed.
2021-08-21 14:13:24 +02:00
Bram Matthys
5321dcb81b
ConfigResource: get rid of rs->flag.type stuff and just use rs->type.
...
Also replace local variables 'inc' with 'rs'.
2021-08-19 09:37:28 +02:00
Bram Matthys
ae6222e329
Get rid of errorbuf in ConfigResource as this is not used.
2021-08-19 09:34:33 +02:00
Bram Matthys
4e53bf874a
Make remote includes caching work again. Both on-boot and on-rehash.
2021-08-19 09:33:46 +02:00
Bram Matthys
7b3c1165f8
Make tld::mask use the generic masks that we use everywhere
...
(and hence support multiple masks and server bans matching etc)
2021-08-18 18:45:23 +02:00
Bram Matthys
e503ad4fd5
Reorder members in ConfigEntry struct a bit (optimize for L1/L2 cache)
...
Obviously name, value and next should be at the top.
2021-08-18 18:32:05 +02:00
Bram Matthys
a60b9f3176
Handle duplicate URLs/downloads (only download once)
2021-08-18 16:43:42 +02:00
Bram Matthys
ce3e23a5d2
Get rid of unnecessary included_from and included_from_line
...
members in ConfigResource (previously ConfigItem_include).
2021-08-18 16:31:48 +02:00
Bram Matthys
756fee58cb
Rename ConfigItem_include to ConfigResource and also use it for non-includes
...
such as other items in the configuration file that are URLs.
2021-08-18 14:54:41 +02:00
Bram Matthys
b74d15595b
Change int rehash() to void request_rehash(), which is a better name
...
as it REQUESTS to rehash the server, but it may not be done immediately.
And making it void makes sure nobody relies on some sort of return
value which will differ between with vs without remote includes.
Also get rid of sig and loop.rehash_save_sig, as a NULL client
already indicates the same (or at least does so now).
2021-08-18 13:28:56 +02:00
Bram Matthys
675c1cab55
Rename loop struct members:
...
* loop.ircd_rehashing -> loop.rehashing
* loop.ircd_terminating -> loop.terminating
* loop.ircd_booted -> loop.booted
* loop.ircd_forked -> loop.forked
2021-08-18 13:08:42 +02:00
Bram Matthys
7321a66196
Make failed include loading fatal again. And fix a crash related to that.
2021-08-18 12:46:11 +02:00
Bram Matthys
685e0ee073
In ConfigItem_include include->url now always exists, and src/url.c is now
...
always compiled in, both regardless of cURL support or not.
Obviously the cURL functions are not available without cURL and there
are now some #ifdef USE_LIBCURL in url.c
This also fixes the current build to work without cURL
2021-08-18 12:27:13 +02:00
Bram Matthys
03423a2eb7
Get rid of INCLUDE_NOTLOADED and INCLUDE_USED which AFAICT are
...
unnecessary. Get rid of load_includes() which did the marking
and unload_notloaded_includes() and unload_loaded_includes()
accordingly. There's now one single free_all_includes().
2021-08-18 11:52:53 +02:00
Bram Matthys
796cac7a63
geoip: migrate from simple string to returning a GeoIPResult struct.
...
(work in progress, 1/2)
This also add supports for callbacks which return pointers (pvoidfunc),
we already had that for efuncs but not in callbacks.
2021-08-17 16:39:39 +02:00
Bram Matthys
a43637d55d
Add extban->is_banned_events which you need to set to indicate to
...
which BANCHK_* events you want to listen, eg BANCHK_JOIN, BANCHK_MSG.
You can use BANCHK_ALL to watch on all events.
Only BANCHK_TKL is not included there and needs an explicit
BANCHK_ALL|BANCHK_TKL.
The caller will now take care of BANCHK_* filtering so we won't
waste any CPU on calling an is_banned() function that isn't
interested at all in the event that we have.
Also, no longer require an extban->is_banned function, since some
extbans don't use it. This too saves useless calls.
2021-08-14 18:25:36 +02:00
Bram Matthys
ca4f4c2575
Add PROTOCTL NEXTBANS. This indicates support for named extended bans.
...
If you don't indicate NEXTBANS support then we will send old fashioned
extended bans to you.
Note that eventually we will likely require named extended bans support,
but that will be UnrealIRCd 7 / 8.... ;)
2021-08-14 17:28:15 +02:00
Bram Matthys
445b47391f
Do an #undef on LOG_DEBUG, LOG_INFO, etc.. so they cannot be confused
...
anymore with the ULOG_DEBUG, ULOG_INFO, etc levels.
2021-08-12 15:27:27 +02:00
Bram Matthys
4968bf84fe
Newlog: convert those in include/*.h too
2021-08-11 17:59:40 +02:00
Bram Matthys
9308e5b8a0
Change maximum chanmode +l value to 1 million and "coincidentally" also
...
change the IsInvalidChannelTS() macro to check for this value or lower.
2021-08-11 15:39:15 +02:00