forked from PsychoticNinja/irssi
Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
91dc3e4dfa | ||
|
843c3968c7 | ||
|
b114201b7b | ||
|
e8457188ce | ||
|
18e97d9e8b | ||
|
aae1e3392a | ||
|
d3bb5d7015 | ||
|
e814df5422 | ||
|
33c7416390 | ||
|
fc93d11bf6 | ||
|
c165f38ca5 | ||
|
6d352cfd79 | ||
|
4f88386511 | ||
|
80a338fe10 | ||
|
93c5705078 | ||
|
b00b17a485 | ||
|
ef4bad3600 | ||
|
d05e65b2f9 | ||
|
aa7dfea534 | ||
|
11905badcb | ||
|
ef124d7378 | ||
|
c72ff03d9c | ||
|
6ad105487e | ||
|
ec0b17305a | ||
|
b47bc61866 | ||
|
41c3ec7445 | ||
|
07472fc569 | ||
|
da12a0361b | ||
|
4b5e0de15b | ||
|
dee0554731 | ||
|
42110b92e9 | ||
|
15867d62e7 | ||
|
5b923493de | ||
|
248a1591a2 | ||
|
27c02a2d96 | ||
|
bb7e81438d | ||
|
fddcbe56c9 | ||
|
309ea88252 | ||
|
24547829e7 | ||
|
bb600a6575 |
65
NEWS
65
NEWS
@ -1,3 +1,68 @@
|
||||
v1.2.3 2021-04-11 The Irssi team <staff@irssi.org>
|
||||
- Fix the compilation of utf8proc (#1021)
|
||||
- Fix wrong call to free. By Zero King (#1076)
|
||||
- Fix a colour reset in true colour themes when encountering
|
||||
mIRC colours (#1059)
|
||||
- Fix memory leak on malformed CAP requests (#1120)
|
||||
- Fix an erroneous free of SASL data. Credit to Oss-Fuzz (#1128,
|
||||
#1130)
|
||||
- Re-set the TLS flag when reconnecting (#1027, #1134)
|
||||
- Fix the scrollback getting stuck after /clear (#1115, #1136)
|
||||
- Fix the input of Ctrl+C as the first character (#1153, #1154)
|
||||
- Fix crash on quit during unloading of modules on certain
|
||||
platforms (#1167)
|
||||
- Fix Irssi freezing input after Ctrl+Space on GLib >2.62 (#1180,
|
||||
#1183)
|
||||
- Fix layout of IDCHANs. By Lauri Tirkkonen (#1197)
|
||||
- Fix crash when server got reconnected before it was properly
|
||||
connected (#1210, #1211)
|
||||
- Fix multiple identical active caps (#1249)
|
||||
- Minor help corrections (#1156, #1213, #1214, #1255)
|
||||
- Remove erroneous colour in the colorless theme. Reported and
|
||||
fixed by Nutchanon Wetchasit (#1220, #1221)
|
||||
- Fix invalid bounds calculation when editing the text
|
||||
entry. Found and fixed by Sergey Valentey (#1269)
|
||||
- Fix passing of negative size in buffer writes. Found and
|
||||
fixed by Sergey Valentey (#1270)
|
||||
- Fix Irssi freezing on slow hardware and fast DCC transfers (#159,
|
||||
#1271)
|
||||
- Fix compilation on Solaris (#1291)
|
||||
- Fix null pointer dereference when receiving broken JOIN
|
||||
record. Credit to Oss-Fuzz (#1292)
|
||||
- Fix crash on /connect to some sockets (#1239, #1298)
|
||||
- Fix Irssi rendering on Apple ARM. By Misty De Méo (#1267,
|
||||
#1268, #1290)
|
||||
- Fix crash on /lastlog with broken lines (#1281, #1299)
|
||||
- Fix memory leak when receiving bogus SASL authentication
|
||||
data. Found and fixed by Sergey Valentey (#1293)
|
||||
|
||||
v1.2.2 2019-08-29 The Irssi team <staff@irssi.org>
|
||||
- Fix a use after free issue when receiving IRCv3 CAP
|
||||
information from the server (GL#34)
|
||||
- Fix a crash during startup when windows weren't fully
|
||||
initialised yet (#1114, bdo#935813)
|
||||
|
||||
v1.2.1 2019-06-29 The Irssi team <staff@irssi.org>
|
||||
! Contains all changes from 1.1.3
|
||||
- Fix a test on big endian machines (#1014)
|
||||
- Fix the compile time conditionality of wcwidth
|
||||
implementation (#1019, gentoo#677804, #720)
|
||||
- Fix /save no longer working on old Solaris (pre
|
||||
POSIX.1-2008) (#1042, #1043)
|
||||
- Fix regression of #764 where display of 8-bit (legacy
|
||||
encoding) in the input prompt was broken (#1018,
|
||||
#1057). Initial patch by Артём Курашов
|
||||
|
||||
v1.1.3 2019-06-29 The Irssi team <staff@irssi.org>
|
||||
! Contains all changes from 1.0.8
|
||||
- Fix regression of #779 where autolog_ignore_targets would
|
||||
not matching itemless windows anymore (#1012, #1013)
|
||||
|
||||
v1.0.8 2019-06-29 The Irssi team <staff@irssi.org>
|
||||
- Fix a use after free issue when sending the SASL login on
|
||||
(automatic and manual) reconnects (#1055, #1058). Reported
|
||||
by ilbelkyr
|
||||
|
||||
v1.2.0 2019-02-11 The Irssi team <staff@irssi.org>
|
||||
! Contains all changes from 1.1.2
|
||||
* Improved the /STATUSBAR commands (#858)
|
||||
|
33
configure.ac
33
configure.ac
@ -1,11 +1,11 @@
|
||||
AC_INIT(irssi, 1.2.0)
|
||||
AC_INIT(irssi, 1.2.3)
|
||||
AC_CONFIG_SRCDIR([src])
|
||||
AC_CONFIG_AUX_DIR(build-aux)
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
AC_CONFIG_HEADERS([irssi-config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([1.9 no-define foreign subdir-objects])
|
||||
AM_INIT_AUTOMAKE([1.9 no-define foreign subdir-objects nostdinc])
|
||||
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
@ -181,6 +181,15 @@ AC_ARG_ENABLE(gregex,
|
||||
fi,
|
||||
want_gregex=yes)
|
||||
|
||||
AC_ARG_ENABLE(utf8proc,
|
||||
[ --disable-utf8proc Build without Julia's utf8proc],
|
||||
if test x$enableval = xno ; then
|
||||
want_utf8proc=no
|
||||
else
|
||||
want_utf8proc=yes
|
||||
fi,
|
||||
want_utf8proc=yes)
|
||||
|
||||
AC_ARG_WITH(capsicum,
|
||||
[ --with-capsicum Build with Capsicum support],
|
||||
if test x$withval = xno; then
|
||||
@ -329,7 +338,19 @@ PKG_CHECK_MODULES([OPENSSL], [openssl], [
|
||||
dnl **
|
||||
dnl ** utf8proc
|
||||
dnl **
|
||||
AC_CHECK_LIB([utf8proc], [utf8proc_version])
|
||||
if test "x$want_utf8proc" != "xno"; then
|
||||
AC_CHECK_HEADER([utf8proc.h], [
|
||||
AC_CHECK_LIB([utf8proc], [utf8proc_version], [
|
||||
want_utf8proc=yes
|
||||
AC_DEFINE(HAVE_LIBUTF8PROC,, [Define to 1 if you have the `utf8proc' library (-lutf8proc).])
|
||||
LIBS="$LIBS -lutf8proc"
|
||||
], [
|
||||
want_utf8proc="no, library not found"
|
||||
])
|
||||
], [
|
||||
want_utf8proc="no, library header not found"
|
||||
])
|
||||
fi
|
||||
|
||||
dnl **
|
||||
dnl ** curses checks
|
||||
@ -348,6 +369,10 @@ if test "x$want_textui" != "xno"; then
|
||||
AC_SUBST(TEXTUI_LIBS)
|
||||
LIBS="$TEXTUI_NO_LIBS"
|
||||
|
||||
AC_CHECK_HEADER([term.h], [
|
||||
AC_DEFINE(HAVE_TERM_H, [], [Define to 1 if you have the `term.h' header.])
|
||||
])
|
||||
|
||||
fi
|
||||
|
||||
dnl **
|
||||
@ -821,7 +846,7 @@ echo "Building with 64bit DCC support .. : $offt_64bit"
|
||||
echo "Building with true color support.. : $want_truecolor"
|
||||
echo "Building with GRegex ............. : $want_gregex"
|
||||
echo "Building with Capsicum ........... : $want_capsicum"
|
||||
echo "Building with utf8proc ........... : $ac_cv_lib_utf8proc_utf8proc_version"
|
||||
echo "Building with utf8proc ........... : $want_utf8proc"
|
||||
if test "x$want_otr" = "xstatic"; then
|
||||
echo "Building with OTR support ........ : static (in irssi binary)"
|
||||
elif test "x$want_otr" = "xmodule"; then
|
||||
|
@ -25,6 +25,8 @@
|
||||
The special level 'NO_ACT' can be used to ignore activity in the statusbar
|
||||
without actually ignoring the message; this behavior is somewhat special
|
||||
because it is allowed in addition to other ignores for the same target.
|
||||
The special level 'HIDDEN' can be used to hide matching messages that can
|
||||
later be revealed using /WINDOW HIDELEVEL -HIDDEN
|
||||
|
||||
%9Examples:%9
|
||||
|
||||
@ -35,12 +37,13 @@
|
||||
/IGNORE #irssi ALL -PUBLIC -ACTIONS
|
||||
/IGNORE -replies *!*@*.irssi.org ALL
|
||||
/IGNORE -regexp -pattern (away|gone|back|playing|returned) * ACTIONS
|
||||
/IGNORE -regexp -pattern (away|gone|back|playing|returned) #channel ACTIONS
|
||||
/IGNORE *zzz* NICKS
|
||||
/IGNORE *afk* NICKS
|
||||
/IGNORE *away* NICKS
|
||||
/IGNORE #irssi NO_ACT JOINS PARTS QUITS
|
||||
/IGNORE mike NO_ACT -MSGS
|
||||
/IGNORE -regexp -pattern
|
||||
/IGNORE mike HIDDEN PUBLIC JOINS PARTS QUITS
|
||||
|
||||
%9See also:%9 ACCEPT, SILENCE, UNIGNORE
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
HILIGHT The text is highlighted.
|
||||
NEVER Never ignores or logs the message.
|
||||
HIDDEN Hides the message when window HIDELEVEL includes HIDDEN.
|
||||
NO_ACT Doesn't trigger any activity in the statusbar.
|
||||
NOHILIGHT The text is not highlighted.
|
||||
|
||||
|
@ -56,6 +56,8 @@
|
||||
disconnected unless you prepend the server with the '+' character; the same
|
||||
method is applicable to the CONNECT parameter.
|
||||
|
||||
Specify '-' as password to remove a server password
|
||||
|
||||
%9Examples:%9
|
||||
|
||||
/SERVER
|
||||
@ -64,6 +66,7 @@
|
||||
/SERVER ADD -network Freenode -noautosendcmd orwell.freenode.net
|
||||
/SERVER ADD -! -auto -host staff.irssi.org -4 -network Freenode -noproxy orwell.freenode.net 6667
|
||||
/SERVER MODIFY -network Freenode -noauto orwell.freenode.net
|
||||
/SERVER MODIFY -network Freenode orwell.freenode.net 6697 -
|
||||
/SERVER REMOVE orwell.freenode.net 6667 Freenode
|
||||
/SERVER PURGE
|
||||
/SERVER PURGE orwell.freenode.net
|
||||
|
@ -107,7 +107,7 @@ channels = (
|
||||
|
||||
aliases = {
|
||||
ATAG = "WINDOW SERVER";
|
||||
ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}";
|
||||
ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{visible_name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}";
|
||||
B = "BAN";
|
||||
BACK = "AWAY";
|
||||
BANS = "BAN";
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libcore.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
$(GLIB_CFLAGS) \
|
||||
|
@ -214,7 +214,7 @@ MODULE_FILE_REC *module_register_full(const char *name, const char *submodule,
|
||||
module = g_new0(MODULE_REC, 1);
|
||||
module->name = g_strdup(name);
|
||||
|
||||
modules = g_slist_append(modules, module);
|
||||
modules = g_slist_prepend(modules, module);
|
||||
}
|
||||
|
||||
file = module_file_find(module, submodule);
|
||||
@ -226,8 +226,8 @@ MODULE_FILE_REC *module_register_full(const char *name, const char *submodule,
|
||||
file->name = g_strdup(submodule);
|
||||
file->defined_module_name = g_strdup(defined_module_name);
|
||||
|
||||
module->files = g_slist_append(module->files, file);
|
||||
return file;
|
||||
module->files = g_slist_prepend(module->files, file);
|
||||
return file;
|
||||
}
|
||||
|
||||
MODULE_REC *module_find(const char *name)
|
||||
|
@ -226,7 +226,7 @@ static gboolean irssi_ssl_verify_hostname(X509 *cert, const char *hostname)
|
||||
} else {
|
||||
g_warning("No subjectAltNames and no valid common name in certificate");
|
||||
}
|
||||
free(cert_subject_cn);
|
||||
g_free(cert_subject_cn);
|
||||
}
|
||||
|
||||
return matched;
|
||||
|
@ -151,10 +151,6 @@ static int server_reconnect_timeout(void)
|
||||
|
||||
static void sserver_connect(SERVER_SETUP_REC *rec, SERVER_CONNECT_REC *conn)
|
||||
{
|
||||
conn->family = rec->family;
|
||||
conn->address = g_strdup(rec->address);
|
||||
if (conn->port == 0) conn->port = rec->port;
|
||||
|
||||
server_setup_fill_reconn(conn, rec);
|
||||
server_reconnect_add(conn, rec->last_connect+reconnect_time);
|
||||
server_connect_unref(conn);
|
||||
@ -181,10 +177,20 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info)
|
||||
dest->tag = g_strdup(src->tag);
|
||||
|
||||
if (connect_info) {
|
||||
dest->family = src->family;
|
||||
dest->family = src->family;
|
||||
dest->address = g_strdup(src->address);
|
||||
dest->port = src->port;
|
||||
dest->password = g_strdup(src->password);
|
||||
|
||||
dest->use_tls = src->use_tls;
|
||||
dest->tls_cert = g_strdup(src->tls_cert);
|
||||
dest->tls_pkey = g_strdup(src->tls_pkey);
|
||||
dest->tls_verify = src->tls_verify;
|
||||
dest->tls_cafile = g_strdup(src->tls_cafile);
|
||||
dest->tls_capath = g_strdup(src->tls_capath);
|
||||
dest->tls_ciphers = g_strdup(src->tls_ciphers);
|
||||
dest->tls_pinned_cert = g_strdup(src->tls_pinned_cert);
|
||||
dest->tls_pinned_pubkey = g_strdup(src->tls_pinned_pubkey);
|
||||
}
|
||||
|
||||
dest->chatnet = g_strdup(src->chatnet);
|
||||
@ -207,16 +213,6 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info)
|
||||
dest->no_autosendcmd = src->no_autosendcmd;
|
||||
dest->unix_socket = src->unix_socket;
|
||||
|
||||
dest->use_tls = src->use_tls;
|
||||
dest->tls_cert = g_strdup(src->tls_cert);
|
||||
dest->tls_pkey = g_strdup(src->tls_pkey);
|
||||
dest->tls_verify = src->tls_verify;
|
||||
dest->tls_cafile = g_strdup(src->tls_cafile);
|
||||
dest->tls_capath = g_strdup(src->tls_capath);
|
||||
dest->tls_ciphers = g_strdup(src->tls_ciphers);
|
||||
dest->tls_pinned_cert = g_strdup(src->tls_pinned_cert);
|
||||
dest->tls_pinned_pubkey = g_strdup(src->tls_pinned_pubkey);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
@ -293,7 +289,7 @@ static void sig_reconnect(SERVER_REC *server)
|
||||
(!rec->last_connect || !rec->last_failed ||
|
||||
rec->last_connect < now-FAILED_RECONNECT_WAIT)) {
|
||||
if (rec == sserver)
|
||||
conn->port = server->connrec->port;
|
||||
conn->port = server->connrec->port;
|
||||
sserver_connect(rec, conn);
|
||||
return;
|
||||
}
|
||||
|
@ -108,6 +108,35 @@ void server_setup_fill_reconn(SERVER_CONNECT_REC *conn,
|
||||
if (sserver->password != NULL && conn->password == NULL)
|
||||
conn->password = g_strdup(sserver->password);
|
||||
|
||||
if (sserver->no_proxy)
|
||||
g_free_and_null(conn->proxy);
|
||||
|
||||
if (sserver->family != 0 && conn->family == 0)
|
||||
conn->family = sserver->family;
|
||||
if (sserver->address && !conn->address)
|
||||
conn->address = g_strdup(sserver->address);
|
||||
if (sserver->port > 0 && conn->port <= 0)
|
||||
conn->port = sserver->port;
|
||||
|
||||
conn->use_tls = sserver->use_tls;
|
||||
if (conn->tls_cert == NULL && sserver->tls_cert != NULL && sserver->tls_cert[0] != '\0')
|
||||
conn->tls_cert = g_strdup(sserver->tls_cert);
|
||||
if (conn->tls_pkey == NULL && sserver->tls_pkey != NULL && sserver->tls_pkey[0] != '\0')
|
||||
conn->tls_pkey = g_strdup(sserver->tls_pkey);
|
||||
if (conn->tls_pass == NULL && sserver->tls_pass != NULL && sserver->tls_pass[0] != '\0')
|
||||
conn->tls_pass = g_strdup(sserver->tls_pass);
|
||||
conn->tls_verify = sserver->tls_verify;
|
||||
if (conn->tls_cafile == NULL && sserver->tls_cafile != NULL && sserver->tls_cafile[0] != '\0')
|
||||
conn->tls_cafile = g_strdup(sserver->tls_cafile);
|
||||
if (conn->tls_capath == NULL && sserver->tls_capath != NULL && sserver->tls_capath[0] != '\0')
|
||||
conn->tls_capath = g_strdup(sserver->tls_capath);
|
||||
if (conn->tls_ciphers == NULL && sserver->tls_ciphers != NULL && sserver->tls_ciphers[0] != '\0')
|
||||
conn->tls_ciphers = g_strdup(sserver->tls_ciphers);
|
||||
if (conn->tls_pinned_cert == NULL && sserver->tls_pinned_cert != NULL && sserver->tls_pinned_cert[0] != '\0')
|
||||
conn->tls_pinned_cert = g_strdup(sserver->tls_pinned_cert);
|
||||
if (conn->tls_pinned_pubkey == NULL && sserver->tls_pinned_pubkey != NULL && sserver->tls_pinned_pubkey[0] != '\0')
|
||||
conn->tls_pinned_pubkey = g_strdup(sserver->tls_pinned_pubkey);
|
||||
|
||||
signal_emit("server setup fill reconn", 2, conn, sserver);
|
||||
}
|
||||
|
||||
@ -159,33 +188,6 @@ static void server_setup_fill_server(SERVER_CONNECT_REC *conn,
|
||||
|
||||
sserver->last_connect = time(NULL);
|
||||
|
||||
if (sserver->no_proxy)
|
||||
g_free_and_null(conn->proxy);
|
||||
|
||||
if (sserver->family != 0 && conn->family == 0)
|
||||
conn->family = sserver->family;
|
||||
if (sserver->port > 0 && conn->port <= 0)
|
||||
conn->port = sserver->port;
|
||||
|
||||
conn->use_tls = sserver->use_tls;
|
||||
if (conn->tls_cert == NULL && sserver->tls_cert != NULL && sserver->tls_cert[0] != '\0')
|
||||
conn->tls_cert = g_strdup(sserver->tls_cert);
|
||||
if (conn->tls_pkey == NULL && sserver->tls_pkey != NULL && sserver->tls_pkey[0] != '\0')
|
||||
conn->tls_pkey = g_strdup(sserver->tls_pkey);
|
||||
if (conn->tls_pass == NULL && sserver->tls_pass != NULL && sserver->tls_pass[0] != '\0')
|
||||
conn->tls_pass = g_strdup(sserver->tls_pass);
|
||||
conn->tls_verify = sserver->tls_verify;
|
||||
if (conn->tls_cafile == NULL && sserver->tls_cafile != NULL && sserver->tls_cafile[0] != '\0')
|
||||
conn->tls_cafile = g_strdup(sserver->tls_cafile);
|
||||
if (conn->tls_capath == NULL && sserver->tls_capath != NULL && sserver->tls_capath[0] != '\0')
|
||||
conn->tls_capath = g_strdup(sserver->tls_capath);
|
||||
if (conn->tls_ciphers == NULL && sserver->tls_ciphers != NULL && sserver->tls_ciphers[0] != '\0')
|
||||
conn->tls_ciphers = g_strdup(sserver->tls_ciphers);
|
||||
if (conn->tls_pinned_cert == NULL && sserver->tls_pinned_cert != NULL && sserver->tls_pinned_cert[0] != '\0')
|
||||
conn->tls_pinned_cert = g_strdup(sserver->tls_pinned_cert);
|
||||
if (conn->tls_pinned_pubkey == NULL && sserver->tls_pinned_pubkey != NULL && sserver->tls_pinned_pubkey[0] != '\0')
|
||||
conn->tls_pinned_pubkey = g_strdup(sserver->tls_pinned_pubkey);
|
||||
|
||||
server_setup_fill_reconn(conn, sserver);
|
||||
|
||||
signal_emit("server setup fill server", 2, conn, sserver);
|
||||
|
@ -206,7 +206,7 @@ static void server_real_connect(SERVER_REC *server, IPADDR *ip,
|
||||
const char *errmsg;
|
||||
char *errmsg2;
|
||||
char ipaddr[MAX_IP_LEN];
|
||||
int port;
|
||||
int port = 0;
|
||||
|
||||
g_return_if_fail(ip != NULL || unix_socket != NULL);
|
||||
|
||||
@ -219,12 +219,22 @@ static void server_real_connect(SERVER_REC *server, IPADDR *ip,
|
||||
own_ip = IPADDR_IS_V6(ip) ? server->connrec->own_ip6 : server->connrec->own_ip4;
|
||||
port = server->connrec->proxy != NULL ?
|
||||
server->connrec->proxy_port : server->connrec->port;
|
||||
handle = server->connrec->use_tls ?
|
||||
net_connect_ip_ssl(ip, port, own_ip, server) : net_connect_ip(ip, port, own_ip);
|
||||
handle = net_connect_ip(ip, port, own_ip);
|
||||
} else {
|
||||
handle = net_connect_unix(unix_socket);
|
||||
}
|
||||
|
||||
if (server->connrec->use_tls && handle != NULL) {
|
||||
server->handle = net_sendbuffer_create(handle, 0);
|
||||
handle = net_start_ssl(server);
|
||||
if (handle == NULL) {
|
||||
net_sendbuffer_destroy(server->handle, TRUE);
|
||||
server->handle = NULL;
|
||||
} else {
|
||||
server->handle->handle = handle;
|
||||
}
|
||||
}
|
||||
|
||||
if (handle == NULL) {
|
||||
/* failed */
|
||||
errmsg = g_strerror(errno);
|
||||
@ -244,7 +254,8 @@ static void server_real_connect(SERVER_REC *server, IPADDR *ip,
|
||||
server_connect_failed(server, errmsg2 ? errmsg2 : errmsg);
|
||||
g_free(errmsg2);
|
||||
} else {
|
||||
server->handle = net_sendbuffer_create(handle, 0);
|
||||
if (!server->connrec->use_tls)
|
||||
server->handle = net_sendbuffer_create(handle, 0);
|
||||
if (server->connrec->use_tls)
|
||||
server_connect_callback_init_ssl(server, handle);
|
||||
else
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct _TLS_REC TLS_REC;
|
||||
typedef struct _TLS_CERT_REC TLS_CERT_REC;
|
||||
typedef struct _TLS_CERT_ENTRY_REC TLS_CERT_ENTRY_REC;
|
||||
|
@ -63,14 +63,14 @@ int write_buffer(int handle, const void *data, int size)
|
||||
const char *cdata = data;
|
||||
int next_size;
|
||||
|
||||
if (size <= 0)
|
||||
return size;
|
||||
|
||||
if (write_buffer_max_blocks <= 0) {
|
||||
/* no write buffer */
|
||||
return write(handle, data, size);
|
||||
}
|
||||
|
||||
if (size <= 0)
|
||||
return size;
|
||||
|
||||
rec = g_hash_table_lookup(buffers, GINT_TO_POINTER(handle));
|
||||
if (rec == NULL) {
|
||||
rec = g_new0(BUFFER_REC, 1);
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libfe_common_core.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src -I$(top_srcdir)/src/core/ \
|
||||
$(GLIB_CFLAGS) \
|
||||
-DHELPDIR=\""$(datadir)/irssi/help"\" \
|
||||
|
@ -1195,6 +1195,9 @@ static void sig_server_disconnected(SERVER_REC *server)
|
||||
g_return_if_fail(server != NULL);
|
||||
|
||||
mserver = MODULE_DATA(server);
|
||||
if (mserver == NULL)
|
||||
return;
|
||||
|
||||
while (mserver->lastmsgs)
|
||||
last_msg_destroy(&mserver->lastmsgs, mserver->lastmsgs->data);
|
||||
}
|
||||
|
@ -486,9 +486,6 @@ gboolean strarray_find_dest(char **array, const TEXT_DEST_REC *dest)
|
||||
strarray_find(array, dest->window->name) != -1 ? TRUE : FALSE;
|
||||
|
||||
item = window_item_find_window(dest->window, dest->server, dest->target);
|
||||
if (item == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
server_tag_len = dest->server_tag != NULL ? strlen(dest->server_tag) : 0;
|
||||
for (tmp = array; *tmp != NULL; tmp++) {
|
||||
@ -507,11 +504,11 @@ gboolean strarray_find_dest(char **array, const TEXT_DEST_REC *dest)
|
||||
return TRUE;
|
||||
} else if (g_ascii_strcasecmp(str, dest->target) == 0) {
|
||||
return TRUE;
|
||||
} else if (item->type == query_type &&
|
||||
} else if (item != NULL && item->type == query_type &&
|
||||
g_strcmp0(str, dest->target[0] == '=' ? "::dccqueries" :
|
||||
"::queries") == 0) {
|
||||
return TRUE;
|
||||
} else if (item->type == channel_type &&
|
||||
} else if (item != NULL && item->type == channel_type &&
|
||||
g_strcmp0(str, "::channels") == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -169,12 +169,12 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item,
|
||||
chat_protocol_find_id(item->chat_type);
|
||||
if (proto != NULL)
|
||||
iconfig_node_set_str(subnode, "chat_type", proto->name);
|
||||
iconfig_node_set_str(subnode, "name", item->name);
|
||||
iconfig_node_set_str(subnode, "name", item->visible_name);
|
||||
|
||||
if (item->server != NULL) {
|
||||
iconfig_node_set_str(subnode, "tag", item->server->tag);
|
||||
if (IS_CHANNEL(item)) {
|
||||
rec = window_bind_add(window, item->server->tag, item->name);
|
||||
rec = window_bind_add(window, item->server->tag, item->visible_name);
|
||||
if (rec != NULL)
|
||||
rec->sticky = TRUE;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ SUBDIRS = dcc notifylist
|
||||
noinst_LIBRARIES = libfe_common_irc.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libfe_irc_dcc.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libfe_irc_notifylist.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -6,6 +6,7 @@ bin_PROGRAMS = irssi-fuzz server-fuzz
|
||||
CCLD=$(CXX) $(CXXFLAGS)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -4,6 +4,7 @@ bin_PROGRAMS = theme-load-fuzz
|
||||
CCLD=$(CXX) $(CXXFLAGS)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -4,6 +4,7 @@ bin_PROGRAMS = event-get-params-fuzz
|
||||
CCLD=$(CXX) $(CXXFLAGS)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -1,6 +1,7 @@
|
||||
bin_PROGRAMS = botti
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -1,6 +1,7 @@
|
||||
bin_PROGRAMS = irssi
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/fe-common/core/ \
|
||||
|
@ -379,11 +379,19 @@ static void gui_entry_draw_from(GUI_ENTRY_REC *entry, int pos)
|
||||
if (new_xpos > end_xpos)
|
||||
break;
|
||||
|
||||
if (entry->hidden)
|
||||
if (entry->hidden) {
|
||||
g_string_append_c(str, ' ');
|
||||
else if (unichar_isprint(c))
|
||||
g_string_append_unichar(str, c);
|
||||
else {
|
||||
} else if (unichar_isprint(c)) {
|
||||
if (entry->utf8) {
|
||||
g_string_append_unichar(str, c);
|
||||
} else if (term_type == TERM_TYPE_BIG5) {
|
||||
if(c > 0xff)
|
||||
g_string_append_c(str, (c >> 8) & 0xff);
|
||||
g_string_append_c(str, c & 0xff);
|
||||
} else {
|
||||
g_string_append_c(str, c);
|
||||
}
|
||||
} else {
|
||||
g_string_append_c(str, 4);
|
||||
g_string_append_c(str, FORMAT_STYLE_REVERSE);
|
||||
g_string_append_c(str, (c & 127)+'A'-1);
|
||||
@ -646,7 +654,7 @@ void gui_entry_insert_char(GUI_ENTRY_REC *entry, unichar chr)
|
||||
if (chr == 0 || chr == 13 || chr == 10)
|
||||
return; /* never insert NUL, CR or LF characters */
|
||||
|
||||
if (entry->utf8 && entry->pos == 0 && i_wcwidth(chr) == 0)
|
||||
if (entry->utf8 && entry->pos == 0 && unichar_isprint(chr) && i_wcwidth(chr) == 0)
|
||||
return;
|
||||
|
||||
gui_entry_redraw_from(entry, entry->pos);
|
||||
@ -827,8 +835,8 @@ void gui_entry_erase(GUI_ENTRY_REC *entry, int size, CUTBUFFER_UPDATE_OP update_
|
||||
}
|
||||
|
||||
if (entry->utf8)
|
||||
while (entry->pos-size-w > 0 &&
|
||||
i_wcwidth(entry->text[entry->pos-size-w]) == 0) w++;
|
||||
while (entry->pos > size + w && i_wcwidth(entry->text[entry->pos - size - w]) == 0)
|
||||
w++;
|
||||
|
||||
g_memmove(entry->text + entry->pos - size, entry->text + entry->pos,
|
||||
(entry->text_len-entry->pos+1) * sizeof(unichar));
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "gui-printtext.h"
|
||||
#include "gui-windows.h"
|
||||
|
||||
/* Terminal indexed colour map */
|
||||
int mirc_colors[] = { 15, 0, 1, 2, 12, 4, 5, 6, 14, 10, 3, 11, 9, 13, 8, 7,
|
||||
/* 16-27 */ 52, 94, 100, 58, 22, 29, 23, 24, 17, 54, 53, 89,
|
||||
/* 28-39 */ 88, 130, 142, 64, 28, 35, 30, 25, 18, 91, 90, 125,
|
||||
@ -38,6 +39,17 @@ int mirc_colors[] = { 15, 0, 1, 2, 12, 4, 5, 6, 14, 10, 3, 11, 9, 13, 8, 7,
|
||||
/* 64-75 */ 203, 215, 227, 191, 83, 122, 87, 111, 63, 177, 207, 205,
|
||||
/* 76-87 */ 217, 223, 229, 193, 157, 158, 159, 153, 147, 183, 219, 212,
|
||||
/* 88-98 */ 16, 233, 235, 237, 239, 241, 244, 247, 250, 254, 231, -1 };
|
||||
|
||||
/* RGB colour map */
|
||||
int mirc_colors24[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
/* 16-27 */ 0x470000, 0x472100, 0x474700, 0x324700, 0x004700, 0x00472c, 0x004747, 0x002747, 0x000047, 0x2e0047, 0x470047, 0x47002a,
|
||||
/* 28-39 */ 0x740000, 0x743a00, 0x747400, 0x517400, 0x007400, 0x007449, 0x007474, 0x004074, 0x000074, 0x4b0074, 0x740074, 0x740045,
|
||||
/* 40-51 */ 0xb50000, 0xb56300, 0xb5b500, 0x7db500, 0x00b500, 0x00b571, 0x00b5b5, 0x0063b5, 0x0000b5, 0x7500b5, 0xb500b5, 0xb5006b,
|
||||
/* 52-63 */ 0xff0000, 0xff8c00, 0xffff00, 0xb2ff00, 0x00ff00, 0x00ffa0, 0x00ffff, 0x008cff, 0x0000ff, 0xa500ff, 0xff00ff, 0xff0098,
|
||||
/* 64-75 */ 0xff5959, 0xffb459, 0xffff71, 0xcfff60, 0x6fff6f, 0x65ffc9, 0x6dffff, 0x59b4ff, 0x5959ff, 0xc459ff, 0xff66ff, 0xff59bc,
|
||||
/* 76-87 */ 0xff9c9c, 0xffd39c, 0xffff9c, 0xe2ff9c, 0x9cff9c, 0x9cffdb, 0x9cffff, 0x9cd3ff, 0x9c9cff, 0xdc9cff, 0xff9cff, 0xff94d3,
|
||||
/* 88-98 */ 0x000000, 0x131313, 0x282828, 0x363636, 0x4d4d4d, 0x656565, 0x818181, 0x9f9f9f, 0xbcbcbc, 0xe2e2e2, 0xffffff, -1 };
|
||||
|
||||
static int scrollback_lines, scrollback_time, scrollback_burst_remove;
|
||||
|
||||
static int next_xpos, next_ypos;
|
||||
@ -202,28 +214,42 @@ static void remove_old_lines(TEXT_BUFFER_VIEW_REC *view)
|
||||
}
|
||||
}
|
||||
|
||||
static void get_colors(int flags, int *fg, int *bg, int *attr)
|
||||
static void get_colors(int *flags, int *fg, int *bg, int *attr)
|
||||
{
|
||||
*attr = 0;
|
||||
if (flags & GUI_PRINT_FLAG_MIRC_COLOR) {
|
||||
if (*flags & GUI_PRINT_FLAG_MIRC_COLOR) {
|
||||
/* mirc colors - extended colours proposal */
|
||||
if (*bg >= 0) {
|
||||
*bg = mirc_colors[*bg % 100];
|
||||
flags &= ~GUI_PRINT_FLAG_COLOR_24_BG;
|
||||
/* ignore mirc color 99 = -1 (reset) */
|
||||
if (*bg != -1 && settings_get_bool("mirc_blink_fix")) {
|
||||
if (*bg < 16) /* ansi bit flip :-( */
|
||||
*bg = (*bg&8) | (*bg&4)>>2 | (*bg&2) | (*bg&1)<<2;
|
||||
*bg = term_color256map[*bg&0xff] & 7;
|
||||
gboolean use_24_map = FALSE;
|
||||
#ifdef TERM_TRUECOLOR
|
||||
use_24_map = settings_get_bool("colors_ansi_24bit");
|
||||
#endif
|
||||
if (*bg >= 0) {
|
||||
if (use_24_map && mirc_colors24[*bg % 100] != -1) {
|
||||
*bg = mirc_colors24[*bg % 100];
|
||||
*flags |= GUI_PRINT_FLAG_COLOR_24_BG;
|
||||
} else {
|
||||
*bg = mirc_colors[*bg % 100];
|
||||
*flags &= ~GUI_PRINT_FLAG_COLOR_24_BG;
|
||||
/* ignore mirc color 99 = -1 (reset) */
|
||||
if (*bg != -1 && settings_get_bool("mirc_blink_fix")) {
|
||||
if (*bg < 16) /* ansi bit flip :-( */
|
||||
*bg = (*bg&8) | (*bg&4)>>2 | (*bg&2) | (*bg&1)<<2;
|
||||
*bg = term_color256map[*bg&0xff] & 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*fg >= 0) {
|
||||
*fg = mirc_colors[*fg % 100];
|
||||
flags &= ~GUI_PRINT_FLAG_COLOR_24_FG;
|
||||
if (use_24_map && mirc_colors24[*fg % 100] != -1) {
|
||||
*fg = mirc_colors24[*fg % 100];
|
||||
*flags |= GUI_PRINT_FLAG_COLOR_24_FG;
|
||||
} else {
|
||||
*fg = mirc_colors[*fg % 100];
|
||||
*flags &= ~GUI_PRINT_FLAG_COLOR_24_FG;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & GUI_PRINT_FLAG_COLOR_24_FG)
|
||||
if (*flags & GUI_PRINT_FLAG_COLOR_24_FG)
|
||||
*attr |= ATTR_FGCOLOR24;
|
||||
else if (*fg < 0 || *fg > 255) {
|
||||
*fg = -1;
|
||||
@ -232,7 +258,7 @@ static void get_colors(int flags, int *fg, int *bg, int *attr)
|
||||
else
|
||||
*attr |= *fg;
|
||||
|
||||
if (flags & GUI_PRINT_FLAG_COLOR_24_BG)
|
||||
if (*flags & GUI_PRINT_FLAG_COLOR_24_BG)
|
||||
*attr |= ATTR_BGCOLOR24;
|
||||
else if (*bg < 0 || *bg > 255) {
|
||||
*bg = -1;
|
||||
@ -241,11 +267,11 @@ static void get_colors(int flags, int *fg, int *bg, int *attr)
|
||||
else
|
||||
*attr |= (*bg << BG_SHIFT);
|
||||
|
||||
if (flags & GUI_PRINT_FLAG_REVERSE) *attr |= ATTR_REVERSE;
|
||||
if (flags & GUI_PRINT_FLAG_ITALIC) *attr |= ATTR_ITALIC;
|
||||
if (flags & GUI_PRINT_FLAG_BOLD) *attr |= ATTR_BOLD;
|
||||
if (flags & GUI_PRINT_FLAG_UNDERLINE) *attr |= ATTR_UNDERLINE;
|
||||
if (flags & GUI_PRINT_FLAG_BLINK) *attr |= ATTR_BLINK;
|
||||
if (*flags & GUI_PRINT_FLAG_REVERSE) *attr |= ATTR_REVERSE;
|
||||
if (*flags & GUI_PRINT_FLAG_ITALIC) *attr |= ATTR_ITALIC;
|
||||
if (*flags & GUI_PRINT_FLAG_BOLD) *attr |= ATTR_BOLD;
|
||||
if (*flags & GUI_PRINT_FLAG_UNDERLINE) *attr |= ATTR_UNDERLINE;
|
||||
if (*flags & GUI_PRINT_FLAG_BLINK) *attr |= ATTR_BLINK;
|
||||
}
|
||||
|
||||
static void view_add_eol(TEXT_BUFFER_VIEW_REC *view, LINE_REC **line)
|
||||
@ -286,7 +312,7 @@ static void sig_gui_print_text(WINDOW_REC *window, void *fgcolor,
|
||||
flags = GPOINTER_TO_INT(pflags);
|
||||
fg = GPOINTER_TO_INT(fgcolor);
|
||||
bg = GPOINTER_TO_INT(bgcolor);
|
||||
get_colors(flags, &fg, &bg, &attr);
|
||||
get_colors(&flags, &fg, &bg, &attr);
|
||||
|
||||
if (window == NULL) {
|
||||
print_text_no_window(flags, fg, bg, attr, str);
|
||||
|
@ -829,7 +829,7 @@ void mainwindows_resize(int width, int height)
|
||||
}
|
||||
|
||||
/* if we lost our active mainwin, get a new one */
|
||||
if (active_mainwin == NULL && !quitting) {
|
||||
if (active_mainwin == NULL && active_win != NULL && !quitting) {
|
||||
active_mainwin = WINDOW_MAIN(active_win);
|
||||
window_set_active(active_mainwin->active);
|
||||
}
|
||||
|
@ -672,7 +672,11 @@ void term_stop(void)
|
||||
|
||||
static int input_utf8(const unsigned char *buffer, int size, unichar *result)
|
||||
{
|
||||
unichar c = g_utf8_get_char_validated((char *)buffer, size);
|
||||
unichar c = g_utf8_get_char_validated((char *) buffer, size);
|
||||
|
||||
/* GLib >= 2.63 do not accept Unicode NUL anymore */
|
||||
if (c == (unichar) -2 && *buffer == 0 && size > 0)
|
||||
c = 0;
|
||||
|
||||
switch (c) {
|
||||
case (unichar)-1:
|
||||
|
@ -12,6 +12,9 @@ inline static int term_putchar(int c)
|
||||
return fputc(c, current_term->out);
|
||||
}
|
||||
|
||||
#ifdef HAVE_TERM_H
|
||||
#include <term.h>
|
||||
#else
|
||||
/* Don't bother including curses.h because of these -
|
||||
they might not even be defined there */
|
||||
char *tparm();
|
||||
@ -21,6 +24,8 @@ int setupterm();
|
||||
char *tigetstr();
|
||||
int tigetnum();
|
||||
int tigetflag();
|
||||
#endif
|
||||
|
||||
#define term_getstr(x, buffer) tigetstr(x.ti_name)
|
||||
#define term_getnum(x) tigetnum(x.ti_name);
|
||||
#define term_getflag(x) tigetflag(x.ti_name);
|
||||
|
@ -1204,14 +1204,14 @@ static void view_remove_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
|
||||
LINE_REC *prevline;
|
||||
|
||||
prevline = view->buffer->first_line == line ? NULL :
|
||||
textbuffer_line_last(view->buffer);
|
||||
textbuffer_line_last(view->buffer)->prev;
|
||||
view->cache->last_linecount = prevline == NULL ? 0 :
|
||||
view_get_linecount(view, prevline);
|
||||
}
|
||||
|
||||
/* first line in the buffer - this is the most commonly
|
||||
removed line.. */
|
||||
if (view->buffer->first_line == line) {
|
||||
/* first line in the buffer - this is the most commonly
|
||||
removed line.. */
|
||||
if (view->bottom_startline == line) {
|
||||
/* very small scrollback.. */
|
||||
view->bottom_startline = view->bottom_startline->next;
|
||||
@ -1288,6 +1288,11 @@ void textbuffer_view_remove_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
|
||||
}
|
||||
|
||||
textbuffer_remove(view->buffer, line);
|
||||
if (view->bottom_startline == NULL) {
|
||||
/* We may have removed the bottom_startline, make sure
|
||||
that scroll doesn't get stuck */
|
||||
textbuffer_view_init_bottom(view);
|
||||
}
|
||||
}
|
||||
|
||||
void textbuffer_view_remove_lines_by_level(TEXT_BUFFER_VIEW_REC *view, int level)
|
||||
|
@ -450,8 +450,9 @@ void textbuffer_line2text(LINE_REC *line, int coloring, GString *str)
|
||||
g_return_if_fail(line != NULL);
|
||||
g_return_if_fail(str != NULL);
|
||||
|
||||
g_string_truncate(str, 0);
|
||||
g_string_truncate(str, 0);
|
||||
|
||||
g_return_if_fail(line->text != NULL);
|
||||
for (ptr = line->text;;) {
|
||||
if (*ptr != 0) {
|
||||
g_string_append_c(str, (char) *ptr);
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libirc_core.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
||||
|
@ -131,6 +131,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
/* Malformed request, terminate the negotiation */
|
||||
else {
|
||||
irc_cap_finish_negotiation(server);
|
||||
g_free(params);
|
||||
g_warn_if_reached();
|
||||
return;
|
||||
}
|
||||
@ -169,7 +170,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
* duplicated values, let's just warn the user */
|
||||
g_warning("The server sent the %s capability twice", key);
|
||||
}
|
||||
g_hash_table_insert(server->cap_supported, key, val);
|
||||
g_hash_table_replace(server->cap_supported, key, val);
|
||||
}
|
||||
|
||||
/* A multiline response is always terminated by a normal one,
|
||||
@ -220,7 +221,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
|
||||
if (disable)
|
||||
server->cap_active = gslist_delete_string(server->cap_active, caps[i] + 1, g_free);
|
||||
else
|
||||
else if (!gslist_find_string(server->cap_active, caps[i]))
|
||||
server->cap_active = g_slist_prepend(server->cap_active, g_strdup(caps[i]));
|
||||
|
||||
if (!strcmp(caps[i], "sasl"))
|
||||
@ -252,7 +253,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
|
||||
continue;
|
||||
}
|
||||
|
||||
g_hash_table_insert(server->cap_supported, key, val);
|
||||
g_hash_table_replace(server->cap_supported, key, val);
|
||||
cap_emit_signal(server, "new", key);
|
||||
}
|
||||
}
|
||||
|
@ -75,6 +75,8 @@ static void destroy_server_connect(SERVER_CONNECT_REC *conn)
|
||||
|
||||
g_free_not_null(ircconn->usermode);
|
||||
g_free_not_null(ircconn->alternate_nick);
|
||||
g_free_not_null(ircconn->sasl_username);
|
||||
g_free_not_null(ircconn->sasl_password);
|
||||
}
|
||||
|
||||
void irc_core_init(void)
|
||||
|
@ -49,8 +49,8 @@ static void sig_server_connect_copy(SERVER_CONNECT_REC **dest,
|
||||
rec->usermode = g_strdup(src->usermode);
|
||||
rec->alternate_nick = g_strdup(src->alternate_nick);
|
||||
rec->sasl_mechanism = src->sasl_mechanism;
|
||||
rec->sasl_username = src->sasl_username;
|
||||
rec->sasl_password = src->sasl_password;
|
||||
rec->sasl_username = g_strdup(src->sasl_username);
|
||||
rec->sasl_password = g_strdup(src->sasl_password);
|
||||
*dest = (SERVER_CONNECT_REC *) rec;
|
||||
}
|
||||
|
||||
|
@ -101,8 +101,8 @@ static void sig_server_setup_fill_chatnet(IRC_SERVER_CONNECT_REC *conn,
|
||||
conn->sasl_mechanism = SASL_MECHANISM_PLAIN;
|
||||
if (ircnet->sasl_username != NULL && *ircnet->sasl_username &&
|
||||
ircnet->sasl_password != NULL && *ircnet->sasl_password) {
|
||||
conn->sasl_username = ircnet->sasl_username;
|
||||
conn->sasl_password = ircnet->sasl_password;
|
||||
conn->sasl_username = g_strdup(ircnet->sasl_username);
|
||||
conn->sasl_password = g_strdup(ircnet->sasl_password);
|
||||
} else
|
||||
g_warning("The fields sasl_username and sasl_password are either missing or empty");
|
||||
}
|
||||
|
@ -451,7 +451,11 @@ static void sig_destroyed(IRC_SERVER_REC *server)
|
||||
gslist_free_full(server->cap_queue, (GDestroyNotify) g_free);
|
||||
server->cap_queue = NULL;
|
||||
|
||||
g_free_and_null(server->sasl_buffer);
|
||||
/* was g_free_and_null, but can't use on a GString */
|
||||
if (server->sasl_buffer != NULL) {
|
||||
g_string_free(server->sasl_buffer, TRUE);
|
||||
server->sasl_buffer = NULL;
|
||||
}
|
||||
|
||||
/* these are dynamically allocated only if isupport was sent */
|
||||
g_hash_table_foreach(server->isupport,
|
||||
|
@ -66,6 +66,11 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
|
||||
|
||||
/* add user to nicklist */
|
||||
nickrec = irc_nicklist_insert(chanrec, nick, FALSE, FALSE, FALSE, TRUE, NULL);
|
||||
if (nickrec == NULL) {
|
||||
/* invalid nick? */
|
||||
return;
|
||||
}
|
||||
|
||||
nicklist_set_host(CHANNEL(chanrec), nickrec, address);
|
||||
|
||||
if (chanrec->massjoins == 0) {
|
||||
|
@ -158,6 +158,7 @@ static gboolean sasl_reassemble_incoming(IRC_SERVER_REC *server, const char *fra
|
||||
* Fail authentication with this server. They have sent too much data.
|
||||
*/
|
||||
if (enc_req->len > AUTHENTICATE_MAX_SIZE) {
|
||||
g_string_free(enc_req, TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libirc_dcc.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -178,6 +178,7 @@ static void sig_dccget_receive(GET_DCC_REC *dcc)
|
||||
return;
|
||||
}
|
||||
dcc->transfd += ret;
|
||||
break;
|
||||
}
|
||||
|
||||
/* send number of total bytes received */
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libirc_flood.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libirc_notifylist.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -2,6 +2,7 @@ moduledir = $(libdir)/irssi/modules
|
||||
module_LTLIBRARIES = libirc_proxy.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -1,6 +1,7 @@
|
||||
noinst_LIBRARIES = libirssi_config.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
|
@ -315,6 +315,15 @@ int config_write(CONFIG_REC *rec, const char *fname, int create_mode)
|
||||
/* expand all symlinks; else we may replace a symlink with a regular file */
|
||||
dest_name = realpath(base_name, NULL);
|
||||
|
||||
if (errno == EINVAL) {
|
||||
/* variable path length not supported by glibc < 2.3, Solaris < 11 */
|
||||
char resolved_path[PATH_MAX] = { 0 };
|
||||
errno = 0;
|
||||
if ((dest_name = realpath(base_name, resolved_path)) != NULL) {
|
||||
dest_name = g_strdup(dest_name);
|
||||
}
|
||||
}
|
||||
|
||||
if (dest_name == NULL) {
|
||||
if (errno == ENOENT) {
|
||||
dest_name = g_strdup(base_name);
|
||||
|
@ -8,6 +8,7 @@ EXTRA_LTLIBRARIES = \
|
||||
libotr_core_static.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core/ \
|
||||
-I$(top_srcdir)/src/irc/core/ \
|
||||
|
@ -15,6 +15,8 @@ perl-core.lo: irssi-core.pl.h
|
||||
perl-signals.lo: perl-signals-list.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
-I$(top_srcdir)/src/fe-common/core \
|
||||
|
@ -3,6 +3,7 @@ include $(top_srcdir)/utils/glib-tap.mk
|
||||
PACKAGE_STRING=fe-common/core
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
$(GLIB_CFLAGS)
|
||||
|
@ -3,6 +3,7 @@ include $(top_srcdir)/utils/glib-tap.mk
|
||||
PACKAGE_STRING=fe-text
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
-I$(top_srcdir)/src/fe-common/core \
|
||||
|
@ -54,7 +54,12 @@ static void test_paste_join_multiline(const paste_join_multiline_test_case *test
|
||||
g_test_message("INPUT: \"%s\"", (t1 = g_strescape(test->input, NULL)));
|
||||
g_free(t1);
|
||||
|
||||
buffer->data = (char *) g_utf8_to_ucs4_fast(test->input, -1, (glong *) &buffer->len);
|
||||
{
|
||||
glong buf_len;
|
||||
buffer->data = (char *) g_utf8_to_ucs4_fast(test->input, -1, &buf_len);
|
||||
buffer->len = buf_len;
|
||||
}
|
||||
|
||||
paste_buffer_join_lines(buffer);
|
||||
resultstr = g_ucs4_to_utf8((unichar *) buffer->data, buffer->len, NULL, NULL, NULL);
|
||||
|
||||
|
@ -3,6 +3,7 @@ include $(top_srcdir)/utils/glib-tap.mk
|
||||
PACKAGE_STRING=irc/core
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
||||
|
@ -3,6 +3,7 @@ include $(top_srcdir)/utils/glib-tap.mk
|
||||
PACKAGE_STRING=irc/flood
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
||||
|
@ -251,6 +251,7 @@ abstracts = {
|
||||
# default background for all statusbars. You can also give
|
||||
# the default foreground color for statusbar items.
|
||||
sb_background = "%8";
|
||||
window_border = "%8";
|
||||
|
||||
# default backround for "default" statusbar group
|
||||
#sb_default_bg = "%8";
|
||||
|
Loading…
x
Reference in New Issue
Block a user