Compare commits
3 Commits
v1.5.0
...
ef0cbe9a59
| Author | SHA1 | Date | |
|---|---|---|---|
|
ef0cbe9a59
|
|||
|
2d8808d795
|
|||
|
60d52ad479
|
12
.gitignore
vendored
12
.gitignore
vendored
@@ -3,9 +3,9 @@
|
||||
|
||||
# Qt Creator files
|
||||
/CMakeLists.txt.user*
|
||||
/uirc3.config
|
||||
/uirc3.files
|
||||
/uirc3.creator*
|
||||
/uirc3.includes
|
||||
/uirc3.cflags
|
||||
/uirc3.cxxflags
|
||||
/xK.config
|
||||
/xK.files
|
||||
/xK.creator*
|
||||
/xK.includes
|
||||
/xK.cflags
|
||||
/xK.cxxflags
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Ubuntu 18.04 LTS and OpenBSD 6.4
|
||||
cmake_minimum_required (VERSION 3.10)
|
||||
project (uirc3 VERSION 1.5.0 LANGUAGES C)
|
||||
project (xK VERSION 1.5.0 DESCRIPTION "IRC client, daemon and bot" LANGUAGES C)
|
||||
|
||||
# Options
|
||||
option (WANT_READLINE "Use GNU Readline for the UI (better)" ON)
|
||||
@@ -229,7 +229,6 @@ foreach (page ${project_MAN_PAGES})
|
||||
endforeach ()
|
||||
|
||||
# CPack
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Unreasonable IRC client, daemon and bot")
|
||||
set (CPACK_PACKAGE_VERSION "${project_version_safe}")
|
||||
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
|
||||
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
|
||||
|
||||
7
NEWS
7
NEWS
@@ -1,3 +1,10 @@
|
||||
Unreleased
|
||||
|
||||
* xC: made it show WALLOPS messages, as PRIVMSG for the server buffer
|
||||
|
||||
* xD: implemented WALLOPS, choosing to make it target even non-operators
|
||||
|
||||
|
||||
1.5.0 (2021-12-21) "The Show Must Go On"
|
||||
|
||||
* xC: made it possible to pass the cursor position to external editors,
|
||||
|
||||
40
README.adoc
40
README.adoc
@@ -1,11 +1,11 @@
|
||||
uirc3
|
||||
=====
|
||||
xK
|
||||
==
|
||||
|
||||
The unreasonable IRC trinity. This project consists of an IRC client, daemon,
|
||||
and bot. It's all you're ever going to need for chatting, as long as you can
|
||||
make do with minimalist software.
|
||||
'xK' (chat kit) is an IRC software suite consisting of a terminal client,
|
||||
daemon, and bot. It's all you're ever going to need for chatting,
|
||||
so long as you can make do with slightly minimalist software.
|
||||
|
||||
They have these potentially interesting properties:
|
||||
They come with these potentially interesting properties:
|
||||
|
||||
- supporting IRCv3, SOCKS, IPv6, TLS (including client certificates)
|
||||
- lean on dependencies
|
||||
@@ -14,18 +14,18 @@ They have these potentially interesting properties:
|
||||
|
||||
xC
|
||||
--
|
||||
The IRC client. It is largely defined by being built on top of GNU Readline
|
||||
that has been hacked to death. Its interface should feel somewhat familiar for
|
||||
weechat or irssi users.
|
||||
The IRC client, and the core of 'xK'. It is largely defined by being built
|
||||
on top of GNU Readline that has been hacked to death. Its interface should feel
|
||||
somewhat familiar for weechat or irssi users.
|
||||
|
||||
image::xC.png[align="center"]
|
||||
|
||||
This is the core of the project. It has most of the stuff you'd expect of
|
||||
an IRC client, such as being multiserver, a powerful configuration system,
|
||||
integrated help, text formatting, automatic splitting of overlong messages,
|
||||
multiline editing, bracketed paste support, decent word wrapping, autocomplete,
|
||||
logging, CTCP queries, auto-away, command aliases, and basic support for Lua
|
||||
scripting. As a unique bonus, you can launch a full text editor from within.
|
||||
It has most of the stuff you'd expect of an IRC client, such as being
|
||||
multiserver, a powerful configuration system, integrated help, text formatting,
|
||||
automatic splitting of overlong messages, multiline editing, bracketed paste
|
||||
support, decent word wrapping, autocomplete, logging, CTCP queries, auto-away,
|
||||
command aliases, and basic support for Lua scripting. As a unique bonus,
|
||||
you can launch a full text editor from within.
|
||||
|
||||
xD
|
||||
--
|
||||
@@ -79,9 +79,9 @@ Additionally for 'xC': curses, libffi, lua >= 5.3 (optional),
|
||||
Avoid libedit if you can, in general it works but at the moment history is
|
||||
acting up and I have no clue about fixing it.
|
||||
|
||||
$ git clone --recursive https://git.janouch.name/p/uirc3.git
|
||||
$ mkdir uirc3/build
|
||||
$ cd uirc3/build
|
||||
$ git clone --recursive https://git.janouch.name/p/xK.git
|
||||
$ mkdir xK/build
|
||||
$ cd xK/build
|
||||
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DWANT_READLINE=ON -DWANT_LIBEDIT=OFF -DWANT_LUA=ON
|
||||
$ make
|
||||
@@ -93,7 +93,7 @@ To install the application, you can do either the usual:
|
||||
Or you can try telling CMake to make a package for you:
|
||||
|
||||
$ cpack -G DEB # also supported: RPM, FreeBSD
|
||||
# dpkg -i uirc3-*.deb
|
||||
# dpkg -i xK-*.deb
|
||||
|
||||
Usage
|
||||
-----
|
||||
@@ -179,7 +179,7 @@ configurations accordingly, but I consider it rather messy and unnecessary.
|
||||
|
||||
Contributing and Support
|
||||
------------------------
|
||||
Use https://git.janouch.name/p/uirc3 to report any bugs, request features,
|
||||
Use https://git.janouch.name/p/xK to report any bugs, request features,
|
||||
or submit pull requests. `git send-email` is tolerated. If you want to discuss
|
||||
the project, feel free to join me at ircs://irc.janouch.name, channel #dev.
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
-- A list of useless URL parameters that don't affect page function
|
||||
local banned = {
|
||||
gclid = 1,
|
||||
|
||||
-- Alas, Facebook no longer uses this parameter, see:
|
||||
-- https://news.ycombinator.com/item?id=32117489
|
||||
fbclid = 1,
|
||||
|
||||
utm_source = 1,
|
||||
|
||||
6
xB.adoc
6
xB.adoc
@@ -1,8 +1,8 @@
|
||||
xB(1)
|
||||
=====
|
||||
:doctype: manpage
|
||||
:manmanual: uirc3 Manual
|
||||
:mansource: uirc3 {release-version}
|
||||
:manmanual: xK Manual
|
||||
:mansource: xK {release-version}
|
||||
|
||||
Name
|
||||
----
|
||||
@@ -100,5 +100,5 @@ _/usr/share/xB/plugins/_::
|
||||
|
||||
Reporting bugs
|
||||
--------------
|
||||
Use https://git.janouch.name/p/uirc3 to report bugs, request features,
|
||||
Use https://git.janouch.name/p/xK to report bugs, request features,
|
||||
or submit pull requests.
|
||||
|
||||
6
xC.adoc
6
xC.adoc
@@ -1,8 +1,8 @@
|
||||
xC(1)
|
||||
=====
|
||||
:doctype: manpage
|
||||
:manmanual: uirc3 Manual
|
||||
:mansource: uirc3 {release-version}
|
||||
:manmanual: xK Manual
|
||||
:mansource: xK {release-version}
|
||||
|
||||
Name
|
||||
----
|
||||
@@ -119,7 +119,7 @@ to work but exhibits bugs that are not our fault.
|
||||
|
||||
Reporting bugs
|
||||
--------------
|
||||
Use https://git.janouch.name/p/uirc3 to report bugs, request features,
|
||||
Use https://git.janouch.name/p/xK to report bugs, request features,
|
||||
or submit pull requests.
|
||||
|
||||
See also
|
||||
|
||||
11
xC.c
11
xC.c
@@ -7488,6 +7488,16 @@ irc_handle_topic (struct server *s, const struct irc_message *msg)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
irc_handle_wallops (struct server *s, const struct irc_message *msg)
|
||||
{
|
||||
if (!msg->prefix || msg->params.len < 1)
|
||||
return;
|
||||
|
||||
const char *message = msg->params.vector[0];
|
||||
log_server (s, s->buffer, 0, "<#n> #m", msg->prefix, message);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
static struct irc_handler g_irc_handlers[] =
|
||||
@@ -7511,6 +7521,7 @@ static struct irc_handler g_irc_handlers[] =
|
||||
{ "QUIT", irc_handle_quit },
|
||||
{ "TAGMSG", irc_handle_tagmsg },
|
||||
{ "TOPIC", irc_handle_topic },
|
||||
{ "WALLOPS", irc_handle_wallops },
|
||||
};
|
||||
|
||||
static bool
|
||||
|
||||
6
xD.adoc
6
xD.adoc
@@ -1,8 +1,8 @@
|
||||
xD(1)
|
||||
=====
|
||||
:doctype: manpage
|
||||
:manmanual: uirc3 Manual
|
||||
:mansource: uirc3 {release-version}
|
||||
:manmanual: xK Manual
|
||||
:mansource: xK {release-version}
|
||||
|
||||
Name
|
||||
----
|
||||
@@ -49,5 +49,5 @@ _/etc/xdg/xD/xD.conf_::
|
||||
|
||||
Reporting bugs
|
||||
--------------
|
||||
Use https://git.janouch.name/p/uirc3 to report bugs, request features,
|
||||
Use https://git.janouch.name/p/xK to report bugs, request features,
|
||||
or submit pull requests.
|
||||
|
||||
24
xD.c
24
xD.c
@@ -2932,6 +2932,29 @@ irc_handle_links (const struct irc_message *msg, struct client *c)
|
||||
irc_send_reply (c, IRC_RPL_ENDOFLINKS, mask);
|
||||
}
|
||||
|
||||
static void
|
||||
irc_handle_wallops (const struct irc_message *msg, struct client *c)
|
||||
{
|
||||
if (msg->params.len < 1)
|
||||
RETURN_WITH_REPLY (c, IRC_ERR_NEEDMOREPARAMS, msg->command);
|
||||
if (!(c->mode & IRC_USER_MODE_OPERATOR))
|
||||
RETURN_WITH_REPLY (c, IRC_ERR_NOPRIVILEGES);
|
||||
|
||||
const char *message = msg->params.vector[0];
|
||||
|
||||
// Our interpretation: anonymize the sender,
|
||||
// and target all users who want to receive these messages
|
||||
struct str_map_iter iter = str_map_iter_make (&c->ctx->users);
|
||||
struct client *target;
|
||||
while ((target = str_map_iter_next (&iter)))
|
||||
{
|
||||
if (target != c && !(target->mode & IRC_USER_MODE_RX_WALLOPS))
|
||||
continue;
|
||||
|
||||
client_send (target, ":%s WALLOPS :%s", c->ctx->server_name, message);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
irc_handle_kill (const struct irc_message *msg, struct client *c)
|
||||
{
|
||||
@@ -2994,6 +3017,7 @@ irc_register_handlers (struct server_context *ctx)
|
||||
{ "ADMIN", true, irc_handle_admin, 0, 0 },
|
||||
{ "STATS", true, irc_handle_stats, 0, 0 },
|
||||
{ "LINKS", true, irc_handle_links, 0, 0 },
|
||||
{ "WALLOPS", true, irc_handle_wallops, 0, 0 },
|
||||
|
||||
{ "MODE", true, irc_handle_mode, 0, 0 },
|
||||
{ "PRIVMSG", true, irc_handle_privmsg, 0, 0 },
|
||||
|
||||
Reference in New Issue
Block a user