add a missing return when the username is already in use
This commit is contained in:
parent
782c899a7f
commit
2a3b1087eb
1 changed files with 2 additions and 1 deletions
|
@ -143,6 +143,7 @@ sub received_packet($$) {
|
|||
|
||||
if($user_name_socket{$username}) {
|
||||
&send_error($sock, 'This username is already taken.');
|
||||
return;
|
||||
}
|
||||
|
||||
print STDERR "log in okay; telling to join lobby\n";
|
||||
|
@ -157,7 +158,7 @@ sub received_packet($$) {
|
|||
$socket_user_name{$sock} = $username;
|
||||
return;
|
||||
} else {
|
||||
&send_error($sock, 'You must login first');
|
||||
&send_error($sock, 'You must login first.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue