From d10f934aa1dfc9573c3570a557b613a6c56628d0 Mon Sep 17 00:00:00 2001 From: Harvie Date: Wed, 2 Jun 2010 01:30:30 +0200 Subject: [PATCH] reindented autoansw.c --- plugins/pidgin-plugins/autokiss/autoansw.c | 100 ++++++++++----------- 1 file changed, 47 insertions(+), 53 deletions(-) diff --git a/plugins/pidgin-plugins/autokiss/autoansw.c b/plugins/pidgin-plugins/autokiss/autoansw.c index 0cd9a88..030518a 100755 --- a/plugins/pidgin-plugins/autokiss/autoansw.c +++ b/plugins/pidgin-plugins/autokiss/autoansw.c @@ -25,88 +25,82 @@ char *buff = NULL; -gint compare_str(gconstpointer a, gconstpointer b) -{ - if (a==NULL) return 1; - if (b==NULL) return -1; - return strcmp(a,b); +gint compare_str(gconstpointer a, gconstpointer b) { + if (a == NULL) return 1; + if (b == NULL) return -1; + return strcmp(a, b); } - static void -received_im_msg_cb(PurpleAccount *account, char *who, char *buffer, - PurpleConversation *conv, PurpleMessageFlags flags, void *data) -{ +received_im_msg_cb(PurpleAccount * account, char *who, char *buffer, + PurpleConversation * conv, PurpleMessageFlags flags, + void *data) { /* A workaround to avoid skipping of the first message as a result on NULL-conv: */ - if (conv == NULL) conv=purple_conversation_new(PURPLE_CONV_TYPE_IM, account, who); + if (conv == NULL) + conv = + purple_conversation_new(PURPLE_CONV_TYPE_IM, account, who); buff = purple_markup_strip_html(buffer); printf("\nHarvie received 1: %s\n", buffer); purple_conv_im_send(purple_conversation_get_im_data(conv), ":-*"); - + } /* Plugin Routine */ -static gboolean -plugin_load(PurplePlugin *plugin) -{ +static gboolean plugin_load(PurplePlugin * plugin) { void *conv_handle = purple_conversations_get_handle(); - + purple_signal_connect(conv_handle, "received-im-msg", - plugin, PURPLE_CALLBACK(received_im_msg_cb), NULL); + plugin, PURPLE_CALLBACK(received_im_msg_cb), + NULL); return TRUE; } -static gboolean -plugin_unload(PurplePlugin *plugin) { +static gboolean plugin_unload(PurplePlugin * plugin) { return TRUE; } - static PurplePluginInfo info = { - PURPLE_PLUGIN_MAGIC, - PURPLE_MAJOR_VERSION, - PURPLE_MINOR_VERSION, - PURPLE_PLUGIN_STANDARD, - NULL, - 0, - NULL, - PURPLE_PRIORITY_DEFAULT, - - "core-autokiss", /**< id */ - "AutoKiss", /**< name */ - "0.1", /**< version */ - /** summary */ - "Automatically answering based on regexes.", - /** description */ + PURPLE_PLUGIN_MAGIC, + PURPLE_MAJOR_VERSION, + PURPLE_MINOR_VERSION, + PURPLE_PLUGIN_STANDARD, + NULL, + 0, + NULL, + PURPLE_PRIORITY_DEFAULT, + + "core-autokiss", /**< id */ + "AutoKiss", /**< name */ + "0.1", /**< version */ + /** summary */ + "Automatically answering based on regexes.", + /** description */ "Automatically answering based on regexpppppppppppppppp", - "Harvie ", /**< author */ - "http://sourceforge.net/projects/pidgin-autoansw", /**< homepage */ - - plugin_load, /**< load */ - plugin_unload, /**< unload */ - NULL, - - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL + "Harvie ", /**< author */ + "http://sourceforge.net/projects/pidgin-autoansw", /**< homepage */ + + plugin_load, /**< load */ + plugin_unload, /**< unload */ + NULL, + + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL }; -static void -init_plugin(PurplePlugin *plugin) -{ +static void init_plugin(PurplePlugin * plugin) { } PURPLE_INIT_PLUGIN(autoanswer, init_plugin, info) - -- 2.30.2