aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-05-08 02:02:12 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-05-08 02:02:12 +0100
commita87754b68bb1eb07397d71a93ffcb0f3fc089266 (patch)
treed7ffb3b17f7c994dc7003b75d4888680be820949 /protocols
parente4816eab28eff86f2303261f8ae292acd84212dd (diff)
Restored support for outgoing messages. This code is all so much saner now..
Diffstat (limited to 'protocols')
-rw-r--r--protocols/bee.h1
-rw-r--r--protocols/bee_chat.c20
2 files changed, 21 insertions, 0 deletions
diff --git a/protocols/bee.h b/protocols/bee.h
index 27e31d05..982bb914 100644
--- a/protocols/bee.h
+++ b/protocols/bee.h
@@ -125,5 +125,6 @@ void imcb_chat_add_buddy( struct groupchat *b, const char *handle );
void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason );
static int remove_chat_buddy_silent( struct groupchat *b, const char *handle );
#endif
+int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags );
#endif /* __BEE_H__ */
diff --git a/protocols/bee_chat.c b/protocols/bee_chat.c
index f1d1a2c1..b523e544 100644
--- a/protocols/bee_chat.c
+++ b/protocols/bee_chat.c
@@ -246,3 +246,23 @@ static int remove_chat_buddy_silent( struct groupchat *b, const char *handle )
return 0;
}
#endif
+
+int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags )
+{
+ struct im_connection *ic = c->ic;
+ char *buf = NULL;
+ int st;
+
+ if( ( ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
+ {
+ buf = escape_html( msg );
+ msg = buf;
+ }
+ else
+ buf = g_strdup( msg );
+
+ ic->acc->prpl->chat_msg( c, buf, flags );
+ g_free( buf );
+
+ return 1;
+}