1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

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
This commit is contained in:
dequis 2018-03-28 23:06:47 -03:00
parent b52cf1015e
commit dd7dc7ca7d
2 changed files with 4 additions and 4 deletions

View File

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

View File

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