Compare commits

...

40 Commits

Author SHA1 Message Date
Ailin Nemui
91dc3e4dfa tag as 1.2.3 2021-04-09 18:33:35 +02:00
ailin-nemui
843c3968c7 Merge pull request #1021 from ailin-nemui/fix-1019
fix the compilation of utf8proc code if desired

(cherry picked from commit 26d96a7bb2e89a84b6d866eaeb312dcd8dbdaede)
2021-04-09 00:05:40 +02:00
ailin-nemui
b114201b7b Merge pull request #1076 from l2dy/gfree
Free g_strdup() allocated memory with g_free()

(cherry picked from commit 7e767e144409f8f86172740c8d0e2a66a6a4a286)
2021-04-08 23:58:03 +02:00
ailin-nemui
e8457188ce Merge pull request #1120 from ailin-nemui/invalid-cap-free
free params

(cherry picked from commit 8a1a96c12c3f99275522640600bd53dcf66c8f68)
2021-04-08 23:49:19 +02:00
ailin-nemui
18e97d9e8b Merge pull request #1130 from ailin-nemui/string-free
Only call g_string_free if there is a string

(cherry picked from commit 49c6c2b69f5c7bc579153456d1eecdf03eef715e)
2021-04-08 23:49:04 +02:00
ailin-nemui
aae1e3392a Merge pull request #1154 from ailin-nemui/zerowidth
refine zero width input test in empty line

(cherry picked from commit b38ae68fb544612c8899d1e1196b434f7e7ba70b)
2021-04-08 23:40:51 +02:00
ailin-nemui
d3bb5d7015 Merge pull request #1156 from vague666/add_server_nopass
Improve help for how to remove saved server password

(cherry picked from commit f0c1bc4dde6b89f4c89a843c2a0e08b871023891)
2021-04-08 23:38:50 +02:00
ailin-nemui
e814df5422 Merge pull request #1167 from ailin-nemui/quit-crash
fix crash on /quit when unloading modules

(cherry picked from commit 8b7bf1f04eefea51fdeb9d151ef0be2c5956c0ea)
2021-04-08 23:35:45 +02:00
ailin-nemui
33c7416390 Merge pull request #1197 from lotheac/master
use visible channel name in layout save

(cherry picked from commit 99b941db8e7af78c40901fd554e78682f7edc099)
2021-04-08 23:32:59 +02:00
ailin-nemui
fc93d11bf6 Merge pull request #1211 from ailin-nemui/disco_lastmsg
fix crash when server got disconnected/reconnected before it was properly connected

(cherry picked from commit cd10745711e4fa3bff965a6eecadfe1526850c6e)
2021-04-08 23:30:27 +02:00
ailin-nemui
c165f38ca5 Merge pull request #1249 from ailin-nemui/dup-caps
fix multiple identical active caps

(cherry picked from commit 0ae27530d6d2ff3e575fbb07f34b64d7141a8f05)
2021-04-08 23:26:13 +02:00
ailin-nemui
6d352cfd79 Merge pull request #1255 from irssi/vague666-patch-1
Update ignore.in examples

(cherry picked from commit cd8a0cb701efa7ccb273b8efa3df37d74e4a00ea)
2021-04-08 23:23:55 +02:00
ailin-nemui
4f88386511 Merge pull request #1269 from ihsinme/patch-1
fix invalid unsigned arithmetic.

(cherry picked from commit 0dd60755f0428cbc8042a421dfdd4c6ea5c392cf)
2021-04-08 23:22:39 +02:00
ailin-nemui
80a338fe10 Merge pull request #1270 from ihsinme/ihsinme-patch-238
correction of incorrect sequence of checks.

(cherry picked from commit 33b4154b0cb476725c84955c340b0f61af513386)
2021-04-08 23:20:52 +02:00
ailin-nemui
93c5705078 Merge pull request #1271 from irssi/vague666-fix-159
Update dcc-get.c

