mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Sort Dumper output by keys
This commit is contained in:
parent
54f025e483
commit
55347ea463
@ -18,6 +18,7 @@ use strict;
|
||||
use Time::HiRes qw/gettimeofday/;
|
||||
use Time::Duration;
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
use Carp ();
|
||||
|
||||
sub new {
|
||||
@ -60,11 +61,12 @@ sub get_banlist {
|
||||
my ($self, $event_type, $event) = @_;
|
||||
my $channel = lc $event->{event}->{args}[1];
|
||||
|
||||
return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel);
|
||||
|
||||
delete $self->{banlist}->{$channel};
|
||||
|
||||
$self->{pbot}->{logger}->log("Retrieving banlist for $channel.\n");
|
||||
$event->{conn}->sl("mode $channel +b");
|
||||
$event->{conn}->sl("mode $channel +q");
|
||||
$event->{conn}->sl("mode $channel +bq");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ sub add {
|
||||
my ($self, $index_key, $hash) = @_;
|
||||
|
||||
if($self->load_hash_add($index_key, $hash, 0)) {
|
||||
$self->save_();
|
||||
$self->save();
|
||||
} else {
|
||||
return "Error occurred adding new $self->{name} object.";
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ use strict;
|
||||
use Carp();
|
||||
use Time::HiRes qw(gettimeofday);
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
|
||||
sub new {
|
||||
if(ref($_[1]) eq 'HASH') {
|
||||
|
@ -16,6 +16,7 @@ use strict;
|
||||
|
||||
use Text::Levenshtein qw/fastdistance/;
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
use Carp ();
|
||||
use Time::HiRes qw/gettimeofday/;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user