cdidier / irssi-xmpp

irssi-xmpp is an irssi plugin to connect to the Jabber network.
GNU General Public License v2.0
69 stars 22 forks source link

irssi 1.4.1 #56

Open namtsui opened 2 years ago

namtsui commented 2 years ago

irssi 1.4.1 on openbsd with git head irssi-xmpp fails to connect. I am able to use prosody to connect. Has the irssi-xmpp plugin been tested against irssi 1.4.1? I see NEWS mentions irssi 1.0.0 support.

irssi output:

00:15] -!- Irssi: Loaded module xmpp/core
[00:15] -!- Irssi: Loaded module xmpp/text
[00:15] -!- Irssi: Loaded module xmpp/fe
[00:15] -!- Irssi: Looking up muc.nixnet.services
[00:15] -!- Irssi: Connecting to muc.nixnet.services [192.168.1.5] port 5222
[00:15] -!- Irssi: Using STARTTLS encryption. 
[00:15] -!- Irssi: (default) warning SSL_connect(): 0 / SSL_ERROR_SYSCALL

Here are two patches that I needed.

`/load xmpp' prints libfe_xmpp.so: undefined symbol glist_find_string
irssi changed glist_find_string to i_list_find_string

see:
https://github.com/irssi/irssi/commit/c108cae02fd73d3c9d8338a7191bbebcbcf550e1

Index: src/fe-common/xmpp-completion.c
--- src/fe-common/xmpp-completion.c.orig
+++ src/fe-common/xmpp-completion.c
@@ -287,7 +287,7 @@ get_channels(XMPP_SERVER_REC *server, const char *word
            chat_type, XMPP_PROTOCOL_NAME)
            || *channel_setup->name != '#')
            && g_ascii_strncasecmp(channel_setup->name, word, len) == 0
-           && glist_find_string(list, channel_setup->name) == NULL)
+           && i_list_find_string(list, channel_setup->name) == NULL)
            list = g_list_append(list,
                g_strdup(channel_setup->name));
    }
lag_sent has changed type from GTimeVal to gint64

see:
https://github.com/irssi/irssi/commit/1cdb4bc311ba0c568c68ae26348bbb1eee273580#diff-a86f89f9b2da09af40dcaba5544aa58496ab242dd558be3e31e2fa43cbbb6ff9

Index: src/core/xep/ping.c
--- src/core/xep/ping.c.orig
+++ src/core/xep/ping.c
@@ -166,10 +166,10 @@ check_ping_func(void)
    now = time(NULL);
    for (tmp = supported_servers; tmp != NULL; tmp = tmp->next) {
        server = XMPP_SERVER(tmp->data);
-       if (server->lag_sent.tv_sec != 0) {
+       if (server->lag_sent != 0) {
            /* waiting for lag reply */
            if (max_lag > 1 &&
-               (now - server->lag_sent.tv_sec) > max_lag) {
+               (now - server->lag_sent) > max_lag) {
                /* too much lag - disconnect */
                signal_emit("server lag disconnect", 1,
                    server);
namtsui commented 2 years ago

I see patches are similar to https://github.com/cdidier/irssi-xmpp/pull/53