diff --git a/Irpg/Main.pm b/Irpg/Main.pm index c18e08f7dda0d41a0372219b3994aa7a37331356..ef388f35f0edcb4c64134db2e909aa18bcbd7e87 100644 --- a/Irpg/Main.pm +++ b/Irpg/Main.pm @@ -262,6 +262,15 @@ sub rpcheck { # check levels, update database # there's really nothing to do here if there are no online users return unless $online; + # Sometimes an empty key is added in $rps + # while the origin of this problem is not found, + # here is a workaround + if (grep { $_ eq '' } keys %$rps) { + debug("Error: empty key in \%\$rps. Deleting."); + #print(Irpg::Utils::ts()."Error: empty key in \%\$rps. Deleting."); + delete $rps->{''}; + } + ### MOVING PLAYERS ### moveplayers();