]> ruin.nu Git - NDIRC.git/commitdiff
Accept space in discord username
authorMichael Andreen <harv@ruin.nu>
Mon, 26 Jul 2021 17:59:14 +0000 (19:59 +0200)
committerMichael Andreen <harv@ruin.nu>
Mon, 26 Jul 2021 17:59:14 +0000 (19:59 +0200)
Commands/Usermgm.pm

index e530b84c8ac8049c8a35050d3670e25809ae9e30..f6da052fd468afbbddfd8b8d531906746239add2 100644 (file)
@@ -429,7 +429,7 @@ command setdiscordid => {
        acl => q(bot_setdiscordid)
 }, class extends NDIRC::Command {
        method execute ($c,$msg) {
-               my ($nick,$discordid) = $msg =~ /^(\S+) (\S+)$/ or die 'ARGS';
+               my ($nick,$discordid) = $msg =~ /^(\S+) (.+#\d+)$/ or die 'ARGS';
                my $dbh = $c->model;
 
                my $f = $dbh->prepare(q{SELECT uid,username FROM users WHERE username ILIKE ?});