git://git.camperquake.de
/
videosite.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use inline text for help message
[videosite.git]
/
videosite
/
Base.pm
diff --git
a/videosite/Base.pm
b/videosite/Base.pm
index
939e203
..
cf8bafa
100644
(file)
--- a/
videosite/Base.pm
+++ b/
videosite/Base.pm
@@
-5,6
+5,7
@@
package Base;
use strict;
use Irssi;
use strict;
use Irssi;
+use Data::Dumper;
sub new {
my $class = shift;
sub new {
my $class = shift;
@@
-20,8
+21,11
@@
sub new {
sub error {
my $self = shift;
my @data = @_;
sub error {
my $self = shift;
my @data = @_;
+ my $t;
- Irssi::print(sprintf(shift(@_), @_));
+ $t = sprintf(shift(@_), @_);
+ $t =~ s/%/%%/g;
+ Irssi::print($t);
}
sub debug {
}
sub debug {
@@
-62,8
+66,12
@@
sub _prepare_parameters {
sub _getval {
my $self = shift;
my $key = shift;
sub _getval {
my $self = shift;
my $key = shift;
+ my $val;
- return $self->{'_CONFIG'}->{'option'}->{$key}->{'content'}
+ $val = $self->{'_CONFIG'}->{'option'}->{$key}->{'content'};
+ $self->debug('Returning %s=%s', $key, $val);
+
+ return $val;
}
sub setval {
}
sub setval {
@@
-88,7
+96,7
@@
sub getconfstr {
$p = $self->{'_CONFIG'}->{'option'}->{$k}->{'content'};
$p =~ s/%/%%/g;
$s .= sprintf(" %s: %s", $k, $p);
$p = $self->{'_CONFIG'}->{'option'}->{$k}->{'content'};
$p =~ s/%/%%/g;
$s .= sprintf(" %s: %s", $k, $p);
- if ($self->{'_CONFIG'}->{'option'}->{$k}->{'content'}
==
$self->{'_PARAMS'}->{$k}->[0]) {
+ if ($self->{'_CONFIG'}->{'option'}->{$k}->{'content'}
eq
$self->{'_PARAMS'}->{$k}->[0]) {
$s .= " (default)\n";
} else {
$s .= "\n";
$s .= " (default)\n";
} else {
$s .= "\n";