mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 19:52:34 +01:00
HashObjects, Users: use :
instead of =>
as output separator
This commit is contained in:
parent
0977f9aa1e
commit
aff8a38f19
@ -231,7 +231,7 @@ sub set {
|
|||||||
my $comma = '';
|
my $comma = '';
|
||||||
foreach my $key (sort keys %{$self->{hash}->{$lc_primary_index}->{$lc_secondary_index}}) {
|
foreach my $key (sort keys %{$self->{hash}->{$lc_primary_index}->{$lc_secondary_index}}) {
|
||||||
next if $key eq '_name';
|
next if $key eq '_name';
|
||||||
$result .= $comma . "$key => " . $self->{hash}->{$lc_primary_index}->{$lc_secondary_index}->{$key};
|
$result .= $comma . "$key: " . $self->{hash}->{$lc_primary_index}->{$lc_secondary_index}->{$key};
|
||||||
$comma = ";\n";
|
$comma = ";\n";
|
||||||
}
|
}
|
||||||
$result .= "none" if ($comma eq '');
|
$result .= "none" if ($comma eq '');
|
||||||
|
@ -146,7 +146,7 @@ sub set {
|
|||||||
my $result = "[$self->{name}] " . $self->get_key_name($lc_index) . " keys: ";
|
my $result = "[$self->{name}] " . $self->get_key_name($lc_index) . " keys: ";
|
||||||
my $comma = '';
|
my $comma = '';
|
||||||
foreach my $k (sort grep { $_ ne '_name' } keys %{$self->{hash}->{$lc_index}}) {
|
foreach my $k (sort grep { $_ ne '_name' } keys %{$self->{hash}->{$lc_index}}) {
|
||||||
$result .= $comma . "$k => " . $self->{hash}->{$lc_index}->{$k};
|
$result .= $comma . "$k: " . $self->{hash}->{$lc_index}->{$k};
|
||||||
$comma = ";\n";
|
$comma = ";\n";
|
||||||
}
|
}
|
||||||
$result .= "none" if ($comma eq '');
|
$result .= "none" if ($comma eq '');
|
||||||
|
@ -294,7 +294,7 @@ sub cmd_userset {
|
|||||||
|
|
||||||
my $result = $self->{users}->set($name, $key, $value);
|
my $result = $self->{users}->set($name, $key, $value);
|
||||||
print "result [$result]\n";
|
print "result [$result]\n";
|
||||||
$result =~ s/^password => .*;?$/password => <private>;/m;
|
$result =~ s/^password: .*;?$/password: <private>;/m;
|
||||||
|
|
||||||
if (defined $key and ($key eq 'channels' or $key eq 'hostmasks') and defined $value) {
|
if (defined $key and ($key eq 'channels' or $key eq 'hostmasks') and defined $value) {
|
||||||
$self->rebuild_user_index;
|
$self->rebuild_user_index;
|
||||||
@ -411,7 +411,7 @@ sub cmd_my {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result .= $self->{users}->set($name, $key, $value);
|
$result .= $self->{users}->set($name, $key, $value);
|
||||||
$result =~ s/^password => .*;?$/password => <private>;/m;
|
$result =~ s/^password: .*;?$/password: <private>;/m;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user