Commit Graph

79 Commits

Author SHA1 Message Date
5e39b717aa Fix compilation with ICU 61
Initial patch by: elexis
Reviewed By: mapkoc, elexis
Fixes: #5114
Differential Revision: https://code.wildfiregames.com/D1436
This was SVN commit r21688.
2018-04-10 18:13:32 +00:00
0fd8aa2a77 Secure lobby authentication - prevent joins as a different player
Reviewed by: Dunedan, elexis, Itms
Fixes #3549
Differential Revision: https://code.wildfiregames.com/D897
This was SVN commit r21520.
2018-03-12 00:23:40 +00:00
eca956a513 Check lobby games for incompatible mods
Reviewed by: elexis
Fixes #3370
Differential Revision: https://code.wildfiregames.com/D931
This was SVN commit r21301.
2018-02-21 17:27:33 +00:00
5c605cf218 Allow the JS GUI to find out if the lobby client is currently disconnected.
Differential Revision: https://code.wildfiregames.com/D1224
Patch By: fpre / ffffffff
Refs #4106, D817

This was SVN commit r20872.
2018-01-15 04:30:33 +00:00
11bcc7c0e7 Solve some issues reported on Transifex, and update translation files
This was SVN commit r20781.
2018-01-07 00:10:14 +00:00
f352d20e17 Support both DateTime formats of XEP-0082 in the lobby, refs #3156, f2c76cc75d, 6141c5c4fa, f27efac053.
Patch By: Dunedan
Fixes #4920.
Differential Revision: https://code.wildfiregames.com/D1197
This was SVN commit r20776.
2018-01-06 16:09:10 +00:00
7b93690c76 Fix few typos found with the Debian lintian tool.
Differential Revision: https://code.wildfiregames.com/D973
Differential Revision: https://code.wildfiregames.com/D974
Differential Revision: https://code.wildfiregames.com/D975
Patch By: LudovicRousseau
Reviewed By: Dunedan, bb
This was SVN commit r20369.
2017-10-28 22:34:57 +00:00
5f0a0fbbef Add id for IQ stanzas
Patch by: Dunedan
Differential Revision: https://code.wildfiregames.com/D899
This was SVN commit r20321.
2017-10-21 14:11:25 +00:00
e8dfde9ba6 Display previously received lobby chat messages when returning from the gamesetup.
Differential Revision: https://code.wildfiregames.com/D819
Fixes #3306
Patch By: fpre / ffffffff
This was SVN commit r20070.
2017-08-29 16:04:45 +00:00
0940db3fc0 XmppClient cleanup.
Allow XmppClient to use arbitrary property names in GUIMessages.
Remove duplication by calling CreateGUIMessage when receiving chat
messages.
Inline PushGUINotification.
Use std::string in the GUIMessage because every data source is of that
type.
Apply the wstring_from_utf8 conversion to ensure correct display of less
common UTF characters instead in the GuiPollMessage method.
Add room subject change chat message.

Differential Revision: https://code.wildfiregames.com/D835
Refs #4482
Comments by fpre, Vladislav and leper

This was SVN commit r20064.
2017-08-28 17:47:43 +00:00
16b976fc35 Remove unneeded GetMucMessageCount from the XmppClient.
The affected function was imprecise, because it called a playerlist
update whenever a "chat" level message was received instead
of only updating the playerlist if it's actually influencing the
displayed playerlist.
When there is a chat message, lobby subject change or user-role change,
there is no need to update the list.

Differential Revision: https://code.wildfiregames.com/D671
Refs #3386, 8b437a0b1c
Reviewed By: fpre / ffffffff
This was SVN commit r20040.
2017-08-25 18:51:26 +00:00
f27efac053 Enhance lobby / XMPP timestamp parsing documentation.
Refs #3832, 9a5e1ddedb / D760, 6141c5c4fa / D514
Reviewed By: leper
This was SVN commit r20032.
2017-08-24 20:57:21 +00:00
9defd11440 Pass ScriptInterface as a const ref where possible.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D739
This was SVN commit r20028.
2017-08-24 00:32:42 +00:00
9a5e1ddedb Fix BSD and OSX build that don't provide the AT&T version of timezone used by 6141c5c4fa. Refs #3832, D514.
Mostly reviewed by: leper
Tested on Windows by: Stan
This was SVN commit r19947.
2017-08-07 09:56:31 +00:00
9641d0cdb0 Fix typo in 39fcd1d031 reported by Imarok.
This was SVN commit r19941.
2017-07-31 16:33:14 +00:00
6141c5c4fa Correct lobby chat timestamps.
Only historic messages were timestamped in C++ prior.
Other messages showed the timestamp when they were displayed in JS,
which is wrong in case of returning to the lobby from a game.

