# HG changeset patch # User Sadrul Habib Chowdhury # Date 1188939624 0 # Node ID 425010370845b149612d15b95fc5fba73433704a # Parent 55d3f1622cf7cb99d96a047ee2e1e79250148f0c Catch the event at the very end to make sure other plugins can play with it before we do, if they want to. diff -r 55d3f1622cf7 -r 425010370845 libpurple/plugins/offlinemsg.c --- a/libpurple/plugins/offlinemsg.c Tue Sep 04 19:00:57 2007 +0000 +++ b/libpurple/plugins/offlinemsg.c Tue Sep 04 21:00:24 2007 +0000 @@ -113,6 +113,10 @@ PurpleConversation *conv; OfflineMessageSetting setting; + if (message == NULL || *message == NULL || + **message == '\0') + return; + buddy = purple_find_buddy(account, who); if (!buddy) return; @@ -167,8 +171,8 @@ static gboolean plugin_load(PurplePlugin *plugin) { - purple_signal_connect(purple_conversations_get_handle(), "sending-im-msg", - plugin, PURPLE_CALLBACK(sending_msg_cb), plugin); + purple_signal_connect_priority(purple_conversations_get_handle(), "sending-im-msg", + plugin, PURPLE_CALLBACK(sending_msg_cb), plugin, PURPLE_SIGNAL_PRIORITY_HIGHEST); return TRUE; }