]> ruin.nu Git - NDIRC.git/blobdiff - Commands/Usermgm.pm
Accept space in discord username
[NDIRC.git] / 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 ?});