6 Commits

4 changed files with 55 additions and 32 deletions

View File

@@ -1,15 +1,19 @@
cmake_minimum_required (VERSION 3.0) # Ubuntu 18.04 LTS and OpenBSD 6.4
project (uirc3 VERSION 1.4.0 LANGUAGES C) cmake_minimum_required (VERSION 3.10)
project (uirc3 VERSION 1.5.0 LANGUAGES C)
# Options # Options
option (WANT_READLINE "Use GNU Readline for the UI (better)" ON) option (WANT_READLINE "Use GNU Readline for the UI (better)" ON)
option (WANT_LIBEDIT "Use BSD libedit for the UI" OFF) option (WANT_LIBEDIT "Use BSD libedit for the UI" OFF)
# Moar warnings # Moar warnings
set (CMAKE_C_STANDARD 99)
set (CMAKE_C_STANDARD_REQUIRED ON)
set (CMAKE_C_EXTENSIONS OFF)
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
# -Wunused-function is pretty annoying here, as everything is static # -Wunused-function is pretty annoying here, as everything is static
set (wdisabled "-Wno-unused-function") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-function")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra ${wdisabled}")
endif () endif ()
# Version # Version
@@ -57,6 +61,8 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
# Need this for SIGWINCH in FreeBSD and OpenBSD respectively; # Need this for SIGWINCH in FreeBSD and OpenBSD respectively;
# our POSIX version macros make it undefined # our POSIX version macros make it undefined
add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1) add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1)
elseif (APPLE)
add_definitions (-D_DARWIN_C_SOURCE)
endif () endif ()
# -lrt is only for glibc < 2.17 # -lrt is only for glibc < 2.17
@@ -112,10 +118,16 @@ endif ()
if ((WANT_READLINE AND WANT_LIBEDIT) OR (NOT WANT_READLINE AND NOT WANT_LIBEDIT)) if ((WANT_READLINE AND WANT_LIBEDIT) OR (NOT WANT_READLINE AND NOT WANT_LIBEDIT))
message (SEND_ERROR "You have to choose either GNU Readline or libedit") message (SEND_ERROR "You have to choose either GNU Readline or libedit")
elseif (WANT_READLINE) elseif (WANT_READLINE)
pkg_check_modules (readline readline)
# OpenBSD's default readline is too old # OpenBSD's default readline is too old
if ("${CMAKE_SYSTEM_NAME}" MATCHES "OpenBSD") if ("${CMAKE_SYSTEM_NAME}" MATCHES "OpenBSD")
include_directories (${OPENBSD_LOCALBASE}/include/ereadline) include_directories (${OPENBSD_LOCALBASE}/include/ereadline)
list (APPEND xC_libraries ereadline) list (APPEND xC_libraries ereadline)
elseif (readline_FOUND)
list (APPEND xC_libraries ${readline_LIBRARIES})
include_directories (${readline_INCLUDE_DIRS})
link_directories (${readline_LIBRARY_DIRS})
else () else ()
list (APPEND xC_libraries readline) list (APPEND xC_libraries readline)
endif () endif ()

15
NEWS
View File

@@ -1,3 +1,18 @@
1.5.0 (2021-12-21) "The Show Must Go On"
* xC: made it possible to pass the cursor position to external editors,
in particular VIM and Emacs
* xC: started quoting text coming from bracketed pastes,
to minimize the risk of trying to execute filesystem paths as commands
* xC: fixed to work with post-2021-08-29 editline
* xC: extended editline's autocomplete to show all options
* utm-filter.lua: added Facebook's tracking parameter to the filter
1.4.0 (2021-10-06) "Call Me Scruffy Scruffington" 1.4.0 (2021-10-06) "Call Me Scruffy Scruffington"
* xC: made message autosplitting respect text formatting * xC: made message autosplitting respect text formatting

View File

