pidgin/purple-plugin-pack
Clone
Add nomobility plugin to stop you from sending messages to mobile users. Right now it forces it for all messages while i'm dev'n. This will be fixed before I push, but I need some more functionality here first ;)
--- a/ChangeLog Wed Nov 05 03:39:13 2008 -0500
+++ b/ChangeLog Wed Nov 05 03:58:53 2008 -0500
@@ -1,10 +1,11 @@
* Fixed some crashes in autprofile related to old preference paths
* ListHandler now handles "FriendlyName" lines in .blt files generated by
newer Windows AIM versions when importing.
* Added Vietnamese translation - thanks Nguyen Huu Phuoc
* findip and groupmsg are now default plugins.
+ * Added nomobility plugin * Rewrote the build system to make our lifes easier, as well as support
--- a/VERSION Wed Nov 05 03:39:13 2008 -0500
+++ b/VERSION Wed Nov 05 03:58:53 2008 -0500
@@ -1,1 +1,1 @@
--- a/configure.ac Wed Nov 05 03:39:13 2008 -0500
+++ b/configure.ac Wed Nov 05 03:58:53 2008 -0500
@@ -1,4 +1,4 @@
-AC_INIT([purple-plugin_pack], [2.4.1mtn], [plugins-devel@lists.guifications.org])
+AC_INIT([purple-plugin_pack], [2.5.1mtn], [plugins-devel@lists.guifications.org]) AM_CONFIG_HEADER(pre_config.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nomobility/Makefile.am Wed Nov 05 03:58:53 2008 -0500
@@ -0,0 +1,28 @@
+nomobilitydir = $(PURPLE_LIBDIR) +nomobility_la_LDFLAGS = -module -avoid-version +nomobility_LTLIBRARIES = nomobility.la +nomobility_la_SOURCES = \ +nomobility_la_LIBADD = \ + -DLIBDIR=\"$(PURPLE_LIBDIR)\" \ + -DDATADIR=\"$(PURPLE_DATADIR)\" \ + -DPIXMAPSDIR=\"$(PURPLE_PIXMAPSDIR)\" \ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nomobility/Makefile.mingw Wed Nov 05 03:58:53 2008 -0500
@@ -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/nomobility/nomobility.c Wed Nov 05 03:58:53 2008 -0500
@@ -0,0 +1,143 @@
+ * nomobility - stops you from sending messages to mobile users + * Copyright (C) 2008 Gary Kramlich <grim@reaperworld.com> + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA. +/* If you can't figure out what this line is for, DON'T TOUCH IT. */ +#include "../common/pp_internal.h" +#include <conversation.h> +/****************************************************************************** + *****************************************************************************/ +sending_im_msg(PurpleAccount *account, gchar *receiver, gchar **message, + PurpleBuddy *buddy = NULL; + PurplePresence *presence = NULL; + buddy = purple_find_buddy(account, receiver); + presence = purple_buddy_get_presence(buddy); + if(purple_presence_is_status_primitive_active(presence, + PurpleConversation *conv = NULL; + purple_debug_info("nomobility", "killing message!\n"); + conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, + msg = g_strdup_printf(_("Cancelled message to %s, they are currently " + purple_conv_im_write(PURPLE_CONV_IM(conv), receiver, msg, + PURPLE_MESSAGE_NO_LOG | PURPLE_MESSAGE_DELAYED, +/****************************************************************************** + *****************************************************************************/ +plugin_load(PurplePlugin *plugin) { + purple_signal_connect(purple_conversations_get_handle(), + "sending-im-msg", plugin, + PURPLE_CALLBACK(sending_im_msg), NULL); +plugin_unload(PurplePlugin *plugin) +static PurplePluginInfo info = + PURPLE_PLUGIN_STANDARD, + PURPLE_PRIORITY_DEFAULT, + "core-plugin_pack-nomobility", + "Gary Kramlich <grim@reaperworld.com>", +init_plugin(PurplePlugin *plugin) + bindtextdomain(GETTEXT_PACKAGE, PP_LOCALEDIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + info.name = _("nomobility"); + info.summary = _("Stops you from messaging mobile users"); + info.description = info.summary; +PURPLE_INIT_PLUGIN(nomobility, init_plugin, info) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nomobility/plugins.cfg Wed Nov 05 03:58:53 2008 -0500
@@ -0,0 +1,9 @@
+summary=Stops you from messaging mobile users