- https://github.com/cdidier/irssi-xmpp/pull/51
- https://github.com/cdidier/irssi-xmpp/pull/55
- https://github.com/cdidier/irssi-xmpp/commit/c7728ea5aa2f4e584159b3d12ad815294c44ca6a.patch (from https://github.com/cdidier/irssi-xmpp/pull/53)

From f84cca86f6cbfa34690a73e0a1cebd73c349810f Mon Sep 17 00:00:00 2001
From: Ailin Nemui <ailin@z30a.localdomain>
Date: Sun, 29 Dec 2019 20:25:49 +0100
Subject: [PATCH] use full paths to irssi includes

this is in parallel to the change irssi/irssi#1040 for irssi 1.3
--- a/src/core/module.h
+++ b/src/core/module.h
@@ -1,5 +1,5 @@
 #define MODULE_NAME "xmpp/core"
 
-#include "irssi-config.h"
-#include "common.h"
+#include <irssi/irssi-config.h>
+#include <irssi/src/common.h>
 #include "xmpp.h"
--- a/src/core/protocol.c
+++ b/src/core/protocol.c
@@ -16,7 +16,7 @@
  */
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "rosters-tools.h"
--- a/src/core/rosters.c
+++ b/src/core/rosters.c
@@ -19,7 +19,7 @@
 #include <string.h>
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "rosters-tools.h"
--- a/src/core/stanzas.c
+++ b/src/core/stanzas.c
@@ -16,8 +16,8 @@
  */
 
 #include "module.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "tools.h"
--- a/src/core/tools.c
+++ b/src/core/tools.c
@@ -18,9 +18,9 @@
 #include <string.h>
 
 #include "module.h"
-#include "recode.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/recode.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #define XMPP_PRIORITY_MIN -128
 #define XMPP_PRIORITY_MAX 127
--- a/src/core/xep/chatstates.c
+++ b/src/core/xep/chatstates.c
@@ -20,7 +20,7 @@
  */
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "disco.h"
--- a/src/core/xep/composing.c
+++ b/src/core/xep/composing.c
@@ -22,7 +22,7 @@
 #include <string.h>
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-queries.h"
--- a/src/core/xep/delay.c
+++ b/src/core/xep/delay.c
@@ -20,7 +20,7 @@
  */
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "tools.h"
--- a/src/core/xep/disco.c
+++ b/src/core/xep/disco.c
@@ -20,7 +20,7 @@
 #include <string.h>
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "tools.h"
--- a/src/core/xep/muc-commands.c
+++ b/src/core/xep/muc-commands.c
@@ -18,9 +18,9 @@
 #include <stdlib.h>
 
 #include "module.h"
-#include "settings.h"
-#include "signals.h"
-#include "window-item-def.h"
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/core/window-item-def.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-commands.h"
--- a/src/core/xep/muc-events.c
+++ b/src/core/xep/muc-events.c
@@ -23,10 +23,10 @@
 #include <string.h>
 
 #include "module.h"
-#include "commands.h"
-#include "misc.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/commands.h>
+#include <irssi/src/core/misc.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #include "rosters-tools.h"
 #include "tools.h"
--- a/src/core/xep/muc-nicklist.c
+++ b/src/core/xep/muc-nicklist.c
@@ -18,7 +18,7 @@
 #include <string.h>
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "rosters.h"
 #include "muc-affiliation.h"
--- a/src/core/xep/muc-nicklist.h
+++ b/src/core/xep/muc-nicklist.h
@@ -1,7 +1,7 @@
 #ifndef __MUC_NICKLIST_H
 #define __MUC_NICKLIST_H
 
-#include "nicklist.h"
+#include <irssi/src/core/nicklist.h>
 #include "muc.h"
 
 /* Returns XMPP_NICK_REC if it's XMPP channel, NULL if it isn't. */
