-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent ignored users from joining games #651
base: develop
Are you sure you want to change the base?
Prevent ignored users from joining games #651
Conversation
Nightly build for this pull request:
|
Co-authored-by: SadPencil <[email protected]>
…com:CnCNet/xna-cncnet-client into feature/prevent-ignored-users-joining-games
DXMainClient/Online/CnCNetManager.cs
Outdated
foreach (var whoData in whoDataList) | ||
{ | ||
(string ident, string host, string userName, string extraInfo) = whoData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
foreach (var whoData in whoDataList) | |
{ | |
(string ident, string host, string userName, string extraInfo) = whoData; | |
foreach ((string ident, string host, string userName, string extraInfo) in whoDataList) | |
{ |
DXMainClient/Online/Connection.cs
Outdated
@@ -618,6 +619,10 @@ private void PerformCommand(string message) | |||
case 311: // Reply to WHOIS NAME query | |||
connectionManager.OnWhoReplyReceived(parameters[2], parameters[3], parameters[1], string.Empty); | |||
break; | |||
case 315: // End of WHO query (RPL_ENDOFWHO) | |||
connectionManager.OnWhoQueryComplete(parameters[1], new List<(string ident, string host, string userName, string extraInfo)>(whoResponseList)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, another review comment.
- why declaring
whoResponseList
as a class member? It seems this list is only used here. - is
whoResponseList
always be empty?
DXMainClient/Online/CnCNetManager.cs
Outdated
@@ -40,6 +40,8 @@ public class CnCNetManager : IConnectionManager | |||
public event EventHandler ReconnectAttempt; | |||
public event EventHandler Disconnected; | |||
public event EventHandler Connected; | |||
public event EventHandler UserListInitialized; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event 'CnCNetManager.UserListInitialized' is never used
@GrantBartlett have you tested this code when an ignored user joins the lobby, but you're not the admin? I don't see any distinction for such cases in code. I don't think ghost banning and silent joining should be done in this case. |
I am not sure the changes to Channel and CnCNetManager have to take place there exactly. From a brief look it's not obvious how to make only the host (channel admin) kick/joins silently. It does not seem to be it's responsibility to have such changes? |
Ummm... right, ideally the For other changes about silently kicking, maybe it's okay to be done in this PR
Yeah. |
Uh I am not sure what is the point, can you elaborate? I just meant that it felt to me like implementing the feature in the wrong part of the code not responsible for this. |
I mean RequestUserInfo might be an independent enhancement, not related with the ban things? |
I don't think splitting that is needed though? Though I guess an explanation would be good as for why it is added. |
Resolve #649
Resolves the player icons not all showing at once too (because we're doing a who on all users)
Preview:
2025-02-01.20-05-05.mp4