Mercurial > pidgin.yaz
comparison libpurple/protocols/mxit/protocol.c @ 29782:81ea740f92a4
Add extra parameter to mxit_send_message() function to indicate if the message should be
sent normally or as a MXit command.
author | andrew.victor@mxit.com |
---|---|
date | Tue, 26 Jan 2010 14:26:22 +0000 |
parents | 232fcf1755d6 |
children | 1147389b5424 |
comparison
equal
deleted
inserted
replaced
29781:232fcf1755d6 | 29782:81ea740f92a4 |
---|---|
693 * | 693 * |
694 * @param session The MXit session object | 694 * @param session The MXit session object |
695 * @param to The username of the recipient | 695 * @param to The username of the recipient |
696 * @param msg The message text | 696 * @param msg The message text |
697 */ | 697 */ |
698 void mxit_send_message( struct MXitSession* session, const char* to, const char* msg, gboolean parse_markup ) | 698 void mxit_send_message( struct MXitSession* session, const char* to, const char* msg, gboolean parse_markup, gboolean is_command ) |
699 { | 699 { |
700 char data[CP_MAX_PACKET]; | 700 char data[CP_MAX_PACKET]; |
701 char* markuped_msg; | 701 char* markuped_msg; |
702 int datalen; | 702 int datalen; |
703 int msgtype = CP_MSGTYPE_NORMAL; | 703 int msgtype = ( is_command ? CP_MSGTYPE_COMMAND : CP_MSGTYPE_NORMAL ); |
704 | 704 |
705 /* first we need to convert the markup from libPurple to MXit format */ | 705 /* first we need to convert the markup from libPurple to MXit format */ |
706 if ( parse_markup ) | 706 if ( parse_markup ) |
707 markuped_msg = mxit_convert_markup_tx( msg, &msgtype ); | 707 markuped_msg = mxit_convert_markup_tx( msg, &msgtype ); |
708 else | 708 else |