Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/hooks.c @ 484:00e2d3821a5b
Display PRIV for private messages in a room when using /say_to
Private conf. messages are not logged.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 06 Oct 2005 21:51:34 +0200 |
parents | 4a10c04ac2fb |
children | 55aa45eb7ece |
comparison
equal
deleted
inserted
replaced
483:4a10c04ac2fb | 484:00e2d3821a5b |
---|---|
111 } | 111 } |
112 | 112 |
113 if (bmsg) g_free(bmsg); | 113 if (bmsg) g_free(bmsg); |
114 } | 114 } |
115 | 115 |
116 inline void hk_message_out(const char *jid, time_t timestamp, const char *msg) | 116 // hk_message_out() |
117 { | 117 // nick should be set for private messages in a chat room, and null for |
118 scr_WriteOutgoingMessage(jid, msg); | 118 // normal messages. |
119 hlog_write_message(jid, timestamp, TRUE, msg); | 119 inline void hk_message_out(const char *jid, const char *nick, |
120 time_t timestamp, const char *msg) | |
121 { | |
122 char *wmsg = NULL, *bmsg = NULL; | |
123 | |
124 if (nick) { | |
125 wmsg = bmsg = g_strdup_printf("PRIV#<%s> %s", nick, msg); | |
126 } else { | |
127 wmsg = (char*)msg; | |
128 // We don't log private messages | |
129 hlog_write_message(jid, timestamp, TRUE, msg); | |
130 } | |
131 | |
132 scr_WriteOutgoingMessage(jid, wmsg); | |
120 // External command | 133 // External command |
121 hk_ext_cmd(jid, 'M', 'S', NULL); | 134 hk_ext_cmd(jid, 'M', 'S', NULL); |
135 | |
136 if (bmsg) g_free(bmsg); | |
122 } | 137 } |
123 | 138 |
124 inline void hk_statuschange(const char *jid, const char *resname, gchar prio, | 139 inline void hk_statuschange(const char *jid, const char *resname, gchar prio, |
125 time_t timestamp, enum imstatus status, | 140 time_t timestamp, enum imstatus status, |
126 const char *status_msg) | 141 const char *status_msg) |