Mercurial > ~mikael > mcabber > hg
diff mcabber/src/hooks.c @ 1055:6eb1efea75d0
PGP: Visual encryption flag
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 27 Nov 2006 23:39:40 +0100 |
parents | 54405d09b15a |
children | c0d44a9a99bc |
line wrap: on
line diff
--- a/mcabber/src/hooks.c Mon Nov 27 21:40:26 2006 +0100 +++ b/mcabber/src/hooks.c Mon Nov 27 23:39:40 2006 +0100 @@ -34,7 +34,8 @@ static char *extcmd; inline void hk_message_in(const char *jid, const char *resname, - time_t timestamp, const char *msg, const char *type) + time_t timestamp, const char *msg, const char *type, + guint encrypted) { int new_guy = FALSE; int is_groupchat = FALSE; // groupchat message @@ -45,6 +46,9 @@ char *wmsg = NULL, *bmsg = NULL, *mmsg = NULL; GSList *roster_usr; + if (encrypted) + message_flags |= HBB_PREFIX_PGPCRYPT; + if (type && !strcmp(type, "groupchat")) { rtype = ROSTER_TYPE_ROOM; is_groupchat = TRUE; @@ -165,7 +169,7 @@ // nick should be set for private messages in a chat room, and null for // normal messages. inline void hk_message_out(const char *jid, const char *nick, - time_t timestamp, const char *msg) + time_t timestamp, const char *msg, guint encrypted) { char *wmsg = NULL, *bmsg = NULL, *mmsg = NULL; @@ -184,7 +188,7 @@ // Note: the hlog_write should not be called first, because in some // cases scr_WriteOutgoingMessage() will load the history and we'd // have the message twice... - scr_WriteOutgoingMessage(jid, wmsg); + scr_WriteOutgoingMessage(jid, wmsg, (encrypted ? HBB_PREFIX_PGPCRYPT : 0)); // We don't log private messages if (!nick) hlog_write_message(jid, timestamp, TRUE, msg);