commit fd105d18cd34566946742b9e99f4775fc832a9c0 from: Izzy Blacklock date: Thu Aug 03 01:53:56 2023 UTC Added some debug messages commit - 4a5edd448d52226ffcd9d73879c2da2ba176d856 commit + fd105d18cd34566946742b9e99f4775fc832a9c0 blob - dc9f1090d4b06b1d342c5e940e1234a93ce4349f blob + a0df5ecfc0fe548f08e71c1dc65c8a1525011119 --- lib/BotNow/BNC.pm +++ lib/BotNow/BNC.pm @@ -143,7 +143,7 @@ sub mbnc { foreach my $row (@rows) { my $password = BotNow::SQLite::get("bnc", "ircid", $row->{id}, "password"); if (defined($password)) { - debug(ALL, "NOTE--> Found Existing Hostmask with a password. Account rejected!"); + debug(INFO, "REJECTED--> Found Existing Hostmask '$hostmask' with a password. Account rejected!"); IRCNOW::IO::IRC::putserv($bot, "PRIVMSG $nick :Sorry, only one account per person. Please contact staff if you need help."); return; } @@ -155,6 +155,7 @@ sub mbnc { my $ircid = BotNow::SQLite::id("irc", "nick", $nick, $expires); my $captcha = BotNow::SQLite::get("bnc", "ircid", $ircid, "captcha"); if ($text ne $captcha) { + debug(INFO, "REJECTED--> Wrong captcha - Expected: $captcha - received: $text"); IRCNOW::IO::IRC::putserv($bot, "PRIVMSG $nick :Wrong captcha. To get a new captcha, type !bnc "); return; } @@ -195,7 +196,8 @@ sub mbnc { foreach my $row (@userrows) { my $password = BotNow::SQLite::get("bnc", "ircid", $row->{id}, "password"); if (defined($password)) { - debug(ALL, "NOTE--> Found Existing username with a password. Account rejected!"); + + debug(INFO, "REJECTED--> Found Existing username '$username' with a password."); IRCNOW::IO::IRC::putserv($bot, "PRIVMSG $nick :Sorry, only one account per person. Please contact staff if you need help."); return; } @@ -204,7 +206,7 @@ sub mbnc { foreach my $row (@userrows) { my $password = BotNow::SQLite::get("bnc", "ircid", $row->{id}, "password"); if (defined($password)) { - debug(ALL, "NOTE--> Found Existing email with a password. Account rejected!"); + debug(INFO, "REJECTED--> Found Existing email '$email' with a password."); IRCNOW::IO::IRC::putserv($bot, "PRIVMSG $nick :Sorry, only one account per person. Please contact staff if you need help."); return; }