@@ -1,18 +1,16 @@
uirc3 uirc3
===== =====
:compact-option:
The unreasonable IRC trinity. This project consists of an IRC client, daemon, 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 and bot. It's all you're ever going to need for chatting, as long as you can
make do with minimalist software. make do with minimalist software.
All of them have these potentially interesting properties: They have these potentially interesting properties:
- IPv6 support - supporting IRCv3, SOCKS, IPv6, TLS (including client certificates)
- TLS support, including client certificates - lean on dependencies
- lean on dependencies (with the exception of 'xC')
- compact and arguably easy to hack on - compact and arguably easy to hack on
- very permissive license - maximally permissive license
xC xC
-- --
@@ -22,11 +20,12 @@ weechat or irssi users.
image::xC.png[align="center"] image::xC.png[align="center"]
This is the largest application within the project. It has most of the stuff This is the core of the project. It has most of the stuff you'd expect of
you'd expect of an IRC client, such as being able to set up multiple servers, an IRC client, such as being multiserver, a powerful configuration system,
a powerful configuration system, integrated help, text formatting, CTCP queries, integrated help, text formatting, automatic splitting of overlong messages,
automatic splitting of overlong messages, autocomplete, logging to file, multiline editing, bracketed paste support, decent word wrapping, autocomplete,
auto-away, command aliases and basic support for Lua scripting. 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 xD
-- --
@@ -37,10 +36,8 @@ do it just fine.
Notable features: Notable features:
- TLS autodetection (why doesn't everyone have this?), using secure defaults - TLS autodetection (I'm still wondering why everyone doesn't have this)
- IRCop authentication via TLS client certificates - IRCop authentication via TLS client certificates
- epoll/kqueue support; this means that it should be able to handle quite
a number of concurrent user connections
- partial IRCv3 support - partial IRCv3 support
Not supported: Not supported:
@@ -58,16 +55,14 @@ and development continues over there.
xB xB
-- --
The IRC bot. It builds upon the concept of my other VitaminA IRC bot. The main The IRC bot. While originally intended to be a simple rewrite of my old GNU AWK
characteristic of these two bots is that they run plugins as coprocesses, which bot in C, it fairly quickly became a playground, and it eventually got me into
allows for enhanced reliability and programming language freedom. writing the rest of this package.
While originally intended to be a simple rewrite of the original AWK bot in C, Its main characteristic is that it runs plugins as coprocesses, allowing for
it fairly quickly became a playground, and it eventually got me into writing enhanced reliability and programming language freedom. Moreover, it recovers
the rest of the package. from any crashes, and offers native SOCKS support (even though socksify can add
that easily to any program).
It survives crashes, server disconnects and timeouts, and also has native SOCKS
support (even though socksify can add that easily to any program).
Packages Packages
-------- --------
@@ -87,7 +82,7 @@ acting up and I have no clue about fixing it.
$ git clone --recursive https://git.janouch.name/p/uirc3.git $ git clone --recursive https://git.janouch.name/p/uirc3.git
$ mkdir uirc3/build $ mkdir uirc3/build
$ cd uirc3/build $ cd uirc3/build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug \ $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DWANT_READLINE=ON -DWANT_LIBEDIT=OFF -DWANT_LUA=ON -DWANT_READLINE=ON -DWANT_LIBEDIT=OFF -DWANT_LUA=ON
$ make $ make
@@ -95,9 +90,9 @@ To install the application, you can do either the usual:
# make install # make install
Or you can try telling CMake to make a package for you. For Debian it is: Or you can try telling CMake to make a package for you:
$ cpack -G DEB $ cpack -G DEB # also supported: RPM, FreeBSD
# dpkg -i uirc3-*.deb # dpkg -i uirc3-*.deb
Usage Usage

View File

@@ -1,7 +1,7 @@
-- --
-- utm-filter.lua: filter out Google Analytics bullshit from URLs -- utm-filter.lua: filter out Google Analytics bullshit etc. from URLs
-- --
-- Copyright (c) 2015, Přemysl Eric Janouch <p@janouch.name> -- Copyright (c) 2015 - 2021, Přemysl Eric Janouch <p@janouch.name>
-- --
-- Permission to use, copy, modify, and/or distribute this software for any -- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted. -- purpose with or without fee is hereby granted.
@@ -18,6 +18,7 @@
-- A list of useless URL parameters that don't affect page function -- A list of useless URL parameters that don't affect page function
local banned = { local banned = {
gclid = 1, gclid = 1,
fbclid = 1,
utm_source = 1, utm_source = 1,
utm_medium = 1, utm_medium = 1,