@@ -16,7 +16,7 @@
 
 
 struct _XMPP_NICK_REC {
-	#include "nick-rec.h"
+	#include <irssi/src/core/nick-rec.h>
 
 	int 	 show;
 	char 	*status;
--- a/src/core/xep/muc-reconnect.c
+++ b/src/core/xep/muc-reconnect.c
@@ -16,8 +16,8 @@
  */
 
 #include "module.h"
-#include "servers-reconnect.h"
-#include "signals.h"
+#include <irssi/src/core/servers-reconnect.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "muc.h"
--- a/src/core/xep/muc.c
+++ b/src/core/xep/muc.c
@@ -22,9 +22,9 @@
 #include <string.h>
 
 #include "module.h"
-#include "commands.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/commands.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #include "rosters-tools.h"
 #include "tools.h"
--- a/src/core/xep/muc.h
+++ b/src/core/xep/muc.h
@@ -1,8 +1,8 @@
 #ifndef __MUC_H
 #define __MUC_H
 
-#include "channels.h"
-#include "channels-setup.h"
+#include <irssi/src/core/channels.h>
+#include <irssi/src/core/channels-setup.h>
 #include "xmpp-servers.h"
 #include "tools.h"
 
@@ -34,7 +34,7 @@
 
 #define STRUCT_SERVER_REC XMPP_SERVER_REC
 struct _MUC_REC {
-	#include "channel-rec.h"
+	#include <irssi/src/core/channel-rec.h>
 
 	char	*nick;
 };
--- a/src/core/xep/oob.c
+++ b/src/core/xep/oob.c
@@ -20,7 +20,7 @@
  */
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "tools.h"
--- a/src/core/xep/ping.c
+++ b/src/core/xep/ping.c
@@ -24,9 +24,9 @@
 #include <time.h>
 
 #include "module.h"
-#include "misc.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/misc.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-commands.h"
--- a/src/core/xep/registration.c
+++ b/src/core/xep/registration.c
@@ -23,8 +23,8 @@
 #include <string.h>
 
 #include "module.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 #include "tools.h"
 
 #include "xmpp-servers.h"
--- a/src/core/xep/vcard.c
+++ b/src/core/xep/vcard.c
@@ -16,8 +16,8 @@
  */
 
 #include "module.h"
-#include "queries.h"
-#include "signals.h"
+#include <irssi/src/core/queries.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-commands.h"
--- a/src/core/xep/version.c
+++ b/src/core/xep/version.c
@@ -23,9 +23,9 @@
 #include <string.h>
 
 #include "module.h"
-#include "queries.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/queries.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-commands.h"
--- a/src/core/xmpp-commands.c
+++ b/src/core/xmpp-commands.c
@@ -18,12 +18,12 @@
 #include <stdlib.h>
 
 #include "module.h"
-#include "channels.h"
-#include "nicklist.h"
-#include "recode.h"
-#include "settings.h"
-#include "signals.h"
-#include "window-item-def.h"
+#include <irssi/src/core/channels.h>
+#include <irssi/src/core/nicklist.h>
+#include <irssi/src/core/recode.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/core/window-item-def.h>
 
 #include "xmpp-commands.h"
 #include "xmpp-queries.h"
--- a/src/core/xmpp-commands.h
+++ b/src/core/xmpp-commands.h
@@ -1,7 +1,7 @@
 #ifndef __XMPP_COMMANDS_H
 #define __XMPP_COMMANDS_H
 
-#include "commands.h"
+#include <irssi/src/core/commands.h>
 
 enum {
 	XMPP_COMMAND_AWAY,
--- a/src/core/xmpp-core.c
+++ b/src/core/xmpp-core.c
@@ -16,13 +16,13 @@
  */
 
 #include "module.h"
-#include "signals.h"
-#include "channels.h"
-#include "channels-setup.h"
-#include "chat-protocols.h"
-#include "chatnets.h"
-#include "servers-setup.h"
-#include "settings.h"
+#include <irssi/src/core/signals.h>
+#include <irssi/src/core/channels.h>
+#include <irssi/src/core/channels-setup.h>
+#include <irssi/src/core/chat-protocols.h>
+#include <irssi/src/core/chatnets.h>
+#include <irssi/src/core/servers-setup.h>
+#include <irssi/src/core/settings.h>
 
 #include "xmpp-commands.h"
 #include "xmpp-queries.h"
--- a/src/core/xmpp-queries.c
+++ b/src/core/xmpp-queries.c
@@ -18,9 +18,9 @@
 #include <string.h>
 
 #include "module.h"
-#include "channels.h"
-#include "nicklist.h"
-#include "signals.h"
+#include <irssi/src/core/channels.h>
+#include <irssi/src/core/nicklist.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-queries.h"
 #include "rosters-tools.h"
--- a/src/core/xmpp-queries.h
+++ b/src/core/xmpp-queries.h
@@ -1,7 +1,7 @@
 #ifndef __XMPP_QUERIES_H
 #define __XMPP_QUERIES_H
 
-#include "queries.h"
+#include <irssi/src/core/queries.h>
 #include "xmpp-servers.h"
 
 /* Returns XMPP_QUERY_REC if it's XMPP query, NULL if it isn't. */
@@ -16,7 +16,7 @@
 
 #define STRUCT_SERVER_REC XMPP_SERVER_REC
 struct _XMPP_QUERY_REC {
-	#include "query-rec.h"
+	#include <irssi/src/core/query-rec.h>
 
 	time_t		composing_time;
 	gboolean	composing_visible;
--- a/src/core/xmpp-servers-reconnect.c
+++ b/src/core/xmpp-servers-reconnect.c
@@ -16,7 +16,7 @@
  */
 
 #include "module.h"
-#include "signals.h"
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 
--- a/src/core/xmpp-servers.c
+++ b/src/core/xmpp-servers.c
@@ -22,10 +22,10 @@
 #include <termios.h>
 
 #include "module.h"
-#include "network.h"
-#include "recode.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/network.h>
+#include <irssi/src/core/recode.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "protocol.h"
--- a/src/core/xmpp-servers.h
+++ b/src/core/xmpp-servers.h
@@ -1,8 +1,8 @@
 #ifndef __XMPP_SERVERS_H
 #define __XMPP_SERVERS_H
 
-#include "chat-protocols.h"
-#include "servers.h"
+#include <irssi/src/core/chat-protocols.h>
+#include <irssi/src/core/servers.h>
 
 #include "loudmouth/loudmouth.h"
 #include "loudmouth-tools.h"
@@ -24,7 +24,7 @@
 	(XMPP_SERVER_CONNECT(conn) ? TRUE : FALSE) 
 
 struct _XMPP_SERVER_CONNECT_REC {
-	#include "server-connect-rec.h"
+	#include <irssi/src/core/server-connect-rec.h>
 
 	GSList		*channels_list;
 	int		 show;
@@ -35,7 +35,7 @@ struct _XMPP_SERVER_CONNECT_REC {
 
 #define STRUCT_SERVER_CONNECT_REC XMPP_SERVER_CONNECT_REC
 struct _XMPP_SERVER_REC {
-	#include "server-rec.h"
+	#include <irssi/src/core/server-rec.h>
 
 	char		*jid;
 	char		*user;
--- a/src/core/xmpp-settings.c
+++ b/src/core/xmpp-settings.c
@@ -18,8 +18,8 @@
 #include <string.h>
 
 #include "module.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "rosters.h"
--- a/src/fe-common/fe-rosters.c
+++ b/src/fe-common/fe-rosters.c
@@ -18,11 +18,11 @@
 #include <string.h>
 
 #include "module.h"
-#include "levels.h"
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "printtext.h"
-#include "settings.h"
-#include "signals.h"
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "rosters-tools.h"
--- a/src/fe-common/fe-stanzas.c
+++ b/src/fe-common/fe-stanzas.c
@@ -18,12 +18,12 @@
 #include <string.h>
 
 #include "module.h"
-#include "levels.h"
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "printtext.h"
-#include "settings.h"
-#include "signals.h"
-#include "window-items.h"
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/window-items.h>
 
 #include "xmpp-servers.h"
 
--- a/src/fe-common/fe-xmpp-core.c
+++ b/src/fe-common/fe-xmpp-core.c
@@ -16,14 +16,14 @@
  */
 
 #include "module.h"
-#include "core.h"
-#include "levels.h"
+#include <irssi/src/core/core.h>
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "printtext.h"
-#include "servers-setup.h"
-#include "settings.h"
-#include "signals.h"
-#include "themes.h"
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/servers-setup.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/themes.h>
 
 #include "fe-xmpp-messages.h"
 #include "fe-xmpp-queries.h"
--- a/src/fe-common/fe-xmpp-messages.c
+++ b/src/fe-common/fe-xmpp-messages.c
@@ -18,20 +18,20 @@
 #include <string.h>
 
 #include "module.h"
-#include "channels.h"
-#include "levels.h"
+#include <irssi/src/core/channels.h>
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "nicklist.h"
-#include "printtext.h"
-#include "recode.h"
-#include "settings.h"
-#include "signals.h"
-#include "window-items.h"
-#include "fe-queries.h"
-#include "fe-common/core/module-formats.h"
-#include "fe-common/core/fe-messages.h"
-#include "fe-common/irc/module-formats.h"
-#include "irssi-version.h"
+#include <irssi/src/core/nicklist.h>
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/recode.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/window-items.h>
+#include <irssi/src/fe-common/core/fe-queries.h>
+#include <irssi/src/fe-common/core/module-formats.h>
+#include <irssi/src/fe-common/core/fe-messages.h>
+#include <irssi/src/fe-common/irc/module-formats.h>
+#include <irssi/irssi-version.h>
 
 #include "xmpp-servers.h"
 
--- a/src/fe-common/fe-xmpp-queries.c
+++ b/src/fe-common/fe-xmpp-queries.c
@@ -16,11 +16,11 @@
  */		 
 
 #include "module.h"
-#include "levels.h"
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "printtext.h"
-#include "signals.h"
-#include "window-items.h"
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/window-items.h>
 
 #include "xmpp-queries.h"
 #include "rosters-tools.h"
--- a/src/fe-common/fe-xmpp-status.c
+++ b/src/fe-common/fe-xmpp-status.c
@@ -18,12 +18,12 @@
 #include <string.h>
 
 #include "module.h"
-#include "levels.h"
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "printtext.h"
-#include "settings.h"
-#include "signals.h"
-#include "window-items.h"
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/window-items.h>
 
 #include "xmpp-servers.h"
 #include "rosters-tools.h"
--- a/src/fe-common/fe-xmpp-windows.c
+++ b/src/fe-common/fe-xmpp-windows.c
@@ -16,9 +16,9 @@
  */		 
 
 #include "module.h"
-#include "channels.h"
-#include "signals.h"
-#include "window-items.h"
+#include <irssi/src/core/channels.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/window-items.h>
 
 #include "xmpp-servers.h"
 
--- a/src/fe-common/module-formats.c
+++ b/src/fe-common/module-formats.c
@@ -16,7 +16,7 @@
  */
 
 #include "module.h"
-#include "formats.h"
+#include <irssi/src/fe-common/core/formats.h>
 
 FORMAT_REC fecommon_xmpp_formats[] = {
 	{ MODULE_NAME, "XMPP", 0, { 0 } },
--- a/src/fe-common/module-formats.h
+++ b/src/fe-common/module-formats.h
@@ -1,4 +1,4 @@
-#include "formats.h"
+#include <irssi/src/fe-common/core/formats.h>
 
 enum {
 	XMPPTXT_MODULE_NAME,
--- a/src/fe-common/module.h
+++ b/src/fe-common/module.h
@@ -3,6 +3,6 @@
 #define CORE_MODULE_NAME "fe-common/core"
 #define IRC_MODULE_NAME "fe-common/irc"
 
-#include "irssi-config.h"
-#include "common.h"
+#include <irssi/irssi-config.h>
+#include <irssi/src/common.h>
 #include "xmpp.h"
--- a/src/fe-common/xep/fe-composing.c
+++ b/src/fe-common/xep/fe-composing.c
@@ -18,10 +18,10 @@
 #include <string.h>
 
 #include "module.h"
-#include "settings.h"
-#include "signals.h"
-#include "special-vars.h"
-#include "window-items.h"
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/core/special-vars.h>
+#include <irssi/src/fe-common/core/window-items.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-queries.h"
--- a/src/fe-common/xep/fe-delay.c
+++ b/src/fe-common/xep/fe-delay.c
@@ -16,17 +16,17 @@
  */		 
 
 #include "module.h"
-#include "levels.h"
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "printtext.h"
-#include "settings.h"
-#include "signals.h"
-#include "window-items.h"
-#include "fe-messages.h"
-#include "fe-queries.h"
-#include "fe-common/core/module-formats.h"
-#include "fe-common/core/fe-messages.h"
-#include "fe-common/irc/module-formats.h"
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/window-items.h>
+#include <irssi/src/fe-common/core/fe-messages.h>
+#include <irssi/src/fe-common/core/fe-queries.h>
+#include <irssi/src/fe-common/core/module-formats.h>
+#include <irssi/src/fe-common/core/fe-messages.h>
+#include <irssi/src/fe-common/irc/module-formats.h>
 
 #include "xmpp-servers.h"
 #include "rosters-tools.h"
--- a/src/fe-common/xep/fe-muc.c
+++ b/src/fe-common/xep/fe-muc.c
@@ -16,14 +16,14 @@
  */
 
 #include "module.h"
-#include "ignore.h"
-#include "levels.h"
+#include <irssi/src/core/ignore.h>
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "printtext.h"
-#include "signals.h"
-#include "window-items.h"
-#include "fe-common/core/module-formats.h"
-#include "fe-common/irc/module-formats.h"
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/window-items.h>
+#include <irssi/src/fe-common/core/module-formats.h>
+#include <irssi/src/fe-common/irc/module-formats.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-commands.h"
--- a/src/fe-common/xep/fe-ping.c
+++ b/src/fe-common/xep/fe-ping.c
@@ -16,10 +16,10 @@
  */		 
 
 #include "module.h"
-#include "levels.h"
-#include "printtext.h"
-#include "signals.h"
-#include "fe-common/irc/module-formats.h"
+#include <irssi/src/core/levels.h>
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/irc/module-formats.h>
 
 #include "xmpp-servers.h"
 #include "rosters-tools.h"
--- a/src/fe-common/xep/fe-registration.c
+++ b/src/fe-common/xep/fe-registration.c
@@ -16,13 +16,13 @@
  */
 
 #include "module.h"
-#include "ignore.h"
-#include "levels.h"
+#include <irssi/src/core/ignore.h>
+#include <irssi/src/core/levels.h>
 #include "module-formats.h"
-#include "printtext.h"
-#include "signals.h"
-#include "fe-common/core/module-formats.h"
-#include "fe-common/irc/module-formats.h"
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/module-formats.h>
+#include <irssi/src/fe-common/irc/module-formats.h>
 
 #include "xmpp-servers.h"
 #include "xep/registration.h"
--- a/src/fe-common/xep/fe-vcard.c
+++ b/src/fe-common/xep/fe-vcard.c
@@ -16,9 +16,9 @@
  */		 
 
 #include "module.h"
-#include "levels.h"
-#include "printtext.h"
-#include "signals.h"
+#include <irssi/src/core/levels.h>
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "rosters-tools.h"
--- a/src/fe-common/xep/fe-version.c
+++ b/src/fe-common/xep/fe-version.c
@@ -16,9 +16,9 @@
  */		 
 
 #include "module.h"
-#include "levels.h"
-#include "printtext.h"
-#include "signals.h"
+#include <irssi/src/core/levels.h>
+#include <irssi/src/fe-common/core/printtext.h>
+#include <irssi/src/core/signals.h>
 
 #include "xmpp-servers.h"
 #include "rosters-tools.h"
--- a/src/fe-common/xmpp-completion.c
+++ b/src/fe-common/xmpp-completion.c
@@ -18,12 +18,12 @@
 #include <string.h>
 
 #include "module.h"
-#include "channels.h"
-#include "channels-setup.h"
-#include "misc.h"
-#include "settings.h"
-#include "signals.h"
-#include "window-items.h"
+#include <irssi/src/core/channels.h>
+#include <irssi/src/core/channels-setup.h>
+#include <irssi/src/core/misc.h>
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-common/core/window-items.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-commands.h"
--- a/src/fe-common/xmpp-formats.c
+++ b/src/fe-common/xmpp-formats.c
@@ -16,8 +16,8 @@
  */
 
 #include "module.h"
-#include "formats.h"
-#include "signals.h"
+#include <irssi/src/fe-common/core/formats.h>
+#include <irssi/src/core/signals.h>
 
 static void
 sig_strip_codes(const char *in, const char **out)
--- a/src/fe-text/module.h
+++ b/src/fe-text/module.h
@@ -1,5 +1,5 @@
 #define MODULE_NAME "xmpp/text"
 
-#include "irssi-config.h"
-#include "common.h"
+#include <irssi/irssi-config.h>
+#include <irssi/src/common.h>
 #include "xmpp.h"
--- a/src/fe-text/text-xmpp-core.c
+++ b/src/fe-text/text-xmpp-core.c
@@ -16,7 +16,7 @@
  */
 
 #include "module.h"
-#include "modules.h"
+#include <irssi/src/core/modules.h>
 
 #include "xep/text-xep.h"
 
--- a/src/fe-text/xep/text-composing.c
+++ b/src/fe-text/xep/text-composing.c
@@ -18,10 +18,9 @@
 #include <string.h>
 
 #include "module.h"
-#include "module-formats.h"
-#include "signals.h"
-#include "statusbar-item.h"
-#include "window-items.h"
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-text/statusbar-item.h>
+#include <irssi/src/fe-common/core/window-items.h>
 
 #include "xmpp-servers.h"
 #include "xmpp-queries.h"
--- a/src/fe-text/xep/text-muc.c
+++ b/src/fe-text/xep/text-muc.c
@@ -16,10 +16,10 @@
  */
 
 #include "module.h"
-#include "settings.h"
-#include "signals.h"
-#include "statusbar-item.h"
-#include "window-items.h"
+#include <irssi/src/core/settings.h>
+#include <irssi/src/core/signals.h>
+#include <irssi/src/fe-text/statusbar-item.h>
+#include <irssi/src/fe-common/core/window-items.h>
 
 #include "xmpp-servers.h"
 #include "xep/muc.h"

From 676acc67c387361f5656090bc1043f43cd0e850f Mon Sep 17 00:00:00 2001
From: Ailin Nemui <ailin@d5401s.localdomain>
Date: Thu, 8 Apr 2021 21:36:24 +0200
Subject: [PATCH] restore compatibility with fixed Irssi prefixes

this is for irssi/irssi#1246 and irssi/irssi#1264

Fixes build with Irssi 1.3
--- a/src/fe-common/xmpp-completion.c
+++ b/src/fe-common/xmpp-completion.c
@@ -30,6 +30,10 @@
 #include "rosters-tools.h"
 #include "tools.h"
 
+#if !defined(IRSSI_ABI_VERSION) || IRSSI_ABI_VERSION < 33
+#  define i_list_find_string glist_find_string
+#endif
+
 static char *
 quoted_if_space(const char *name, const char *res)
 {
@@ -287,7 +291,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));
 	}

From c7728ea5aa2f4e584159b3d12ad815294c44ca6a Mon Sep 17 00:00:00 2001
From: Ailin Nemui <ailin@z30a.localdomain>
Date: Tue, 17 Mar 2020 14:32:52 +0100
Subject: [PATCH] add compatibility code to GTimeVal -> gint64 transition

this is for irssi/irssi#1145
--- a/src/core/xep/ping.c
+++ b/src/core/xep/ping.c
@@ -36,15 +36,40 @@
 
 #define XMLNS_PING "urn:xmpp:ping"
 
+#if defined(IRSSI_ABI_VERSION) && IRSSI_ABI_VERSION >= 25
+#define NO_TIMEVAL
+#define TimeType gint64
+#else
+#define TimeType GTimeVal
+#endif
+
 struct ping_data {
-	char	 *id;
-	GTimeVal  time;
+	char    *id;
+	TimeType time;
 };
 
 static int	 timeout_tag;
 static GSList	*supported_servers;
 static DATALIST *pings;
 
+#ifdef NO_TIMEVAL
+
+#define set_current_time(var)   (var) = g_get_real_time()
+#define clear_time(var)         (var) = 0
+#define has_time(var)           ((var) != 0)
+#define get_time_sec(var)       ((var) / G_TIME_SPAN_SECOND)
+#define get_time_diff(to, from) (to) - (from)
+
+#else
+
+#define set_current_time(var)   g_get_current_time(&(var))
+#define clear_time(var)         memset(&(var), 0, sizeof((var)))
+#define has_time(var)           ((var).tv_sec != 0)
+#define get_time_sec(var)       ((var).tv_sec)
+#define get_time_diff(to, from) (int) get_timeval_diff(&(to), &(from))
+
+#endif
+
 static void
 request_ping(XMPP_SERVER_REC *server, const char *dest)
 {
@@ -63,13 +88,13 @@ request_ping(XMPP_SERVER_REC *server, const char *dest)
 		g_free(server->ping_id);
 		server->ping_id =
 		    g_strdup(lm_message_node_get_attribute(lmsg->node, "id"));
-		g_get_current_time(&server->lag_sent);
+		set_current_time(server->lag_sent);
 		server->lag_last_check = time(NULL);
 	} else {
 		pd = g_new0(struct ping_data, 1);
 		pd->id =
 		    g_strdup(lm_message_node_get_attribute(lmsg->node, "id"));
-		g_get_current_time(&pd->time);
+		set_current_time(pd->time);
 		datalist_add(pings, server, dest, pd);
 	}
 	signal_emit("xmpp send iq", 2, server, lmsg);
@@ -98,7 +123,7 @@ sig_recv_iq(XMPP_SERVER_REC *server, LmMessage *lmsg, const int type,
 {
 	DATALIST_REC *rec;
 	LmMessageNode *node;
-	GTimeVal now;
+	TimeType now;
 	struct ping_data *pd;
 
 	if (type == LM_MESSAGE_SUB_TYPE_RESULT) {
@@ -106,19 +131,18 @@ sig_recv_iq(XMPP_SERVER_REC *server, LmMessage *lmsg, const int type,
 		if (server->ping_id != NULL
 		    && (*from == '\0' || strcmp(from, server->domain) == 0)
 	    	    && strcmp(id, server->ping_id) == 0) {
-			g_get_current_time(&now);
-			server->lag =
-			    (int)get_timeval_diff(&now, &server->lag_sent);
-			memset(&server->lag_sent, 0, sizeof(server->lag_sent));
+			set_current_time(now);
+			server->lag = get_time_diff(now, server->lag_sent);
+			clear_time(server->lag_sent);
 			g_free_and_null(server->ping_id);
 			signal_emit("server lag", 1, server);
 		} else if (lmsg->node->children == NULL
 		    && (rec = datalist_find(pings, server, from)) != NULL) {
 			pd = rec->data;
 			if (strcmp(id, pd->id) == 0) {
-				g_get_current_time(&now);
+				set_current_time(now);
 				signal_emit("xmpp ping", 3, server, from,
-				    get_timeval_diff(&now, &pd->time));
+				    get_time_diff(now, pd->time));
 			}
 		}
 	} else if (type == LM_MESSAGE_SUB_TYPE_GET) {
@@ -166,10 +190,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 (has_time(server->lag_sent)) {
 			/* waiting for lag reply */
 			if (max_lag > 1 &&
-			    (now - server->lag_sent.tv_sec) > max_lag) {
+			    (now - get_time_sec(server->lag_sent)) > max_lag) {
 				/* too much lag - disconnect */
 				signal_emit("server lag disconnect", 1,
 				    server);

