From dd7dc7ca7d0b04ae2d522a209845c453bfd9aab5 Mon Sep 17 00:00:00 2001 From: dequis Date: Wed, 28 Mar 2018 23:06:47 -0300 Subject: [PATCH] otr: fix missing 'target' param in 'message private' signal Fixes warnings like these on '/msg yourself' -!- Irssi: critical privmsg_get_query: assertion 'nick != NULL' failed -!- Irssi: critical query_find: assertion 'nick != NULL' failed --- src/otr/module.c | 6 +++--- src/otr/module.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/otr/module.c b/src/otr/module.c index 0d83629f..f561b91c 100644 --- a/src/otr/module.c +++ b/src/otr/module.c @@ -79,7 +79,7 @@ static void sig_server_sendmsg(SERVER_REC *server, const char *target, /* * Pipes all incoming private messages through OTR */ -void sig_message_private(SERVER_REC *server, const char *msg, const char *nick, const char *address) +void sig_message_private(SERVER_REC *server, const char *msg, const char *nick, const char *address, const char *target) { char *new_msg = NULL; @@ -91,7 +91,7 @@ void sig_message_private(SERVER_REC *server, const char *msg, const char *nick, if (new_msg == NULL) { /* This message was not OTR */ - signal_continue(4, server, msg, nick, address); + signal_continue(5, server, msg, nick, address, target); } else { /* * Check for /me IRC marker and if so, handle it so the user does not @@ -103,7 +103,7 @@ void sig_message_private(SERVER_REC *server, const char *msg, const char *nick, signal_emit("message irc action", 5, server, new_msg + OTR_IRC_MARKER_ME_LEN, nick, address, nick); } else { /* OTR received message */ - signal_continue(4, server, new_msg, nick, address); + signal_continue(5, server, new_msg, nick, address, target); } } diff --git a/src/otr/module.h b/src/otr/module.h index fdfc77bd..513ee03b 100644 --- a/src/otr/module.h +++ b/src/otr/module.h @@ -24,6 +24,6 @@ #include "common.h" #include "servers.h" -void sig_message_private(SERVER_REC *server, const char *msg, const char *nick, const char *address); +void sig_message_private(SERVER_REC *server, const char *msg, const char *nick, const char *address, const char *target); #endif /* IRSSI_OTR_MODULE */