Do not construct objects if they only contain two atomic elements.
Revert getDisconnectReason so as to have a custom message for the error
case. Add a warning.
This was SVN commit r17601.
Based on existing code that was still around from an old(not working)
implementation.
Supports basic control from trigger scirpts (queue, start and stop
camera paths) and works in multiplayer.
This was SVN commit r17594.
Create an object holding the handling of all netmessage types.
Display private messages sent by moderators.
Details:
Switch back the second and third argument of CreateSimpleMessage, so it
relates again to the switch/object.
Reduce the dimension/nesting of the object/switch from three to two.
Hence remove the useless "standard" and "internal" value send in the
text field.
Rename CreateSimpleMessage to CreateGUIMessage
Use the property "level" instead of "text" for "connect" and
"disconnect".
Remove the handling of the "connect" event in lobby.js, since it is
never called.
Translate the disconnect event.
Add comments and explicit checks to handleMessage and handleMUCMessage
to make obvious where they differ.
Remove the "message" property from those GUI messages, since it should
just use "text".
Move the login-fail handling to JS.
Remove useless sprintf calls from warning messages.
Inline some variables.
Add missing semicolons.
This was SVN commit r17581.
Rename ratio to rate.
Simplify translation.
Round in GUI, not simulation.
Check for div/0.
Fix wrong variable name in test_GuiInterface.js.
This was SVN commit r17580.
It can only be built while ashoka is alive.
Previously the structure was selectable from the panel but not placable
while he was absent.
This was SVN commit r17577.
Transform switch-statements into objects.
Make them more consistent, in particular the kick/ban and
ready-messages.
Also colorizes the playername in disconnect messages.
Fix a wrong comment in the network code and remove a duplicate check
(AIs).
This was SVN commit r17568.
Transform trivial switch-statements to objects.
Move removeOldChatMessage right below addChatMessage, since it is only
used there.
This was SVN commit r17566.
Unify switch-statement using objects.
Do not parse recursively, but do a linear 2-step process. Remove msg.me
property and move "/me" parsing out of that function.
Early return instead of using msg.hide.
Add observer-checks for private messages to impede abuse and fix#3270.
Remove the "/all" command, since it doesn't add functionality but
complexity.
Remove a TODO as displaying multiple contexts ("/team /allies text"?) is
not useful currently and made the previous code error-prone.
This was SVN commit r17565.
Move formating of resource-amounts to new function
translateResourceAmounts.
Rename player/player1 to sourcePlayer/targetPlayer.
Inline colorizedPlayername.
This was SVN commit r17556.
Move new objects to globals, which makes the code easier to read,
changable for mods and saves performance.
Move cheat functions below variable declarations.
Remove old function formatClientList, which for any reason didn't make
it into last commit.
This was SVN commit r17555.
Add two missing semicolons and remove an unnecessary one.
Eliminate formatClientList, message, formattedUsername and
formattedUsernamePrefix.
Move four hardcoded colors to globals.
This was SVN commit r17554.
Move the code to update the idle-traders text to two new simplified
functions.
Eliminate all if-statements (including quadruple-nested ones).
This was SVN commit r17553.