mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 10:59:29 +01:00
Use binary attribute for CSV
This commit is contained in:
parent
194bff37db
commit
7bb18e00a7
@ -729,7 +729,7 @@ sub check_bans {
|
|||||||
my ($nick) = $mask =~ m/^([^!]+)/;
|
my ($nick) = $mask =~ m/^([^!]+)/;
|
||||||
my %aliases = $self->{pbot}->{messagehistory}->{database}->get_also_known_as($nick);
|
my %aliases = $self->{pbot}->{messagehistory}->{database}->get_also_known_as($nick);
|
||||||
|
|
||||||
my $csv = Text::CSV->new;
|
my $csv = Text::CSV->new({binary => 1});
|
||||||
|
|
||||||
my ($do_not_validate, $bans);
|
my ($do_not_validate, $bans);
|
||||||
foreach my $alias (keys %aliases) {
|
foreach my $alias (keys %aliases) {
|
||||||
|
@ -1169,7 +1169,7 @@ sub get_also_known_as {
|
|||||||
my $nickserv_sth = $self->{dbh}->prepare('SELECT nickserv FROM Nickserv WHERE id = ?');
|
my $nickserv_sth = $self->{dbh}->prepare('SELECT nickserv FROM Nickserv WHERE id = ?');
|
||||||
my $gecos_sth = $self->{dbh}->prepare('SELECT gecos FROM Gecos WHERE id = ?');
|
my $gecos_sth = $self->{dbh}->prepare('SELECT gecos FROM Gecos WHERE id = ?');
|
||||||
|
|
||||||
my $csv = Text::CSV->new;
|
my $csv = Text::CSV->new({binary => 1});
|
||||||
|
|
||||||
foreach my $id (keys %ids) {
|
foreach my $id (keys %ids) {
|
||||||
$hostmask_sth->bind_param(1, $id);
|
$hostmask_sth->bind_param(1, $id);
|
||||||
@ -1329,7 +1329,7 @@ sub get_also_known_as {
|
|||||||
return %akas;
|
return %akas;
|
||||||
};
|
};
|
||||||
|
|
||||||
$self->{pbot}->{logger}->log($@) if $@;
|
$self->{pbot}->{logger}->log("bad aka: $@") if $@;
|
||||||
return %akas;
|
return %akas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user