summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNico R. Wohlgemuth <nico@lifeisabug.com>2015-01-13 18:44:16 +0100
committerNico R. Wohlgemuth <nico@lifeisabug.com>2015-01-13 18:44:16 +0100
commitdfc65d959e474d1235f894dc3b5631cb7ad48c2c (patch)
treea0c7c8d0600a30fc7dfabd9c4afe3fcf96b07ccb /scripts
parentb2fe8611563c6478fd856f825eb5c5cc3e3f100b (diff)
downloadirssi-dfc65d959e474d1235f894dc3b5631cb7ad48c2c.zip
Remove splitlong.pl, it is enabled natively (#1)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am1
-rw-r--r--scripts/splitlong.pl60
2 files changed, 0 insertions, 61 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index b3c641b7..23eb7198 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -13,7 +13,6 @@ script_DATA = \
quitmsg.pl \
sb_search.pl \
scriptassist.pl \
- splitlong.pl \
usercount.pl
EXTRA_DIST = $(script_DATA)
diff --git a/scripts/splitlong.pl b/scripts/splitlong.pl
deleted file mode 100644
index e88840bc..00000000
--- a/scripts/splitlong.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-# /set splitlong_max_length
-# specifies the maximum length of a msg, automatically chosen when set to "0"
-# default: 0
-#
-# /set splitlong_line_start
-# /set splitlong_line_end
-# self-explanatory
-# defaults: "... ", " ..."
-###
-use strict;
-use vars qw($VERSION %IRSSI);
-
-use Irssi 20011001;
-
-$VERSION = "0.20";
-%IRSSI = (
- authors => "Bjoern \'fuchs\' Krombholz",
- contact => "bjkro\@gmx.de",
- name => "splitlong",
- licence => "Public Domain",
- description => "Split overlong PRIVMSGs to msgs with length allowed by ircd",
- changed => "Wed Jun 25 00:17:00 CET 2003",
- changes => "Actually the real 0.19 (now 0.20), but upload didn't work some month ago, target problem fixed..."
-);
-
-sub sig_command_msg {
- my ($cmd, $server, $winitem) = @_;
- my ( $param, $target,$data) = $cmd =~ /^(-\S*\s)?(\S*)\s(.*)/;
-
- my $maxlength = Irssi::settings_get_int('splitlong_max_length');
- my $lstart = Irssi::settings_get_str('splitlong_line_start');
- my $lend = Irssi::settings_get_str('splitlong_line_end');
-
- if ($maxlength == 0) {
- # 497 = 510 - length(":" . "!" . " PRIVMSG " . " :");
- $maxlength = 497 - length($server->{nick} . $server->{userhost} . $target);
- }
- my $maxlength2 = $maxlength - length($lend);
-
- if (length($data) > ($maxlength)) {
- my @spltarr;
-
- while (length($data) > ($maxlength2)) {
- my $pos = rindex($data, " ", $maxlength2);
- push @spltarr, substr($data, 0, ($pos < ($maxlength/10 + 4)) ? $maxlength2 : $pos) . $lend;
- $data = $lstart . substr($data, ($pos < ($maxlength/10 + 4)) ? $maxlength2 : $pos+1);
- }
-
- push @spltarr, $data;
- foreach (@spltarr) {
- Irssi::signal_emit("command msg", "$target $_", $server, $winitem);
- }
- Irssi::signal_stop();
- }
-}
-
-Irssi::settings_add_int('misc', 'splitlong_max_length', 0);
-Irssi::settings_add_str('misc', 'splitlong_line_start', "... ");
-Irssi::settings_add_str('misc', 'splitlong_line_end', " ...");
-Irssi::command_bind('msg', 'sig_command_msg');