Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irssi 1.4.1 #56

Open
namtsui opened this issue Jun 15, 2022 · 1 comment
Open

irssi 1.4.1 #56

namtsui opened this issue Jun 15, 2022 · 1 comment

Comments

@namtsui
Copy link

namtsui commented Jun 15, 2022

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
Copy link
Author

namtsui commented Jun 15, 2022

I see patches are similar to #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant