pidgin/purple-plugin-pack
remove the nomobility plugin as it's incomplete and unlikely to be completed
--- a/meson.build Sun Mar 01 18:47:15 2020 -0600
+++ b/meson.build Sun Mar 01 18:48:25 2020 -0600
@@ -184,7 +184,6 @@
--- a/nomobility/README.md Sun Mar 01 18:47:15 2020 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-Stops you from messaging mobile users.
--- a/nomobility/meson.build Sun Mar 01 18:47:15 2020 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-if TYPES.contains('incomplete') and PURPLE.found()
- nomobility = shared_library('nomobility',
- dependencies : [PURPLE, GLIB],
- install_dir : PURPLE_LIBDIR)
- PP_PURPLE_BUILD += 'nomobility'
--- a/nomobility/nomobility.c Sun Mar 01 18:47:15 2020 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,314 +0,0 @@
- * 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>
-/******************************************************************************
- *****************************************************************************/
-#define NO_MOBILITY_QUEUE_KEY "no-mobility"
-#define NO_MOBILITY_COMMAND "mobile"
-static PurpleCmdId nomobility_cmd_id = 0;
-/******************************************************************************
- *****************************************************************************/
-nomobility_list_messages(PurpleConversation *conv, GList *queue) {
- const gchar *name = purple_conversation_get_name(conv);
- purple_conv_im_write(PURPLE_CONV_IM(conv), name,
- _("There are no messages in the queue."),
- PURPLE_MESSAGE_NO_LOG, time(NULL));
- for(l = queue; l; l = l->next, i++) {
- gchar *msg = g_strdup_printf(_("%d. %s"), i + 1, (gchar *)l->data);
- purple_conv_im_write(PURPLE_CONV_IM(conv), name, msg,
- PURPLE_MESSAGE_NO_LOG, time(NULL));
-nomobility_clear(PurpleConversation *conv, GList *queue) {
- for(l = queue; l; l = l->next)
- purple_conversation_set_data(conv, NO_MOBILITY_QUEUE_KEY, NULL);
-nomobility_send(PurpleConversation *conv, GList *queue) {
- GString *str = g_string_new("");
- for(l = queue; l; l = l->next) {
- gchar *msg = (gchar *)l->data;
- const gchar *suffix = (l->next) ? "\n" : "";
- g_string_append_printf(str, "%s%s", msg, suffix);
- purple_conv_im_send(PURPLE_CONV_IM(conv), str->str);
- g_string_free(str, TRUE);
- nomobility_clear(conv, queue);
-nomobility_delete(PurpleConversation *conv, GList *queue, gint n_msg) {
- for(l = queue; i < n_msg - 1; i++, l = l->next);
- queue = g_list_remove(queue, l);
- purple_conversation_set_data(conv, NO_MOBILITY_QUEUE_KEY, queue);
-/******************************************************************************
- *****************************************************************************/
-sending_im_msg(PurpleAccount *account, gchar *receiver, gchar **message,
- PurpleBuddy *buddy = NULL;
- PurplePresence *presence = NULL;
- if(!message || !*message)
- buddy = purple_find_buddy(account, receiver);
- presence = purple_buddy_get_presence(buddy);
- if(purple_presence_is_status_primitive_active(presence,
- PurpleConversation *conv = NULL;
- msg = g_strdup_printf(_("Cancelled message to %s, they are currently "
- conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM,
- /* if we have the account, add the message to our queue */
- queue = purple_conversation_get_data(conv, NO_MOBILITY_QUEUE_KEY);
- queue = g_list_append(queue, g_strdup(*message));
- purple_conversation_set_data(conv, NO_MOBILITY_QUEUE_KEY, queue);
- /* now actually kill the message */
- /* if we failed to find the conv, write a debug message and bail */
- purple_debug_info("nomobility", "%s\n", msg);
- /* we have a conv, so note that we queue the message in conv */
- purple_conv_im_write(PURPLE_CONV_IM(conv), receiver, msg,
- PURPLE_MESSAGE_NO_LOG | PURPLE_MESSAGE_DELAYED,
-nomobility_cmd(PurpleConversation *conv, const gchar *cmd, gchar **args,
- gchar **error, gpointer data)
- if(!*args && !args[0]) {
- *error = g_strdup("eek!");
- return PURPLE_CMD_RET_FAILED;
- queue = purple_conversation_get_data(conv, NO_MOBILITY_QUEUE_KEY);
- lower = g_ascii_strdown(args[0], strlen(args[0]));
- if(strcmp(lower, "clear") == 0) {
- nomobility_clear(conv, queue);
- } else if(strcmp(lower, "delete") == 0) {
- *error = g_strdup(_("Delete failed: no message number given!"));
- return PURPLE_CMD_RET_FAILED;
- if(n_msg < 0 || n_msg >= g_list_length(queue)) {
- g_strdup_printf(_("Delete failed: no messaged numbered %d!"),
- return PURPLE_CMD_RET_FAILED;
- nomobility_delete(conv, queue, n_msg);
- } else if(strcmp(lower, "list") == 0) {
- nomobility_list_messages(conv, queue);
- } else if(strcmp(lower, "sendall") == 0) {
- nomobility_send(conv, queue);
- return PURPLE_CMD_RET_OK;
-/******************************************************************************
- *****************************************************************************/
-plugin_load(PurplePlugin *plugin) {
- PurpleCmdFlag flags = PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS;
- void *conv_handle = purple_conversations_get_handle();
- purple_signal_connect(conv_handle, "sending-im-msg", plugin,
- PURPLE_CALLBACK(sending_im_msg), NULL);
- help = g_strdup_printf(_("%s <[clear][clear][delete][send]>\n"
- "clear Clears all queued messages\n"
- "delete # Deletes the message numbered #\n"
- "list Lists all queued messages\n"
- "sendall Sends all queued messages\n"),
- purple_cmd_register(NO_MOBILITY_COMMAND, "ws", PURPLE_CMD_P_PLUGIN,
- PURPLE_CMD_FUNC(nomobility_cmd), help, 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 = _("No Mobility");
- info.summary = _("Stops you from messaging mobile users");
- info.description = info.summary;
-PURPLE_INIT_PLUGIN(nomobility, init_plugin, info)