X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite-irssi.pl;h=4d3f4817e1aa1f640b3ecb9f4d39213f58463384;hb=7480e9e58db677bad08a47364f20f3fc619fdaf2;hp=ecc7c401b5786704ac3d7a7763b60a2f1ade5305;hpb=5160262f35ac74f803164ac4e734381c7cea1c74;p=videosite.git diff --git a/videosite-irssi.pl b/videosite-irssi.pl index ecc7c40..4d3f481 100644 --- a/videosite-irssi.pl +++ b/videosite-irssi.pl @@ -140,10 +140,10 @@ sub config_get { my $val; - Irssi::settings_add_str('videosite', $item, "\0"); + Irssi::settings_add_str('videosite', $item, "\1"); $val = Irssi::settings_get_str($item); - return ($val ne "\0")?$val:undef; + return ($val ne "\1")?$val:undef; } # @@ -153,8 +153,8 @@ sub config_has { my $path = shift; my $item = join('.', 'videosite', @{$path}); - Irssi::settings_add_str('videosite', $item, "\0"); - return Irssi::settings_get_str($item) ne "\0"; + Irssi::settings_add_str('videosite', $item, "\1"); + return Irssi::settings_get_str($item) ne "\1"; } # @@ -165,18 +165,21 @@ sub config_set { my $value = shift; my $item = join('.', 'videosite', @{$path}); - Irssi::settings_add_str('videosite', $item, "\0"); + Irssi::settings_add_str('videosite', $item, "\1"); Irssi::settings_set_str($item, $value); } # # Delete a configuration value. Called by the core. # +# Now, according to the configuration Irssi::settings_remove() removes a +# config settings. This does not work in any irssi version available to me. +# So just set the key to the canary value. +# sub config_del { my $path = shift; - my $item = join('.', 'videosite', @{$path}); - Irssi::settings_remove($item); + config_set($path, "\1"); } #