/pidgin/main: ca3533cdddc7: Remove some perl plugins I missed
Gary Kramlich
grim at reaperworld.com
Wed Mar 9 10:33:58 EST 2016
Changeset: ca3533cdddc7e60f06812dc7e035c2e600aa15a6
Author: Gary Kramlich <grim at reaperworld.com>
Date: 2016-03-08 20:48 -0600
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/ca3533cdddc7
Description:
Remove some perl plugins I missed
diffstat:
libpurple/plugins/fortuneprofile.pl | 125 ------------------------------------
libpurple/plugins/test.pl | 42 ------------
2 files changed, 0 insertions(+), 167 deletions(-)
diffs (177 lines):
diff --git a/libpurple/plugins/fortuneprofile.pl b/libpurple/plugins/fortuneprofile.pl
deleted file mode 100644
--- a/libpurple/plugins/fortuneprofile.pl
+++ /dev/null
@@ -1,125 +0,0 @@
-# FORTUNE PROFILE
-#
-# Sets your AIM profile to a fortune (with a header and footer of your
-# choice).
-#
-
-# By Sean Egan
-# seanegan at gmail.com
-# AIM: SeanEgn
-#
-# Updated by Nathan Conrad, 31 January 2002
-# Changes:
-# * Fortunes have HTML tabs and newlines
-# AIM: t98502
-# ICQ: 16106363
-#
-# Updated by Mark Doliner, 15 October 2002
-# Changes:
-# * Modified to work with the changed perl interface of gaim 0.60
-# * Fixed a bug where your info would be set to nothing if you had
-# no pre and no post message
-# AIM: lbdash
-#
-# Updated by Christian Hammond, 20 August 2003
-# Changes:
-# * Modified to work with the changed perl interface of gaim 0.68
-# AIM: ChipX86
-
-# Copyright (C) 2001 Sean Egan
-
-# 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
-
-use Gaim;
-
-%PLUGIN_INFO = (
- perl_api_version => 2,
- name => "Fortune Profile",
- version => "3.4",
- summary => "Sets your AIM profile to a fortune (with a header and footer of your choice).",
- description => "Sets your AIM profile to a fortune (with a header and footer of your choice).",
- author => "Sean Egan <seanegan\@gmail.com>",
- url => "https://pidgin.im/",
-
- load => "plugin_load"
-);
-
-sub plugin_init {
- return %PLUGIN_INFO;
-}
-
-sub plugin_load {
- $plugin = shift;
-
- $tab = " ";
- $tab = $tab . $tab . $tab . $tab;
- $nl = "<BR>";
-
- $seconds = 30; # Delay before updating away messages.
- $max = 1020; # Max length of an profile. It should be
- # 1024, but I am being safe
- $pre_message = ""; # This gets added before the fortune
-
- $post_message ="";
-
- $len = 0;
- if ($pre_message ne "") {
- $len += length( $pre_message . "---$nl" );
- }
- if ($post_message ne "") {
- $len += length("---$nl" . $post_message);
- }
-
- # Command to get dynamic message from
- $command = "fortune -sn " . ($max - $len);
-
- # output the first message and start the timers...
- # This is done as a timeout to prevent attempts to set the
- # profile before logging in.
- Gaim::timeout_add($plugin, $seconds, \&update_away, 0);
-}
-
-sub update_away {
- # The fortunes are expanded into HTML (the tabs and newlines) which
- # causes the -s option of fortune to be a little bit meaningless. This
- # will loop until it gets a fortune of a good size (after expansion).
-
- do {
- do { #It's a while loop because it doesn't always work for some reason
- $fortune = `$command`;
- if ($? == -1) {
- return;
- }
- } while ($fortune eq "");
- $fortune =~ s/\n/$nl/g;
- $fortune =~ s/\t/$tab/g;
- } while ((length($fortune) + $len ) > $max);
-
- $message = $fortune;
- if ($pre_message ne "") {
- $message = $pre_message . "---$nl" . $message;
- }
- if ($post_message ne "") {
- $message = $message . "---$nl" . $post_message ;
- }
-
- foreach $account (Gaim::accounts()) {
- if ($account->is_connected()) {
- $account->set_user_info($message);
- }
- }
-
- Gaim::timeout_add($plugin, $seconds, \&update_away, 0);
-}
diff --git a/libpurple/plugins/test.pl b/libpurple/plugins/test.pl
deleted file mode 100644
--- a/libpurple/plugins/test.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-use Purple;
-
-%PLUGIN_INFO = (
- perl_api_version => 2,
- name => 'Test Perl Plugin',
- version => '1.0',
- summary => 'Provides as a test base for the perl plugin.',
- description => 'Provides as a test base for the perl plugin.',
- author => 'Etan Reisner <deryni\@pidgin.im>',
- url => 'https://pidgin.im',
-
- load => "plugin_load"
-);
-
-sub plugin_init {
- return %PLUGIN_INFO;
-}
-
-sub account_status_cb {
- my ($account, $old, $new, $data) = @_;
-
- Purple::Debug::info("perl test plugin", "In account_status_cb\n");
-
- Purple::Debug::info("perl test plugin", "Account " .
- $account->get_username() . " changed status.\n");
- Purple::Debug::info("perl test plugin", $data . "\n");
-}
-
-sub plugin_load {
- my $plugin = shift;
-
- Purple::Debug::info("perl test plugin", "plugin_load\n");
-
- Purple::Debug::info("perl test plugin", "Listing accounts.\n");
- foreach $account (Purple::Accounts::get_all()) {
- Purple::Debug::info("perl test plugin", $account->get_username() . "\n");
- }
-
- Purple::Signal::connect(Purple::Accounts::get_handle(),
- "account-status-changed", $plugin,
- \&account_status_cb, "test");
-}
More information about the Commits
mailing list