X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite.pl;h=58e4c967392f8294fdc2c6957b3264aac4e42a1e;hb=8d50f5899779ce95b75f3ebdff0c408e9b4b7dca;hp=620c2cf53279b420a7cd36617fdb40b40935835a;hpb=4335bdfc004d11d8faf5156db8dcb9475d38e453;p=videosite.git diff --git a/videosite.pl b/videosite.pl index 620c2cf..58e4c96 100644 --- a/videosite.pl +++ b/videosite.pl @@ -1,6 +1,6 @@ # autodownload flash videos # -# (c) 2007 by Ralf Ertzinger +# (c) 2007-2008 by Ralf Ertzinger # licensed under GNU GPL v2 # # Based on youtube.pl by Christian Garbs @@ -42,6 +42,8 @@ sub write_irssi { my $witem = shift; my @text = @_; + $text[0] = 'videosite: ' . $text[0]; + if (defined $witem) { $witem->print(sprintf(shift(@text), @text), MSGLEVEL_CLIENTCRAP); } else { @@ -50,12 +52,6 @@ sub write_irssi { } -sub write_verbose { - if (Irssi::settings_get_bool('youtube_verbose')) { - write_irssi(shift, @_); - } -} - sub write_debug { if ($debug) { write_irssi(shift, @_); @@ -103,9 +99,9 @@ sub cmd_save { close(CONF); }; if ($@) { - write_irssi(undef, 'Could not save config: %s', $@); + write_irssi(undef, 'Could not save config to %s: %s', ($conffile, $@)); } else { - write_irssi(undef, 'Saved config'); + write_irssi(undef, 'configuration saved to %s', $conffile); } } @@ -279,6 +275,8 @@ sub init_videosite { Irssi::signal_add_first('command script load', 'sig_command_script_unload'); Irssi::signal_add_first('command script unload', 'sig_command_script_unload'); + Irssi::signal_add('setup saved', 'cmd_save'); + Irssi::command_bind('videosite' => \&cmdhandler); }