Commit Diff
Diff:
eea90820a6f32511908a6e1bd497f976a5d669ab
8054114ad960af0a6b1e98ae3b755a0ddecb78ef
Commit:
8054114ad960af0a6b1e98ae3b755a0ddecb78ef
Tree:
b6023d271bc708c5de4123a044b2e53592b088cd
Author:
jrmu <jrmu@ircnow.org>
Committer:
jrmu <jrmu@ircnow.org>
Date:
Sun Feb 26 04:46:54 2023 UTC
Message:
Fixed BNC.pm bug
blob - 320f8281230c2a274f36c53e034ae8054d802112
blob + f9b8e901def85a934f114b68d182c51f572e385f
--- BNC.pm
+++ BNC.pm
@@ -163,9 +163,15 @@ sub mbnc {
} elsif ($text =~ /^([[:alnum:]]+)\s+([[:ascii:]]+)/) {
my ($username, $email) = ($1, $2);
my @userrows = SQLite::selectrows("bnc", "username", $username);
+ foreach my $row (@userrows) {
+ my $password = SQLite::get("bnc", "ircid", $row->{id}, "password");
+ if (defined($password)) {
+ main::putserv($bot, "PRIVMSG $nick :Sorry, only one account per person. Please contact staff if you need help.");
+ return;
+ }
+ }
my @emailrows = SQLite::selectrows("bnc", "email", $email);
- my @rows = push(@userrows, @emailrows);
- foreach my $row (@rows) {
+ foreach my $row (@userrows) {
my $password = SQLite::get("bnc", "ircid", $row->{id}, "password");
if (defined($password)) {
main::putserv($bot, "PRIVMSG $nick :Sorry, only one account per person. Please contact staff if you need help.");
IRCNow