Commit Diff


commit - eea90820a6f32511908a6e1bd497f976a5d669ab
commit + 8054114ad960af0a6b1e98ae3b755a0ddecb78ef
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.");