Differential Revision: https://code.wildfiregames.com/D514
Fixes #3832.
Reverts the revert of 1f34a004e5 in 572847ddd4.
Patch By: Josh
Tested By: Itms
This was SVN commit r19801.
2017-06-18 18:48:18 +00:00
b19612c31a Fix whitespace and three refs instead of copies in the glooxwrapper/StunClient code identified by leper in 61261d14fc.
This was SVN commit r19741.
2017-06-05 20:44:00 +00:00
61261d14fc STUN + XMPP ICE implementation.
Allows lobby players to host games without having to configure their
router.

Differential Revision: https://code.wildfiregames.com/D364
Fixes #2305
Patch By: fcxSanya.
StunClient based on code by SuperTuxKart, relicensed with approval of
the according authors hilnius, hiker, Auria, deveee, Flakebi, leper,
konstin and KroArtem.
Added rfc5245 (ejabberd) support, a GUI option, refactoring and segfault
fixes by myself.

Tested By: user1, Sandarac, Sestroretsk1714, Vladislav, Grugnas,
javiergodas
Partially Reviewed By: leper, Philip, echotangoecho
This was SVN commit r19703.
2017-06-01 06:33:52 +00:00
d5c9725dc3 Revert the wrong "insufficient permissions to remove an account" error message from 9281aaf25e to the previous "Registration forbidden" which is shown when lobby registrations are disabled or restricted to some IP range.
Differential Revision: https://code.wildfiregames.com/D319
Refs #3047
Reviewed By: scythetwirler, leper
This was SVN commit r19575.
2017-05-14 03:18:21 +00:00
76bc9b579a Clientside Lobby support for muted players (visitor role).
Displays a chat message and a notification in the player details to
everyone if someone was muted and
hides the chat input to visitors.

Differential Revision: https://code.wildfiregames.com/D339
Reviewed By: user1
This was SVN commit r19514.
2017-05-05 01:13:12 +00:00
41d4649c6d Remove unused, deprecated SendGetGameList from the lobby.
Differential Revision: https://code.wildfiregames.com/D389
Reviewed By: scythetwirler
Refs D207

This was SVN commit r19467.
2017-04-28 23:22:41 +00:00
e6a0c7ae77 Remove SendGetRatingList lobby function which is deprecated and ignored serverside since 1a15131d2d because it caused performance issues and therefore shouldn't be used anymore.
Fixes #4151
Patch by: sbirmi
This was SVN commit r19463.
2017-04-27 11:42:51 +00:00
39fcd1d031 Implement clientside kick/ban support for the lobby.
Displays a chat notification for all lobby clients if a client is kicked
or banned, pop up a message box for the affected one, including the kick
reason.
Clean the player- and gamelist upon disconnect and disable the control
elements.

Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D116
This was SVN commit r19250.
2017-02-28 11:16:46 +00:00
0e2d2610c9 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.
2017-02-07 15:05:26 +00:00
6149dd3841 Actually remove trailing whitespace for non-header files as well.
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
e4000d11cf Display the gamestart time in the lobby. Patch by Imarok, combined with d7d0a7f869 fixes #3476.
XPartaMupp patch reviewed by scythetwirler.

This was SVN commit r18601.
2016-08-14 09:03:30 +00:00
d7d0a7f869 Submit and display more information about matches in the lobby. Patch by Imarok, refs #3476.
Includes team numbers, online/offline- and won/defeated state, AI type
and difficulty for running games and
only the playernames with observer-player distinction in the gamesetup.
Use JSON format inside the XML stanza and minimize traffic by packing
teams.

Use the observer distinction to correctly apply the "full games" trigger
in the lobby, fixes #3143.

XPartaMupp patch applied by scythetwirler.
unescapeText function by sanderd17, refs #3409.

This was SVN commit r18534.
2016-07-20 16:04:23 +00:00
a9426a3f26 Distinguish private and public room level messages in the lobby. Patch by scythetwirler, refs #3865.
This was SVN commit r18378.
2016-06-14 14:07:52 +00:00
62061557db Host on arbitrary UDP ports. Patch in cooperation with Imarok, fixes #3575.
This was SVN commit r18372.
2016-06-13 16:56:14 +00:00
572847ddd4 Revert 1f34a004e5.
It breaks the Windows build by using time_t and it changes too many
things to the way lobby messages are processed to be entirely safe to
commit now.
Refs #3832.

