3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 11:42:35 +01:00

Random IRC nicks cannot start with a digit

This commit is contained in:
Pragmatic Software 2015-02-14 04:01:09 -08:00
parent 6ce05f5a05
commit 9f23aef2d0

View File

@ -153,8 +153,8 @@ sub initialize {
sub random_nick { sub random_nick {
my @chars = ("A".."Z", "a".."z", "0".."9"); my @chars = ("A".."Z", "a".."z", "0".."9");
my $nick; my $nick = $chars[rand @chars - 10]; # nicks cannot start with a digit
$nick .= $chars[rand @chars] for 1..10; $nick .= $chars[rand @chars] for 1..9;
return $nick; return $nick;
} }