(cherry picked from commit 672f12754434ea7195e257c5848a716fee717c75)
2021-04-08 23:18:34 +02:00
ailin-nemui
b00b17a485 Merge pull request #1291 from ailin-nemui/nobool
remove unused bool include

(cherry picked from commit cdb30695f997754c48a97d8c5196aa7d959a46dd)
2021-04-08 23:13:50 +02:00
ailin-nemui
ef4bad3600 Merge pull request #1292 from ailin-nemui/nonick
don't bother if we don't have a nick

(cherry picked from commit e0b98e1fa57a2f9faf6616af404f630e8c7527e6)
2021-04-08 23:12:22 +02:00
ailin-nemui
d05e65b2f9 Merge pull request #1293 from ihsinme/patch-1
fix memory leak.

(cherry picked from commit 628ca79e6afc7008fd615598cc6797537f2bf065)
2021-04-08 23:06:33 +02:00
ailin-nemui
aa7dfea534
Merge pull request #1299 from ailin-nemui/null-text-save
fail on empty text
2021-04-08 17:27:46 +02:00
ailin-nemui
11905badcb Merge pull request #1290 from mistydemeo/check_for_term_h
Add a check for term.h

(cherry picked from commit a7315250128ad93ac03ceed4b8ee91833f3f3d3e)
2021-04-08 16:42:47 +02:00
ailin-nemui
ef124d7378 Merge pull request #1268 from ailin-nemui/nostdinc
configure automake with nostdinc

(cherry picked from commit 95f131da2d741f4ad13c2c045253dc2b80b03f40)
2021-04-08 16:24:52 +02:00
ailin-nemui
c72ff03d9c Merge pull request #1298 from ailin-nemui/connect-crashes
fix crash on /connect -tls

(cherry picked from commit 9b02424f3030362572dfa6acfd8b1ef1ea54cc8a)
2021-04-08 16:12:45 +02:00
ailin-nemui
6ad105487e Merge pull request #1221 from nachanon/bug1220
Decolor the vertical window split bar in stock `colorless` theme

(cherry picked from commit 561619f23ca2db21616d13f2291f3d46d649987c)
2021-04-08 16:05:39 +02:00
ailin-nemui
ec0b17305a Merge pull request #1214 from irssi/vague666-update-help-1
Update ignore help

(cherry picked from commit 300cd14a705872df3245cb5235c3d7a84e178b7d)
2021-04-08 16:04:23 +02:00
ailin-nemui
b47bc61866 Merge pull request #1213 from irssi/vague666-update-help
Update help with HIDDEN level

(cherry picked from commit dfba73225d1c29c6f6d3c438dfe996d67302d7fe)
2021-04-08 16:04:00 +02:00
ailin-nemui
41c3ec7445 Merge pull request #1183 from ailin-nemui/glib-2-63
manually handle NUL unicode in g_utf8_get_next_char_validated

(cherry picked from commit 76802985a4d99105374a64cea5f973298ed89ca5)
2021-04-08 16:03:01 +02:00
ailin-nemui
07472fc569 Merge pull request #1136 from ailin-nemui/lines
Make sure the bottom_startline is not lost when removing lines

(cherry picked from commit bf3565a720c0dd2519eb5549508b463b927d7d6f)
2021-04-08 16:00:20 +02:00
ailin-nemui
da12a0361b Merge pull request #1134 from horgh/horgh/tls-reconnect
Use correct TLS settings when reconnecting

(cherry picked from commit 156d02c5cff459bf2210992bee73127ff84292e1)
2021-04-08 15:58:41 +02:00
ailin-nemui
4b5e0de15b Merge pull request #1059 from ailin-nemui/mirc-24
Use the 24bit mIRC colour mappings if colors_ansi_24bit is enabled

(cherry picked from commit d34bd858d068ae5da99fc7caa03b64350646ae87)
2021-04-08 15:54:05 +02:00
Ailin Nemui
dee0554731 fail on empty text
reported by @dwfreed
2021-04-07 12:21:13 +02:00
ailin-nemui
42110b92e9 tag as 1.2.2 2019-08-29 02:25:21 +02:00
ailin-nemui
15867d62e7 Merge pull request #1114 from ailin-nemui/startup-crash
fix crash on startup when resizing before active_win

