libvideosite: rename reset hook to reload
[videosite.git] / videosite-weechat.pl
index 62c8870..0f51c5c 100644 (file)
@@ -1,5 +1,7 @@
-#!/usr/bin/perl -w
-
+# shim to connect libvideosite to weechat
+#
+# (c) 2007-2008 by Ralf Ertzinger <ralf@camperquake.de>
+# licensed under GNU GPL v2
 use strict;
 use File::Spec;
 use Module::Load;
@@ -65,9 +67,6 @@ sub config_del {
 sub colorpair {
     my ($fg, $bg) = @_;
 
-    $fg = defined($fg)?$fg:'default';
-    $bg = defined($bg)?$bg:'default';
-
     return weechat::color($fg . ",", $bg);
 }
 
@@ -117,6 +116,7 @@ sub videosite_reset {
         color => \&colorpair,
         module_path => sub { return File::Spec->catfile(weechat::info_get("weechat_dir", ""), 'perl') },
         quote => sub { return $_ },
+        reload => sub { weechat::print("", "Please use \"/script reload ...\" to reload") },
         _debug => sub { 1 },
     })) {
         weechat::print("", sprintf("videosite API register failed: %s", $libvideosite::error));