aboutsummaryrefslogtreecommitdiffstats
path: root/feature-tests/scriptwatcher.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-12-02 11:36:29 +0000
committerTom Feist <shabble@metavore.org>2011-12-02 11:47:17 +0000
commit962dbea595b3d761f8ce66efe969b047a31b0778 (patch)
tree2dd393dd39fc402fdfa0d35a58bc758969fef382 /feature-tests/scriptwatcher.pl
parentrenamed foreach-guard to molly-guard and added a bunch of extra todo items. I... (diff)
downloadirssi-scripts-962dbea595b3d761f8ce66efe969b047a31b0778.tar.gz
irssi-scripts-962dbea595b3d761f8ce66efe969b047a31b0778.zip
Add a whole bunch of un-tracked files that need some looking at.
Diffstat (limited to '')
-rw-r--r--feature-tests/scriptwatcher.pl82
1 files changed, 82 insertions, 0 deletions
diff --git a/feature-tests/scriptwatcher.pl b/feature-tests/scriptwatcher.pl
new file mode 100644
index 0000000..9d92cb8
--- /dev/null
+++ b/feature-tests/scriptwatcher.pl
@@ -0,0 +1,82 @@
+=pod
+
+=head1 NAME
+
+template.pl
+
+=head1 DESCRIPTION
+
+A minimalist template useful for basing actual scripts on.
+
+=head1 INSTALLATION
+
+Copy into your F<~/.irssi/scripts/> directory and load with
+C</SCRIPT LOAD F<filename>>.
+
+=head1 USAGE
+
+None, since it doesn't actually do anything.
+
+=head1 AUTHORS
+
+Copyright E<copy> 2011 Tom Feist C<E<lt>shabble+irssi@metavore.orgE<gt>>
+
+=head1 LICENCE
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+=head1 BUGS
+
+=head1 TODO
+
+What the hell is this script for?
+
+=cut
+
+use strict;
+use warnings;
+
+use Irssi;
+use Irssi::Irc;
+use Irssi::TextUI;
+
+use Data::Dumper;
+
+our $VERSION = '0.1';
+our %IRSSI = (
+ authors => 'shabble',
+ contact => 'shabble+irssi@metavore.org',
+ name => '',
+ description => '',
+ license => 'MIT',
+ updated => '$DATE'
+ );
+Irssi::signal_register({ 'script error' => ['Irssi::Script', 'string'] });
+Irssi::signal_add_first 'script error', \&sig_script_error;
+
+sub sig_script_error {
+ my ($script, $msg) = @_;
+
+ $script //= 'nothing';
+ $msg //= 'empty';
+ print "Script is: " . Dumper($script);
+ print "Message is: $msg";
+
+
+}