zhupengfei
698b471074
network/room_member: Silence -Wswitch warning
...
This causes lots of warnings. Adding the Uninitialized case solves this
2019-08-20 22:23:32 +08:00
Jack Harper
cb455fd410
Added default case for GetErrorStr, removed useless const declaration in header
2019-07-23 23:24:38 +01:00
Weiyi Wang
2bbbfa86d8
network/room_member: in-header function should be inline
...
Otherwise produces multpile definition in translation units and generates unused warnings
2019-07-14 14:01:13 -04:00
Lioncash
21c71d21ae
general: Use deducation guides for std::lock_guard and std::unique_lock
...
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-07 15:14:29 +02:00
Weiyi Wang
895936360b
network: remove cpp-jwt library dependency
...
This is not used anywhere in in the module
2018-12-31 23:23:09 -05:00
zhupengfei
13ec2abbf6
network: Make citra mods optional and disabled by default
...
To avoid extra legal responsibility, this should actually only be used on our self-hosted rooms.
2018-12-15 22:47:07 +08:00
zhupengfei
9d062d63da
network, citra_qt: Give moderation permission to community mods
...
Based on the `roles` payload in the JWT, the rooms will now give mod permission to Citra Community Moderators. To notify the client of its permissions, a new response, IdJoinSuccessAsMod is added, and there's now a new RoomMember::State called Moderator.
2018-12-15 20:28:03 +08:00
zhupengfei
94be4050bc
network/packet: Fix reading vectors/arrays of strings
...
Previously would break here, as it is trying to initialize a string with 0, which is then considered NULL.
2018-12-15 14:37:23 +08:00
zhupengfei
7acd2664dd
network/room_member: Add moderation functions
...
To allow for passing moderation errors around without impacting the State, this commit also separates the previous State enum into two enums: State, and Error. The State enum now only contains generic states like disconnected or connected, and the Error enum describes the specific error happened.
citra_qt/multiplayer/{state, message} is changed accordingly.
2018-12-15 11:03:31 +08:00
zhupengfei
38f86cce94
network/room: Moderation implementation
...
Currently consist of 4 moderation commands (kick, ban, unban and get ban list).
2018-12-15 11:03:28 +08:00
zhupengfei
0319e51960
multiplayer: Add status message for user joining/leaving
...
The room server is now able to send a new type of packet: IdStatusMessage which is parsed and displayed by the client.
2018-12-15 11:03:06 +08:00
zhupengfei
1a8841f96e
network, web_service: Add Verification backend and use new lobby API
...
Added verify_backend to load user_data for members. and removed method to generate UID as this is now done server-side.
Added GetUsername function and a "token" param to room_member.
Also added a username to ChatEntry, so that the username can be shown (along with nicknames) in the chat dialog.
2018-12-15 11:02:51 +08:00
adityaruplaha
5f0e189238
Add Support for Room Descriptions
2018-12-15 11:02:50 +08:00
zhupengfei
c396e3c6e5
network: check Console ID conflicts
...
As Console ID can be sensitive data sometimes, this implementation sent a SHA256 hash of it instead.
2018-12-15 11:02:47 +08:00
zhupengfei
3c589f473f
multiplayer: check nickname regex server side
2018-12-15 10:40:27 +08:00
James Rowe
e040bc9355
Multiplayer: Send an error message when connecting to a full room
2018-12-15 10:40:26 +08:00
zhupengfei
a9c9ffd32c
network: bump multiplayer version
2018-12-15 10:40:25 +08:00
Pengfei Zhu
0d2c027a9d
Merge pull request #4191 from valentinvanelslande/minor-fix
...
room_member: RakNet -> ENet
2018-09-08 10:05:33 +08:00
Valentin Vanelslande
c29c66000e
room_member: RakNet -> ENet
2018-09-07 20:17:24 -05:00
Valentin Vanelslande
fc876e727a
room_member: fix 3 typos
2018-09-07 20:12:52 -05:00
Weiyi Wang
7d8f115185
Prefix all size_t with std::
...
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
Valentin Vanelslande
2c31bd1a52
network: fix 3 typos
2018-08-12 17:55:15 -05:00
Weiyi Wang
1b1439c6af
NWM_UDS: use sizeof(<var being used>) instead of hard-coded type ( #4093 )
...
* NWM_UDS: use sizeof(<var being used>) instead of hard-coded type
Intend to fix #4090 .
` node_map.node.second` type was changed to `u16` in #3985 . However the type change wasn't reflected here. Should have used variable name instead to automatically do type change
* NWM_UDS: ... and also the node.first one
* NWM_UDS: ... and here
* Network: bump version because we changed UDS packet layout
* Update nwm_uds.cpp
2018-08-12 22:47:48 +02:00
zhupengfei
76465dd0f5
citra_qt: retranslate status bar
2018-07-24 19:20:00 +08:00
wwylele
0eab948728
reformat all files with clang-format
2018-06-29 16:56:12 +03:00
wwylele
7c5a76e58b
log: replace all NGLOG with LOG
2018-06-29 14:18:07 +03:00
James Rowe
d35693bbbc
More minor issue fixes
...
* Move Joining state change sooner in the code to prevent an issue where
failing to connect multiple times in a row doesn't change the state (as
it goes from CouldNotConnect -> CouldNotConnect which doesn't trigger a
state changed callback)
* Prevent double clicking too fast on a room in the lobby from causing
issues
* Lobby no longer closes when joining a room
2018-04-19 10:28:19 -06:00
Ben
4be12d5f56
NWM_UDS:: Check flags in SendTo ( #3481 )
...
* NWM_UDS:: Check flags in SendTo
* NWM_UDS: SendTo from Host to only oneClient
* fix u8 in flags
* Send node_map to clients
* Libnetwork: Increase libnetwork version
* Broadcast on dest_node_id 0xFFFF
* fixup: dest_node_id offset
* fixup: dest_node_id offset part 2
* Adressed wwyleles feedback
* Adressed wwylele's nits
2018-03-27 15:01:29 +03:00
Daniel Lim Wee Soong
3e8e011c33
network: Migrate logging macros ( #3575 )
...
* network: Migrate logging macros
Follow-up of #3533
Replace prefix of all logging macros from LOG to NGLOG
* Remove hash in format
2018-03-27 12:00:14 +01:00
B3n30
fd20c8c321
remove MacAddressToString
2018-03-13 11:00:05 +01:00
B3n30
b6d52f0299
Fix formatting of mac address in error log
2018-03-13 10:52:44 +01:00
James
a2b65f0669
Correctly cleanup ENet packets if not used
...
This additionally adds logging when bad MAC addresses are found when transferring packets between clients
2018-03-12 01:38:54 +11:00
Lioncash
ab021d163e
CMakeLists: Derive the source directory grouping from targets themselves
...
Removes the need to store to separate SRC and HEADER variables,
and then construct the target in most cases.
2017-12-11 21:11:52 -05:00
bunnei
d00b17eb43
Merge pull request #3162 from lioncash/packet
...
packet: Simplify operator bool overload
2017-11-29 10:41:13 -05:00
Lioncash
94999bde5b
room/room_member: Silence -Wswitch warnings
2017-11-28 21:09:53 -05:00
Lioncash
0a988e07cb
packet: Simplify operator bool overload
...
Previously this would cause a -Wnull-conversion warning
2017-11-28 21:00:24 -05:00
B3n30
c0a7afaa5c
Libnetwork: add password protected rooms, guid, and error fixes ( #3068 )
...
* Network: Add password protected roomsand GUID
* Limit chat message size
2017-11-19 19:52:37 +01:00
Huw Pascoe
a13ab958cb
Fixed type conversion ambiguity
2017-09-30 09:34:35 +01:00
B3n30
5d0a1e7efd
Added missing parts in libnetwork ( #2838 )
...
* Network: Set and send the game information over enet
Added Callbacks for RoomMember and GetMemberList to Room in preparation for web_services.
2017-08-19 11:14:33 -06:00
B3n30
718423e506
Network: Moved NintendoOUI initalization to RoomMember constructor
2017-07-26 21:06:40 +02:00
B3n30
77df82f5d6
Network: Changed timeout for receiving packets to 100ms
2017-07-16 21:30:17 +02:00
B3n30
253d3dd3d8
Network: Propagate Room closing to connected members
2017-07-16 21:30:10 +02:00
B3n30
a0626221a5
Network: Made send async in RoomMember
2017-07-16 21:30:04 +02:00
B3n30
859be35d54
Network: Send the game title
2017-07-16 21:29:57 +02:00
B3n30
42e57c1218
Network: Enable sending and receiving chat messages
2017-07-16 21:29:49 +02:00
B3n30
35a0b32553
Network: Handle the disconnect of a client
2017-07-16 21:29:41 +02:00
B3n30
641346c15c
Network: Enable to send WifiPackets
2017-07-16 21:29:34 +02:00
B3n30
77677e205e
Network: Send JoinRequest and handle the answer in RoomMember
2017-07-16 21:29:11 +02:00
B3n30
2af9a7146d
Network: Handle join request in Room
2017-07-16 21:29:02 +02:00
B3n30
7d9b7394dd
Network: Added Packet class for serialization
2017-07-16 21:28:55 +02:00