1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-25 11:26:38 +02:00
Commit Graph

4788 Commits

Author SHA1 Message Date
Bram Matthys d06715d9ee REMOTEINC_SPECIALCACHE is no longer optional 2019-08-24 19:41:14 +02:00
Bram Matthys 9e02ca2b3c More FORMAT_STRING() checking, get rid of old (non-)USE_VARARGS stuff.
Fix some more bugs (type differences) when compiling in DEBUGMODE.
2019-08-24 19:37:25 +02:00
Bram Matthys a3b5f29626 Mass change of time_t in printf-like functions to %lld with an
explicit cast to (long long). On *NIX we could get away with
lazily assuming time_t is of the same length as long (and use %ld),
even though the specification says nothing about it.
Unfortunately on Windows things are not that simple:
'time_t' is 'long long' (64 bits) and both 'int' and 'long'
are 32 bits, even when compiling in 64 bit mode.

This problem could be 'fixed' in multiple ways:
One way would be to minimize the usage of time_t and use 'long long'
or 'uint64_t' everywhere for variables to minimize casting later.
I, however, chose to maintain 'time_t' for most of time grabbing
and time calculations (eg: delta), and do the explicit cast in
any printf-like functions that may be there.
Both solutions work. I mostly like the explicit time_t look, so one
can immediately recognize a variable relates to time.
2019-08-24 18:33:52 +02:00
Bram Matthys 444c4f4381 Get rid of some old/rarely used ./Config shit 2019-08-23 20:37:27 +02:00
Bram Matthys a6eac922ea Remove unused function create_snomask() 2019-08-23 20:28:48 +02:00
Bram Matthys ccf80d16f2 SnomaskAdd(): remove 3rd argument (unset_on_deoper), as all snomasks
are IRCOp-only now, they will always be removed on deoper.

-extern Snomask *SnomaskAdd(Module *module, char ch, int unset_on_deoper, int (*allowed)(aClient *sptr, int what), long *mode);
+extern Snomask *SnomaskAdd(Module *module, char ch, int (*allowed)(aClient *sptr, int what), long *mode);
2019-08-23 20:23:54 +02:00
Bram Matthys e889a07849 Updates to ircvsnprintf(): add %lld and remove special handling of %lu.
And some re-indenting when we're at it...
2019-08-23 08:41:47 +02:00
Bram Matthys 9a562dea24 Windows: Move the uninstaller to bin\uninstaller
Windows: Use generic docs URL for documentation
2019-08-22 20:15:46 +02:00
Bram Matthys d6faa00ae8 Use generic includes 2019-08-22 19:15:16 +02:00
Bram Matthys 02a4bbc348 Get rid of this stupid 'TS' type, just use 'time_t'. 2019-08-22 18:39:28 +02:00
Bram Matthys 8c70769bef Windows: Use W7 API (or later) so we have inet_pton/inet_ntop. 2019-08-22 18:01:59 +02:00
Bram Matthys 8007a83020 Get rid of include/inet.h and use system headers properly. 2019-08-22 17:48:39 +02:00
Bram Matthys a1920d7733 Windows installer: require Windows 7 or newer (bye XP/Vista)
[skip ci]
2019-08-22 17:34:41 +02:00
Bram Matthys 1c52557c92 Update makecert.bat for Windows with new paths
[skip ci]
2019-08-22 17:10:09 +02:00
Bram Matthys 02d3364373 More Windows fixes... 2019-08-22 16:43:05 +02:00
Bram Matthys d8f080de67 Drop support for systems without snprintf() and vsnprintf()
Those are in POSIX.1-2001. Even Windows has them nowadays...
"Our" implementation doesn't even work properly under Win64.
2019-08-22 16:41:39 +02:00
Bram Matthys 87b8d27648 Windows: move *.exe and libraries to bin\ directory, move LICENSE.txt
and Donation.txt to doc\
2019-08-22 15:08:16 +02:00
Bram Matthys bcceea9065 Windows: build fixes and it is now a 64 bit application.
See https://bugs.unrealircd.org/view.php?id=5320
Expect several more major fixes/changes to follow...
2019-08-22 14:43:19 +02:00
Bram Matthys b87b4dd61a Windows: Fix path in makecert.bat 2019-08-22 14:37:49 +02:00
Bram Matthys 5e0ed6d626 UnrealIRCd 5.0.0-alpha1 2019-08-20 19:39:04 +02:00
Bram Matthys 142289c2de Let's just call it a database rather than persistent storage file.
Also, fix a small memory leak if the database was corrupted.
2019-08-19 16:38:57 +02:00
Bram Matthys 5a8d231c6d Floodprot changes (floodprot.c):
1) Clean up check_for_chan_flood()
2) Make the new repeat action kick by default (instead of forcing 'b'
   if no action is specified)
