Thu, 22 May 2014 16:07:39 +0200
Remove dead send_whisper feature
--- a/libpurple/protocols/bonjour/bonjour.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/bonjour/bonjour.c Thu May 22 16:07:39 2014 +0200 @@ -528,7 +528,6 @@ NULL, /* get_chat_name */ NULL, /* chat_invite */ NULL, /* chat_leave */ - NULL, /* chat_whisper */ NULL, /* chat_send */ NULL, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/gg/gg.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/gg/gg.c Thu May 22 16:07:39 2014 +0200 @@ -1019,10 +1019,9 @@ ggp_chat_get_name, /* get_chat_name */ ggp_chat_invite, /* chat_invite */ ggp_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ ggp_chat_send, /* chat_send */ #else - NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, #endif ggp_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/irc/irc.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/irc/irc.c Thu May 22 16:07:39 2014 +0200 @@ -969,7 +969,6 @@ irc_get_chat_name, /* get_chat_name */ irc_chat_invite, /* chat_invite */ irc_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ irc_chat_send, /* chat_send */ irc_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/jabber/libfacebook.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/jabber/libfacebook.c Thu May 22 16:07:39 2014 +0200 @@ -116,7 +116,6 @@ NULL, /* get_chat_name */ NULL, /* chat_invite */ NULL, /* chat_leave */ - NULL, /* chat_whisper */ NULL, /* chat_send */ jabber_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/jabber/libgtalk.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/jabber/libgtalk.c Thu May 22 16:07:39 2014 +0200 @@ -99,7 +99,6 @@ jabber_get_chat_name, /* get_chat_name */ jabber_chat_invite, /* chat_invite */ jabber_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ jabber_message_send_chat, /* chat_send */ jabber_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/jabber/libxmpp.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/jabber/libxmpp.c Thu May 22 16:07:39 2014 +0200 @@ -93,7 +93,6 @@ jabber_get_chat_name, /* get_chat_name */ jabber_chat_invite, /* chat_invite */ jabber_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ jabber_message_send_chat, /* chat_send */ jabber_keepalive, /* keepalive */ jabber_register_account, /* register_user */
--- a/libpurple/protocols/msn/msn.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/msn/msn.c Thu May 22 16:07:39 2014 +0200 @@ -2918,7 +2918,6 @@ NULL, /* get_chat_name */ msn_chat_invite, /* chat_invite */ msn_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ msn_chat_send, /* chat_send */ msn_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/mxit/mxit.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/mxit/mxit.c Thu May 22 16:07:39 2014 +0200 @@ -765,7 +765,6 @@ mxit_chat_name, /* get_chat_name [multimx.c] */ mxit_chat_invite, /* chat_invite [multimx.c] */ mxit_chat_leave, /* chat_leave [multimx.c] */ - NULL, /* chat_whisper */ mxit_chat_send, /* chat_send [multimx.c] */ mxit_keepalive, /* keepalive */ mxit_register, /* register_user */
--- a/libpurple/protocols/novell/novell.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/novell/novell.c Thu May 22 16:07:39 2014 +0200 @@ -3541,7 +3541,6 @@ NULL, /* get_chat_name */ novell_chat_invite, /* chat_invite */ novell_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ novell_chat_send, /* chat_send */ novell_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/null/nullprpl.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/null/nullprpl.c Thu May 22 16:07:39 2014 +0200 @@ -781,71 +781,6 @@ foreach_gc_in_chat(left_chat_room, gc, id, NULL); } -static PurpleCmdRet send_whisper(PurpleConversation *conv, const gchar *cmd, - gchar **args, gchar **error, void *userdata) { - const char *to_username; - const char *message; - const char *from_username; - PurpleChatUser *chat_user; - PurpleConnection *to; - - /* parse args */ - to_username = args[0]; - message = args[1]; - - if (!to_username || !*to_username) { - *error = g_strdup(_("Whisper is missing recipient.")); - return PURPLE_CMD_RET_FAILED; - } else if (!message || !*message) { - *error = g_strdup(_("Whisper is missing message.")); - return PURPLE_CMD_RET_FAILED; - } - - from_username = purple_account_get_username(purple_conversation_get_account(conv)); - purple_debug_info("nullprpl", "%s whispers to %s in chat room %s: %s\n", - from_username, to_username, - purple_conversation_get_name(conv), message); - - chat_user = purple_chat_conversation_find_user(PURPLE_CHAT_CONVERSATION(conv), to_username); - to = get_nullprpl_gc(to_username); - - if (!chat_user) { - /* this will be freed by the caller */ - *error = g_strdup_printf(_("%s is not logged in."), to_username); - return PURPLE_CMD_RET_FAILED; - } else if (!to) { - *error = g_strdup_printf(_("%s is not in this chat room."), to_username); - return PURPLE_CMD_RET_FAILED; - } else { - /* write the whisper in the sender's chat window */ - char *message_to = g_strdup_printf("%s (to %s)", message, to_username); - purple_conversation_write_message(conv, from_username, message_to, - PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_WHISPER, - time(NULL)); - g_free(message_to); - - /* send the whisper */ - purple_serv_chat_whisper(to, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(conv)), - from_username, message); - - return PURPLE_CMD_RET_OK; - } -} - -static void nullprpl_chat_whisper(PurpleConnection *gc, int id, const char *who, - const char *message) { - const char *username = purple_account_get_username(purple_connection_get_account(gc)); - PurpleChatConversation *chat = purple_conversations_find_chat(gc, id); - purple_debug_info("nullprpl", - "%s receives whisper from %s in chat room %s: %s\n", - username, who, purple_conversation_get_name(PURPLE_CONVERSATION(chat)), - message); - - /* receive whisper on recipient's account */ - purple_serv_got_chat_in(gc, id, who, PURPLE_MESSAGE_RECV | PURPLE_MESSAGE_WHISPER, - message, time(NULL)); -} - static void receive_chat_message(PurpleChatConversation *from, PurpleChatConversation *to, int id, const char *room, gpointer userdata) { const char *message = (const char *)userdata; @@ -1115,7 +1050,6 @@ nullprpl_get_chat_name, /* get_chat_name */ nullprpl_chat_invite, /* chat_invite */ nullprpl_chat_leave, /* chat_leave */ - nullprpl_chat_whisper, /* chat_whisper */ nullprpl_chat_send, /* chat_send */ NULL, /* keepalive */ nullprpl_register_user, /* register_user */ @@ -1170,16 +1104,6 @@ prpl_info.user_splits = g_list_append(NULL, split); prpl_info.protocol_options = g_list_append(NULL, option); - /* register whisper chat command, /msg */ - purple_cmd_register("msg", - "ws", /* args: recipient and message */ - PURPLE_CMD_P_DEFAULT, /* priority */ - PURPLE_CMD_FLAG_CHAT, - "prpl-null", - send_whisper, - "msg <username> <message>: send a private message, aka a whisper", - NULL); /* userdata */ - /* get ready to store offline messages */ goffline_messages = g_hash_table_new_full(g_str_hash, /* hash fn */ g_str_equal, /* key comparison fn */
--- a/libpurple/protocols/oscar/libaim.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/oscar/libaim.c Thu May 22 16:07:39 2014 +0200 @@ -65,7 +65,6 @@ oscar_get_chat_name, /* get_chat_name */ oscar_chat_invite, /* chat_invite */ oscar_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ oscar_send_chat, /* chat_send */ oscar_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/oscar/libicq.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/oscar/libicq.c Thu May 22 16:07:39 2014 +0200 @@ -81,7 +81,6 @@ oscar_get_chat_name, /* get_chat_name */ oscar_chat_invite, /* chat_invite */ oscar_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ oscar_send_chat, /* chat_send */ oscar_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/sametime/sametime.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/sametime/sametime.c Thu May 22 16:07:39 2014 +0200 @@ -4770,15 +4770,6 @@ } -static void mw_prpl_chat_whisper(PurpleConnection *gc, - int id, - const char *who, - const char *message) { - - mw_prpl_send_im(gc, purple_message_new(who, message, 0)); -} - - static int mw_prpl_chat_send(PurpleConnection *gc, int id, PurpleMessage *pmsg) { struct mwPurplePluginData *pd; @@ -5097,7 +5088,6 @@ mw_prpl_get_chat_name, mw_prpl_chat_invite, mw_prpl_chat_leave, - mw_prpl_chat_whisper, mw_prpl_chat_send, mw_prpl_keepalive, NULL,
--- a/libpurple/protocols/silc/silc.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/silc/silc.c Thu May 22 16:07:39 2014 +0200 @@ -2104,7 +2104,6 @@ silcpurple_get_chat_name, /* get_chat_name */ silcpurple_chat_invite, /* chat_invite */ silcpurple_chat_leave, /* chat_leave */ - NULL, /* chat_whisper */ silcpurple_chat_send, /* chat_send */ silcpurple_keepalive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/simple/simple.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/simple/simple.c Thu May 22 16:07:39 2014 +0200 @@ -2085,7 +2085,6 @@ NULL, /* get_chat_name */ NULL, /* chat_invite */ NULL, /* chat_leave */ - NULL, /* chat_whisper */ NULL, /* chat_send */ simple_keep_alive, /* keepalive */ NULL, /* register_user */
--- a/libpurple/protocols/yahoo/libyahoo.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/yahoo/libyahoo.c Thu May 22 16:07:39 2014 +0200 @@ -230,7 +230,6 @@ yahoo_get_chat_name, yahoo_c_invite, yahoo_c_leave, - NULL, /* chat whisper */ yahoo_c_send, yahoo_keepalive, NULL, /* register_user */
--- a/libpurple/protocols/yahoo/libyahoojp.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/yahoo/libyahoojp.c Thu May 22 16:07:39 2014 +0200 @@ -126,7 +126,6 @@ yahoo_get_chat_name, yahoo_c_invite, yahoo_c_leave, - NULL, /* chat whisper */ yahoo_c_send, yahoo_keepalive, NULL, /* register_user */
--- a/libpurple/protocols/zephyr/zephyr.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/protocols/zephyr/zephyr.c Thu May 22 16:07:39 2014 +0200 @@ -2923,7 +2923,6 @@ zephyr_get_chat_name, /* get_chat_name */ NULL, /* chat_invite -- No chat invites*/ zephyr_chat_leave, /* chat_leave */ - NULL, /* chat_whisper -- No "whispering"*/ zephyr_chat_send, /* chat_send */ NULL, /* keepalive -- Not necessary*/ NULL, /* register_user -- Not supported*/
--- a/libpurple/prpl.h Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/prpl.h Thu May 22 16:07:39 2014 +0200 @@ -409,16 +409,6 @@ void (*chat_leave)(PurpleConnection *, int id); /* - * Send a whisper to a user in a chat. - * - * @id: The id of the chat. - * @who: The name of the user to send the whisper to. - * @message: The message of the whisper. - */ - void (*chat_whisper)(PurpleConnection *, int id, - const char *who, const char *message); - - /* * Send a message to a chat. * This PRPL function should return a positive value on success. * If the message is too big to be sent, return -E2BIG. If
--- a/libpurple/server.c Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/server.c Thu May 22 16:07:39 2014 +0200 @@ -510,20 +510,6 @@ prpl_info->chat_leave(gc, id); } -void purple_serv_chat_whisper(PurpleConnection *gc, int id, const char *who, const char *message) -{ - PurplePlugin *prpl; - PurplePluginProtocolInfo *prpl_info; - - if (gc) { - prpl = purple_connection_get_prpl(gc); - prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); - - if (prpl_info->chat_whisper) - prpl_info->chat_whisper(gc, id, who, message); - } -} - int purple_serv_chat_send(PurpleConnection *gc, int id, PurpleMessage *msg) { PurplePlugin *prpl;
--- a/libpurple/server.h Thu May 22 15:53:54 2014 +0200 +++ b/libpurple/server.h Thu May 22 16:07:39 2014 +0200 @@ -76,7 +76,6 @@ void purple_serv_set_permit_deny(PurpleConnection *); void purple_serv_chat_invite(PurpleConnection *, int, const char *, const char *); void purple_serv_chat_leave(PurpleConnection *, int); -void purple_serv_chat_whisper(PurpleConnection *, int, const char *, const char *); int purple_serv_chat_send(PurpleConnection *, int, PurpleMessage *); void purple_serv_alias_buddy(PurpleBuddy *); void purple_serv_got_alias(PurpleConnection *gc, const char *who, const char *alias);