X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite.pl;h=cf47cc6f1a4c3e8c30a0dfc280ad00fea102fe71;hb=ceaa51ce71b9531ca0f088d106f4c62b99638bda;hp=ec41009d2a5310862358088f96961911fc7f17e8;hpb=12db405291947c6b02c2555051c3dc52f3995cbc;p=videosite.git diff --git a/videosite.pl b/videosite.pl index ec41009..cf47cc6 100644 --- a/videosite.pl +++ b/videosite.pl @@ -6,7 +6,15 @@ # Based on youtube.pl by Christian Garbs # which in turn is # based on trigger.pl by Wouter Coekaerts -# This is helena + + +BEGIN { + # Get rid of a (possibly old) version of BettIrssi + # This is a hack to prevent having to reload irssi just + # because BettIrssi.pm changed + + delete($INC{'BettIrssi.pm'}); +} use strict; use Irssi 20020324 qw (command_bind command_runsub signal_add_first signal_add_last); @@ -14,8 +22,7 @@ use vars qw($VERSION %IRSSI); use XML::Simple; use Data::Dumper; use File::Spec; -delete($INC{'BettIrssi.pm'}); -use BettIrssi qw(_bcb _bcs); +use BettIrssi 101 qw(_bcb _bcs); my @grabbers; my @getters; @@ -51,6 +58,7 @@ signal_add_last(_bcs("message irc action" => sub {check_for_link(@_)})); signal_add_last(_bcs("message irc own_action" => sub {check_for_link(@_)})); # For tab completion +# This does not use BettIrssi (yet) signal_add_first('complete word', \&sig_complete); sub push_output { @@ -154,6 +162,8 @@ sub check_for_link { return; } + push_output($event->ewpf); + study($message); # Offer the message to all Grabbers in turn @@ -180,6 +190,8 @@ sub check_for_link { ($m, $p) = $g->get($message); } } + + pop_output(); } sub cmd_save { @@ -497,9 +509,13 @@ sub cmdhandler { my $event = shift; my ($cmd, @params) = split(/\s+/, $event->message()); + push_output($event->ewpf); + if (exists($videosite_commands->{$cmd})) { $videosite_commands->{$cmd}->(@params); } + + pop_output(); } unshift(@INC, $scriptdir);