aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/bee.h
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-09-13 01:17:14 -0300
committerdequis <dx@dxzone.com.ar>2015-10-30 07:27:20 -0300
commit345577bc90da1d1fffa0df013426eab54fa2b1b2 (patch)
tree2c07626bdaceb7bd5070eebd2c4a89b24d82db0b /protocols/bee.h
parent0db66186f49438ae9c2f73ca85b915e999896309 (diff)
IRC self-message support (messages sent by yourself from other clients)
This adds an OPT_SELFMESSAGE flag that can be passed to imcb_buddy_msg() or imcb_chat_msg() to indicate that the protocol knows that the message being sent is a self message. This needs to be explicit since the old behavior is to silently drop these messages, which also removed server echoes. This commit doesn't break API/ABI, the flags parameters that were added are all internal (between protocols and UI code) On the irc protocol side, the situation isn't very nice, since some clients put these messages in the wrong window. Irssi, hexchat and mirc get this wrong. Irssi 0.8.18 has a fix for it, and the others have scripts to patch it. But meanwhile, there's a "self_messages" global setting that lets users disable this, or get them as normal messages / notices with a "->" prefix, which loosely imitates the workaround used by the ZNC "privmsg_prefix" module.
Diffstat (limited to 'protocols/bee.h')
-rw-r--r--protocols/bee.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/bee.h b/protocols/bee.h
index fc27d424..a9678a6e 100644
--- a/protocols/bee.h
+++ b/protocols/bee.h
@@ -104,7 +104,7 @@ typedef struct bee_ui_funcs {
/* State info is already updated, old is provided in case the UI needs a diff. */
gboolean (*user_status)(bee_t *bee, struct bee_user *bu, struct bee_user *old);
/* On every incoming message. sent_at = 0 means unknown. */
- gboolean (*user_msg)(bee_t *bee, bee_user_t *bu, const char *msg, time_t sent_at);
+ gboolean (*user_msg)(bee_t *bee, bee_user_t *bu, const char *msg, guint32 flags, time_t sent_at);
/* Flags currently defined (OPT_TYPING/THINKING) in nogaim.h. */
gboolean (*user_typing)(bee_t *bee, bee_user_t *bu, guint32 flags);
/* CTCP-like stuff (buddy action) response */
@@ -117,7 +117,7 @@ typedef struct bee_ui_funcs {
gboolean (*chat_free)(bee_t *bee, struct groupchat *c);
/* System messages of any kind. */
gboolean (*chat_log)(bee_t *bee, struct groupchat *c, const char *text);
- gboolean (*chat_msg)(bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, time_t sent_at);
+ gboolean (*chat_msg)(bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, guint32 flags, time_t sent_at);
gboolean (*chat_add_user)(bee_t *bee, struct groupchat *c, bee_user_t *bu);
gboolean (*chat_remove_user)(bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *reason);
gboolean (*chat_topic)(bee_t *bee, struct groupchat *c, const char *new_topic, bee_user_t *bu);