(cherry picked from commit 570d6714ec3f9a55940eaf953dc7914c2534c3e2)
2019-08-29 02:19:41 +02:00
ailin-nemui
5b923493de fix use after free receiving caps
fixes GL#34

(cherry picked from commit 5a4e7ab659aba2855895c9f43e9a7a131f4e89b3)
2019-08-29 02:19:14 +02:00
Ailin Nemui
248a1591a2 tag as 1.2.1 2019-06-28 13:52:47 +02:00
ailin-nemui
27c02a2d96 Merge pull request #1058 from ailin-nemui/sasl-reconnect
copy sasl username and password values

(cherry picked from commit d23b0d22cc611e43c88d99192a59f413f951a955)
2019-06-28 13:48:28 +02:00
ailin-nemui
bb7e81438d Merge pull request #1013 from ailin-nemui/fix-1012
do not stop autolog_ignore_targets from matching itemless targets

(cherry picked from commit df532d4461fa0e1aba8672fa6d56e3056ce52272)
2019-06-28 13:42:49 +02:00
ailin-nemui
fddcbe56c9 Merge pull request #1057 from ailin-nemui/entry-8bit
restore 8bit support in input entry

(cherry picked from commit 8551dd99cc6ad29b1b356acc4f4c92209ed98eed)
2019-06-28 11:53:32 +02:00
ailin-nemui
309ea88252 Merge pull request #1043 from ailin-nemui/solaris10
fix realpath on old solaris

(cherry picked from commit 7654f30d04f2b4fae7b49f8b1579bdf77dfca900)
2019-06-28 11:51:54 +02:00
ailin-nemui
24547829e7 Merge pull request #1019 from ailin-nemui/configure-utf8proc
make utf8proc configurable

(cherry picked from commit 6242d25055520a0abcdd95cbf969479c99d36700)
2019-06-28 11:48:34 +02:00
ailin-nemui
bb600a6575 Merge pull request #1014 from ailin-nemui/fix-be64
fix test on Big Endian 64bit, due to pointer size mismatch

(cherry picked from commit 01ce66c684b66860b9c0dae04912d7cf3ebb9aeb)
2019-06-28 11:46:13 +02:00
56 changed files with 316 additions and 111 deletions

65
NEWS
View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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";

View File

@ -1,6 +1,7 @@
noinst_LIBRARIES = libcore.a
AM_CPPFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/core \
$(GLIB_CFLAGS) \

View File

@ -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)

View File

@ -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;

View File

@ -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;
}

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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"\" \

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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/ \

View File

@ -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/ \

View File

@ -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/ \

View File

@ -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/ \

View File

@ -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/ \

View File

@ -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/ \

View File

@ -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/ \

View File

@ -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/ \

View File

@ -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));

View File

@ -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);

View File

@ -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);
}

View File

@ -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:

View File

@ -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);

View File

@ -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)

View File

@ -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);

View File

@ -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)"\" \

View File

@ -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);
}
}

View File

@ -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)

View File

@ -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;
}

View File

@ -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");
}

View File

@ -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,

View File

@ -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) {

View File

@ -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;
}

View File

@ -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/ \

View File

@ -178,6 +178,7 @@ static void sig_dccget_receive(GET_DCC_REC *dcc)
return;
}
dcc->transfd += ret;
break;
}
/* send number of total bytes received */

View File

@ -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/ \

View File

@ -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/ \

View File

@ -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/ \

View File

@ -1,6 +1,7 @@
noinst_LIBRARIES = libirssi_config.a
AM_CPPFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir)/src \
$(GLIB_CFLAGS)

View File

@ -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);

View File

@ -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/ \

View File

@ -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 \

View File

@ -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)

View File

@ -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 \

View File

@ -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);

View File

@ -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)"\" \

View File

@ -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)"\" \

View File

@ -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";