6 Commits

Author SHA1 Message Date
5e728f6d31 Bump version, update NEWS 2021-10-06 14:05:23 +02:00
766f68e070 Bump liberty 2021-10-06 13:52:59 +02:00
3dc5242d43 Bump liberty
Importing some minor unimportant fixes.
2021-09-26 08:55:46 +02:00
fd9d5db1d2 xD: bump the soft file descriptor limit
By default it's a mere thousand connections, which is unnecessarily
crippling our advertised ability to handle lots of them.

Thanks for the advice, Lennart.
2021-09-23 20:32:00 +02:00
cb480b4c71 xC: show orphan outcoming actions differently
It's hard to think of anything actually good here.

This would be an exceptionally rare thing to do, anyway.
2021-09-05 02:51:05 +02:00
59cc423694 xC: abandon Freenode, embrace IRCnet
You're not fucking supposed to require a fucking registration
on fucking IRC networks.
2021-08-29 15:18:20 +02:00
5 changed files with 35 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.0)
project (uirc3 VERSION 1.3.0 LANGUAGES C)
project (uirc3 VERSION 1.4.0 LANGUAGES C)
# Options
option (WANT_READLINE "Use GNU Readline for the UI (better)" ON)

7
NEWS
View File

@@ -1,9 +1,14 @@
1.4.0 (xxxx-xx-xx)
1.4.0 (2021-10-06) "Call Me Scruffy Scruffington"
* xC: made message autosplitting respect text formatting
* xC: fixed displaying IRC colours above 16
* xC: offer IRCnet as an IRC network to connect to,
rather than the lunatic new Freenode
* xD: started bumping the soft limit on file descriptors to the hard one
1.3.0 (2021-08-07) "New World Order"

Submodule liberty updated: 9639777814...1b9d89cab3

12
xC.c
View File

@@ -4162,6 +4162,9 @@ log_full (struct app_context *ctx, struct server *s, struct buffer *buffer,
log_server_status ((s), (s)->buffer, "Notice -> #n: #m", (target), (text))
#define log_outcoming_orphan_privmsg(s, target, text) \
log_server_status ((s), (s)->buffer, "MSG(#n): #m", (target), (text))
#define log_outcoming_orphan_action(s, target, text) \
log_server_status ((s), (s)->buffer, "MSG(#n): #a*#r #m", (target), \
ATTR_ACTION, (text))
#define log_ctcp_query(s, target, tag) \
log_server_status ((s), (s)->buffer, "CTCP query to #S: #S", target, tag)
@@ -6587,8 +6590,9 @@ irc_handle_sent_privmsg_text (struct server *s,
prefixes, s->irc_user->nickname, text->str);
free (prefixes);
}
else if (is_action)
log_outcoming_orphan_action (s, target, text->str);
else
// TODO: also handle actions here
log_outcoming_orphan_privmsg (s, target, text->str);
}
@@ -13805,9 +13809,9 @@ static const char *g_first_time_help[] =
"F5/Ctrl-P\x02 or \x02" "F6/Ctrl-N\x02.",
"",
"Finally, adding a network is as simple as:",
" - \x02/server add freenode\x02",
" - \x02/set servers.freenode.addresses = \"chat.freenode.net\"\x02",
" - \x02/connect freenode\x02",
" - \x02/server add IRCnet\x02",
" - \x02/set servers.IRCnet.addresses = \"open.ircnet.net\"\x02",
" - \x02/connect IRCnet\x02",
"",
"That should be enough to get you started. Have fun!",
""

20
xD.c
View File

@@ -1,7 +1,7 @@
/*
* xD.c: an IRC daemon
*
* Copyright (c) 2014 - 2020, Přemysl Eric Janouch <p@janouch.name>
* Copyright (c) 2014 - 2021, Přemysl Eric Janouch <p@janouch.name>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
@@ -22,7 +22,9 @@
#define WANT_SYSLOG_LOGGING
#include "common.c"
#include "xD-replies.c"
#include <nl_types.h>
#include <sys/resource.h>
enum { PIPE_READ, PIPE_WRITE };
@@ -3984,6 +3986,21 @@ daemonize (struct server_context *ctx)
poller_post_fork (&ctx->poller);
}
static void
setup_limits (void)
{
struct rlimit limit;
if (getrlimit (RLIMIT_NOFILE, &limit))
{
print_warning ("%s: %s", "getrlimit", strerror (errno));
return;
}
limit.rlim_cur = limit.rlim_max;
if (setrlimit (RLIMIT_NOFILE, &limit))
print_warning ("%s: %s", "setrlimit", strerror (errno));
}
int
main (int argc, char *argv[])
{
@@ -4030,6 +4047,7 @@ main (int argc, char *argv[])
print_status (PROGRAM_NAME " " PROGRAM_VERSION " starting");
setup_signal_handlers ();
setup_limits ();
init_openssl ();
struct server_context ctx;