As a side effect it reverts e514aca599, refs #3350.

This was SVN commit r17941.
2016-03-23 21:58:23 +00:00
1f34a004e5 Add timestamps to the GUI/chat-notifications sent from XmppClient, even if it's not a historical message.
Correct spammonitor behavior for historical messages and when returning
to the lobby from a game.
Patch by Josh, fixes #3832.

This was SVN commit r17928.
2016-03-21 13:48:22 +00:00
ab4668ac79 Remove legacy error codes from strings.
This was SVN commit r17600.
2016-01-04 17:58:28 +00:00
7a3f011587 Fix a typo.
This was SVN commit r17599.
2016-01-04 17:05:43 +00:00
5033fd6cbf Some const and fix the indentation.
This was SVN commit r17598.
2016-01-04 17:05:39 +00:00
036f985017 Add missing semicolons.
Update timestamp.

This was SVN commit r17591.
2016-01-02 18:12:02 +00:00
9281aaf25e Map more specific messages from the Gloox documentation to registration results and stanza errors in the lobby code. Also, don't request translation of more arcane errors. Fixes #3047
This was SVN commit r17587.
2016-01-01 18:38:50 +00:00
9f9db45a03 Fix broken feedback display logic and broken error handling from ccb534259d. Additionally, streamline logic in prelobby.js and remove an unexplained check in lobby.js added by 76a1a84a58.
This was SVN commit r17584.
2016-01-01 17:18:17 +00:00
ccb534259d Major lobby cleanup.
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.
2015-12-31 17:08:23 +00:00
02c065e2c9 Removes the unused "gone" presence state from the lobby. Refs #3383.
This was SVN commit r17358.
2015-12-02 14:41:32 +00:00
7eefcbe8c5 Do not use non-static data member initializer.
GCC 4.6 does not support those and initializing it in the ctor is a lot
clearer in this case.

This was SVN commit r17022.
2015-09-15 00:55:03 +00:00
8b437a0b1c Fix #3386, patch by elexis.
This was SVN commit r16997.
2015-09-10 05:30:18 +00:00
45a39e7dfd Fix 3171 by moving some logic to C++. These changes do not optimize the presence buffer and only fix the state bug.
This was SVN commit r16961.
2015-08-30 12:56:48 +00:00
36c6b50944 Revert emplace for associative containers. Fixes #3366.
GCC < 4.8.0 does not support emplace for those.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44436.

This was SVN commit r16922.
2015-08-19 03:32:47 +00:00
94302a4149 Move engine version to common file. Patch by elexis. Fixes #3359.
This was SVN commit r16906.
2015-08-01 23:03:13 +00:00
bbafed7fbf Lobby code cleanup.
This was SVN commit r16796.
2015-06-19 17:25:28 +00:00
f2c76cc75d Fix a number of issues related to historical messages and initial join in the multiplayer lobby. Fixes #3156
This was SVN commit r16507.
2015-04-06 19:33:37 +00:00
3c093ef741 Update lobby room.
This was SVN commit r16412.
2015-03-15 04:15:45 +00:00
c02a7e1a7b SpiderMonkey 31 upgrade
This upgrade also introduces exact stack rooting (see to the wiki:
JSRootingGuide) and fixes problems with moving GC. This allows us to
enable generational garbage collection (GGC).
Measurements a few months ago have shown a performance improvement of a
non-visual replay of around 13.5%. This probably varies quite a bit, but
it should be somewhere between 5-20%. Memory usage has also been
improved. Check the forum thread for details.

Thanks to everyone from the team who helped with this directly or
indirectly (review, finding and fixing issues, the required C++11
upgrade, the new autobuilder etc.)! Also thanks to the SpiderMonkey
developers who helped on the #jsapi channel or elsewhere!

Fixes #2462, #2415, #2428, #2684, #1374
Refs #2973, #2669

This was SVN commit r16214.
2015-01-24 14:46:52 +00:00
e02d7ad949 Automatically replace %hs/%ls with %s in CLogger format strings.
Everything is char* now, so we don't need to mess around with different
string types.

Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs perl
-pi -e'1 while
s/(LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR).*)%[hl]s/$1%s/g'

This was SVN commit r16187.
2015-01-22 20:36:24 +00:00
49e2ecea63 Automatically convert all CLogger format strings from wchar_t* to char*.
Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs sed
-i 's/LOG\(MESSAGE\|MESSAGERENDER\|WARNING\|ERROR\)(L/LOG\1(/g'

This was SVN commit r16183.
2015-01-22 20:31:30 +00:00