Display a nice error message when trying to register too many lobby accounts

(This is a workaround that will be removed when gloox has fixed the
issue.)

Reviewed by: elexis
Refs #3771
Differential Revision: https://code.wildfiregames.com/D87
This was SVN commit r19205.
This commit is contained in:
Imarok 2017-02-07 15:05:26 +00:00
parent 2fabe80b20
commit 0e2d2610c9
3 changed files with 5 additions and 4 deletions

View File

@ -162,7 +162,8 @@ function onTick()
case "error":
case "disconnected":
{
Engine.GetGUIObjectByName("feedback").caption = message.text;
Engine.GetGUIObjectByName("feedback").caption = message.text ||
translate("Unknown error. This usually occurs because the same IP address is not allowed to register more than one account within one hour.");
g_DisplayingSystemMessage = true;
Engine.StopXmppClient();
break;

View File

@ -8,7 +8,7 @@
<!-- Add a translucent black background to fade out the menu page -->
<object type="image" z="0" sprite="ModernFade"/>
<object name="dialog" type="image" style="ModernDialog" size="50%-230 50%-120 50%+230 50%+120">
<object name="dialog" type="image" style="ModernDialog" size="50%-230 50%-130 50%+230 50%+130">
<action on="Tick">
onTick();
@ -92,7 +92,7 @@
</object>
</object>
<object name="feedback" type="text" size="50 100%-90 100%-50 100%-50" style="ModernLabelText" textcolor="red" text_align="center"/>
<object name="feedback" type="text" size="50 100%-110 100%-50 100%-50" style="ModernLabelText" textcolor="red" text_align="center"/>
<object name="cancel" type="button" size="18 100%-45 50%-5 100%-17" style="ModernButtonRed" hotkey="cancel">
<translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">

View File

@ -1094,7 +1094,7 @@ std::string XmppClient::RegistrationResultToString(gloox::RegistrationResult res
DEBUG_CASE(RegistrationUnexpectedRequest, "This client is unregistered with the server");
DEBUG_CASE(RegistrationNotAllowed, "Server does not permit password changes");
default:
return g_L10n.Translate("Unknown error");
return "";
}
#undef DEBUG_CASE
#undef CASE