Skip to content

Commit

Permalink
[server] 사용자 추방 로직 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
powerumc committed Aug 8, 2019
1 parent cc86a69 commit 25690e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/Ntreev.Crema.Services/Users/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ public void Ban(Authentication authentication, string comment)
{
auth.Authentication.InvokeExpiredEvent(authentication.ID, comment);
}
this.Authentications.Clear();

var authenticationInfos = users.SelectMany(user => user.Authentications.Select(auth => auth.Value.Authentication.AuthenticationInfo)).ToArray();
this.Authentications.Clear();
this.Container.InvokeUsersStateChangedEvent(authentication, users);
this.Container.InvokeUsersLoggedOutEvent(authentication, authenticationInfos, new CloseInfo(CloseReason.Banned, comment));
}
Expand Down Expand Up @@ -269,8 +270,9 @@ public void Kick(Authentication authentication, string comment)

auth.Authentication.InvokeExpiredEvent(authentication.ID, comment);
}
this.Authentications.Clear();
var authenticationInfos = users.SelectMany(user => user.Authentications.Select(auth => auth.Value.Authentication.AuthenticationInfo)).ToArray();
this.Authentications.Clear();

this.Container.InvokeUsersKickedEvent(authentication, users, comments);
this.Container.InvokeUsersStateChangedEvent(authentication, users);
this.Container.InvokeUsersLoggedOutEvent(authentication, authenticationInfos, new CloseInfo(CloseReason.Kicked, comment));
Expand Down

0 comments on commit 25690e0

Please sign in to comment.