HomeWildfire Games

Major lobby cleanup.


Major lobby cleanup.

Create an object holding the handling of all netmessage types.
Display private messages sent by moderators.

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.


elexisDec 31 2015, 6:08 PM
rP17580: Repairrate cleanup. Refs #3395, patch by bb.

Event Timeline

elexis added a subscriber: elexis.Nov 4 2018, 9:47 PM
elexis added inline comments.

It's a WFG lobby policy that we don't want PMs between users on our server.
But it's not quite right to implement it on the client, it should be restricted on the server, since a mod can easily remove this one line, since other xmpp clients can be used and since other servers may want to support this policy-wise.

Perhaps this ejabberd module could do it https://www.ejabberd.im/mod_filter/index.html and be explained in the lobby README.md.