summaryrefslogtreecommitdiffstats
path: root/irssi/scripts/autowrap.pl
diff options
context:
space:
mode:
Diffstat (limited to 'irssi/scripts/autowrap.pl')
-rw-r--r--irssi/scripts/autowrap.pl38
1 files changed, 0 insertions, 38 deletions
diff --git a/irssi/scripts/autowrap.pl b/irssi/scripts/autowrap.pl
deleted file mode 100644
index c110c91..0000000
--- a/irssi/scripts/autowrap.pl
+++ /dev/null
@@ -1,38 +0,0 @@
-use strict;
-use Text::Wrap;
-
-use vars qw($VERSION %IRSSI);
-$VERSION = '2007031900';
-%IRSSI = (
- authors => 'Bitt Faulk',
- contact => 'lxsfx3h02@sneakemail.com',
- name => 'autowrap',
- description => 'Automatically wraps long sent messages into multiple shorter sent messages',
- license => 'BSD',
- url => 'none',
- modules => 'Text::Wrap',
-);
-
-sub event_send_text () {
- my ($line, $server_rec, $wi_item_rec) = @_;
- my @shortlines;
- if (length($line) <= 400) {
- return;
- } else {
- # split line, recreate multiple "send text" events
- local($Text::Wrap::columns) = 400;
- @shortlines = split(/\n/,wrap('','',$line));
- foreach (@shortlines) {
- if ($_ >= 400) {
- Irssi::print("autowrap: unable to split long line. sent as-is");
- return;
- }
- }
- foreach (@shortlines) {
- Irssi::signal_emit('send text', $_, $server_rec, $wi_item_rec);
- }
- Irssi::signal_stop();
- }
-}
-
-Irssi::signal_add_first('send text', "event_send_text");