Opened 7 years ago

Last modified 5 years ago

#4482 closed defect

Nuke XmppClient GUIMessage struct — at Initial Version

Reported by: elexis Owned by:
Priority: Should Have Milestone: Alpha 23
Component: Multiplayer lobby Keywords:
Cc: Patch:

Description

The lobby xmpp code sends messages to JS via custom struct. But that is bad since it hardcodes a set of possible arguments. Some examples:

  • If someone changes the nickname, the old nick will be sent in text and the new name will be sent in data, entirely undescriptive
  • If someone is kicked (https://code.wildfiregames.com/D116), the nickname will be sent in text and the disconnect reason in the data` field

The custom struct is then parsed to a JS::MutableHandleValue in GuiPollMessage.

Instead we should create those JS values directly, thus allowing to easily add further arguments. It would also allow merging the "kick" and "ban" case and just pass another boolean.

The code will then appear comparable to CNetClient::GuiPoll and PushGuiMessage.

Change History (0)

Note: See TracTickets for help on using tickets.