aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/nogaim.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/nogaim.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/nogaim.h')
-rw-r--r--protocols/nogaim.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/nogaim.h b/protocols/nogaim.h
index 6e7343ba..548b22f9 100644
--- a/protocols/nogaim.h
+++ b/protocols/nogaim.h
@@ -69,6 +69,7 @@
#define OPT_NOOTR 0x00001000 /* protocol not suitable for OTR */
#define OPT_PONGS 0x00010000 /* Service sends us keep-alives */
#define OPT_PONGED 0x00020000 /* Received a keep-alive during last interval */
+#define OPT_SELFMESSAGE 0x00080000 /* A message sent by self from another location */
/* ok. now the fun begins. first we create a connection structure */
struct im_connection {
@@ -324,7 +325,7 @@ G_MODULE_EXPORT void imcb_rename_buddy(struct im_connection *ic, const char *han
G_MODULE_EXPORT void imcb_buddy_nick_hint(struct im_connection *ic, const char *handle, const char *nick);
G_MODULE_EXPORT void imcb_buddy_action_response(bee_user_t *bu, const char *action, char * const args[], void *data);
-G_MODULE_EXPORT void imcb_buddy_typing(struct im_connection *ic, const char *handle, uint32_t flags);
+G_MODULE_EXPORT void imcb_buddy_typing(struct im_connection *ic, const char *handle, guint32 flags);
G_MODULE_EXPORT struct bee_user *imcb_buddy_by_handle(struct im_connection *ic, const char *handle);
G_MODULE_EXPORT void imcb_clean_handle(struct im_connection *ic, char *handle);