pidgin/purple-plugin-pack
New abusive plugin 'findip' to find the IP of anyone in the buddylist.
--- a/configure.ac Mon Sep 03 17:54:29 2007 -0400
+++ b/configure.ac Tue Sep 04 04:20:49 2007 -0400
@@ -312,6 +312,7 @@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/findip/Makefile.am Tue Sep 04 04:20:49 2007 -0400
@@ -0,0 +1,26 @@
+EXTRA_DIST = .purple-plugin .abusive Makefile.mingw +findipdir = $(PURPLE_LIBDIR) +findip_la_LDFLAGS = -module -avoid-version +findip_LTLIBRARIES = findip.la + -DLIBDIR=\"$(PURPLE_LIBDIR)\" \ + -DDATADIR=\"$(PURPLE_DATADIR)\" \ + -DPIXMAPSDIR=\"$(PURPLE_PIXMAPSDIR)\" \ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/findip/Makefile.mingw Tue Sep 04 04:20:49 2007 -0400
@@ -0,0 +1,12 @@
+# Description: Makefile for dice plugin. +include $(PP_TOP)/win_pp.mak --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/findip/findip.c Tue Sep 04 04:20:49 2007 -0400
@@ -0,0 +1,183 @@
+ * Find IP - Find the IP of a person in the buddylist + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# include "../pp_config.h" +#define PLUGIN_ID "findip" +#define PLUGIN_NAME "Find IP" +#define PLUGIN_STATIC_NAME "findip" +#define PLUGIN_SUMMARY "Find the IP of a person in the buddylist." +#define PLUGIN_DESCRIPTION "Find the IP of a person in the buddylist. This doesn't really work." +#define PLUGIN_AUTHOR "someone <someone@somewhere.tld>" +/* Pack/Local headers */ +#include "../common/pp_internal.h" +#define PREF_ROOT "/plugins/core/" PLUGIN_ID +#define PREF_NOTIFY PREF_ROOT "/notify" + PurpleConversation *conv; + buddy = (PurpleBuddy*)node; + if (buddy->account == NULL || buddy->account->gc == NULL) + conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, buddy->account, buddy->name); + purple_conversation_write(conv, NULL, _("Looked up IP: 127.0.0.1\n"), + PURPLE_MESSAGE_NOTIFY | PURPLE_MESSAGE_SYSTEM, + if (purple_prefs_get_bool(PREF_NOTIFY)) + serv_send_im(buddy->account->gc, buddy->name, _("Yo! What's your IP?"), 0); +find_ip(PurpleBlistNode *node, gpointer plugin) + PurpleConversation *conv; + if (PURPLE_BLIST_NODE_IS_CONTACT(node)) + node = (PurpleBlistNode*)purple_contact_get_priority_buddy((PurpleContact*)node); + if (!PURPLE_BLIST_NODE_IS_BUDDY(node)) + purple_timeout_add_seconds(5, show_ip, node); + buddy = (PurpleBuddy*)node; + conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, buddy->account, buddy->name); + purple_conversation_write(conv, NULL, _("Looking up the IP ...\n"), + PURPLE_MESSAGE_NOTIFY | PURPLE_MESSAGE_SYSTEM, +context_menu(PurpleBlistNode *node, GList **menu, gpointer plugin) + PurpleMenuAction *action; + if (!PURPLE_BLIST_NODE_IS_BUDDY(node) && !PURPLE_BLIST_NODE_IS_CONTACT(node)) + action = purple_menu_action_new(_("Find IP"), + PURPLE_CALLBACK(find_ip), plugin, NULL); + (*menu) = g_list_prepend(*menu, action); +plugin_load(PurplePlugin *plugin) + purple_signal_connect(purple_blist_get_handle(), "blist-node-extended-menu", plugin, + PURPLE_CALLBACK(context_menu), plugin); +plugin_unload(PurplePlugin *plugin) +static PurplePluginPrefFrame * +get_plugin_pref_frame(PurplePlugin *plugin) + PurplePluginPrefFrame *frame; + PurplePluginPref *pref; + frame = purple_plugin_pref_frame_new(); + pref = purple_plugin_pref_new_with_name_and_label(PREF_NOTIFY, + _("Notify the user that you are trying to get the IP")); + purple_plugin_pref_frame_add(frame, pref); +static PurplePluginUiInfo pref_info = { +static PurplePluginInfo info = { + PURPLE_PLUGIN_MAGIC, /* Magic */ + PURPLE_MAJOR_VERSION, /* Purple Major Version */ + PURPLE_MINOR_VERSION, /* Purple Minor Version */ + PURPLE_PLUGIN_STANDARD, /* plugin type */ + NULL, /* ui requirement */ + NULL, /* dependencies */ + PURPLE_PRIORITY_DEFAULT, /* priority */ + PLUGIN_ID, /* plugin id */ + PP_VERSION, /* version */ + NULL, /* description */ + PLUGIN_AUTHOR, /* author */ + PP_WEBSITE, /* website */ + plugin_load, /* load */ + plugin_unload, /* unload */ + &pref_info, /* prefs_info */ +init_plugin(PurplePlugin *plugin) { + bindtextdomain(GETTEXT_PACKAGE, PP_LOCALEDIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + info.name = _(PLUGIN_NAME); + info.summary = _(PLUGIN_SUMMARY); + info.description = _(PLUGIN_DESCRIPTION); + purple_prefs_add_none(PREF_ROOT); + purple_prefs_add_bool(PREF_NOTIFY, TRUE); +PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info)