Skip to content

Commit

Permalink
Fix the perlpod a bit, add VERSION/IRSSI, fix bad regex handling
Browse files Browse the repository at this point in the history
  • Loading branch information
aquanight committed Jun 25, 2012
1 parent 818aea2 commit 24a4857
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions perl/irssi/scrolling.pl
Expand Up @@ -10,8 +10,14 @@ =head1 Scrolling Script
This script adds a few enhancements to irssi scrollback.
=head2 Usage
Install into irssi script directory, and run /run scrolling. Then see below for commands and settings.
=head2 Commands
=over
=item /scrollback search
Syntax: /scrollback search [-forward] [-rx] <item>
Expand All @@ -22,10 +28,14 @@ =head2 Commands
The -rx switch causes <rx> to be treated as a regular expression.
=back
=head2 Settings
Several settings are added under the 'scrolling' header:
=over
=item auto_scrolldown
Boolean setting. If set, then the window is scrolled to the bottom when you send a line. Defaults to off.
Expand All @@ -48,8 +58,19 @@ =head2 Settings
above settings. If turned on, commands are affected, with the exception of the /scrollback command (so that you can
say '/scrollback end'). Note that in this case, /scrollback must be typed out: aliases will not work.
=back
=cut

our $VERSION = 1;

our %IRSSI = (
author => qw(aquanight),
license => 'public domain',
description => "Enhances irssi scrollback",
name => 'scrolling'
);

sub sig_send_cmd($$$)
{
my ($args, $server, $witem) = @_;
Expand Down Expand Up @@ -120,8 +141,9 @@ ($$$)
};
if ($@)
{
$@ =~ s/ at .* line \d+$//;
Irssi::print("Error in regular expression: $@");
$@ =~ s/ at .* line \d+\.$//;
Irssi::print("Error in regular expression: $@", MSGLEVEL_CLIENTERROR);
return;
}
}
else
Expand Down

0 comments on commit 24a4857

Please sign in to comment.