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:
parent
6ce05f5a05
commit
9f23aef2d0
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user