3) Also make repeat work with timed bans
2019-08-19 16:12:51 +02:00
Bram Matthys dd5d93ae77 Mostly cleanups / unimportant stuff. 2019-08-19 15:27:03 +02:00
Bram Matthys 7cda4eab53 Fix memory leaks in the new tkldb and channeldb modules. 2019-08-19 15:26:15 +02:00
Bram Matthys cbea57fefe Fix read after free in module API code when unloading channel mode,
client capability, history backend or message tag for good.
2019-08-19 15:25:12 +02:00
Bram Matthys 6f87314bbf Funny mistake :D 2019-08-19 10:10:47 +02:00
Bram Matthys e72845bddf link::options::tls was not working (an alias for link::options::ssl) 2019-08-18 19:25:42 +02:00
Bram Matthys fdabc7e5ad Fix memory leak on server sync. 2019-08-18 09:40:31 +02:00
Bram Matthys 33fcc5b550 Enough updates on labeled-response and echo-message for today.
Note that the labeled-response implementation currently requires
'batch' and will always start a BATCH if there is any response.
Later on we can implement a simple queue so we don't have to
start a batch for 1-line responses (which works, but looks a bit
silly if you look at raw server traffic). That may be after alpha1,
though, as there are more (important) things to work on right now.
2019-08-18 09:24:43 +02:00
Bram Matthys 4ccb290dac Fix two TODO's. 2019-08-18 08:27:43 +02:00
Bram Matthys bdcee3fcfa Send BATCH even if client is lacking message-tags CAP. 2019-08-18 08:27:07 +02:00
Bram Matthys 1a305b0b45 Remove this old code in hunt_server() or we end up sending message
tags twice. (This code was there before sendto_one() got it's
extra MessageTag * parameter)
2019-08-18 08:06:08 +02:00
Bram Matthys d9694a4644 Fix for history module if 'batch' is negotiated but 'server-time' is
not. Previously this would result in receiving an empty BATCH (with
no history content, that is), which is confusing.
2019-08-18 07:25:26 +02:00
Bram Matthys e1822997b8 Make 'webredir' module work if 'websocket' module is loaded,
which is quite likely even.
2019-08-17 13:00:33 +02:00
Bram Matthys 15254470a7 Do some minimal checks on the provided set::webredir::url
[skip ci]
2019-08-17 13:00:09 +02:00
Bram Matthys 143d747e66 Rename 'cmdrestrict' to 'restrict-commands'. Load the module by default
so you can use set::restrict-commands without having to loadmodule.
Restrict the LIST and INVITE commands in the example.conf, which is
often a good idea. Finally, document the configuration/usage at:
https://www.unrealircd.org/docs/Set_block#set::restrict-commands
2019-08-17 12:34:14 +02:00
Bram Matthys 8ae9e85a9a Channel history: set default playback on join lines to 15. 2019-08-17 12:05:23 +02:00
Bram Matthys 5f99586982 And another fix for 0d2d4d5bca. 2019-08-17 09:36:29 +02:00
Bram Matthys f10ec9aebc Fix for previous commit (0d2d4d5bca) 2019-08-17 09:31:58 +02:00
Bram Matthys 0d2d4d5bca Rename match() and _match() to match_simple() -AND- invert the return value
of match_simple() and match_esc(). So, developers, be aware, this is how
you should use the function in a correct way:
if (match_simple("*fun*", str))
    printf("It was fun\n");

Rationale:
I've always been annoyed by the inversed logic, even though it was similar
to strcmp. So I've reverted it.
I could have chosen to maintain match() rather than this match_simple()
name, but this way I force (3rd party module) devs to update their function,
while otherwise everything would mysteriously fail due to the inverted logic.
2019-08-17 09:20:49 +02:00
Bram Matthys e1fcc3a667 Rename match() and _match() both to match_simple()
and get rid of the "bahamut optimized version".
Stage 1 of 2.
2019-08-17 09:15:34 +02:00
Bram Matthys c01c9248f5 Revert e428c77c47 (only to try again later) 2019-08-17 09:05:09 +02:00
Bram Matthys e428c77c47 match() -> match_nuh() and _match -> match_simple() 2019-08-17 08:56:18 +02:00
Bram Matthys 870f10b8a5 Extban ~T:block:something is now auto-converted to ~T:block:*something*
since this is pretty much always what you want. Otherwise it's just
too confusing that things don't match.
2019-08-17 08:36:59 +02:00
Bram Matthys 29a3994d24 Fix some logic in add_listmode_ex(). Probably not terribly important
but theoretically one could have seen a "ban list full" error message
multiple times in rare cases.
2019-08-16 20:16:11 +02:00
Bram Matthys 0f7a172c30 Rename who to who_old, since whox is now loaded by default and
loading who_old should only be done if you want the classic old WHO.
2019-08-16 18:14:30 +02:00
Bram Matthys ccb534c3e9 res.{c,h} -> dns.{c,h} and moddata.c -> api-moddata.c 2019-08-16 18:09:25 +02:00
Bram Matthys dfcd465103 Rename some api-*.c files to be more descriptive. 2019-08-16 18:00:26 +02:00
Bram Matthys fffd459bf9 src/extbans.c -> src/api-extbans.c, and the same for extcmodes and umodes.
I suppose what is and what is not an API can be considered a bit arbitrary
but for us it is the stuff we expose via the module api. We now have:
api-clicap
api-command
api-event
api-extbans
api-extcmodes
api-history-backend
api-isupport
api-mtag
api-umodes
2019-08-16 17:52:49 +02:00
Bram Matthys fd37f050b8 Rename src/events.c to src/api-event.c for consistency. 2019-08-16 17:47:07 +02:00