Only a single clear mode is ever used, removed the rest.
This commit is contained in:
parent
86effa0452
commit
6bda1ee09d
3 changed files with 8 additions and 22 deletions
|
@ -0,0 +1,7 @@
|
||||||
|
namespace SharpChat.SockChat.PacketsS2C {
|
||||||
|
public class ClearMessagesAndUsersS2CPacket : ISockChatS2CPacket {
|
||||||
|
public string Pack() {
|
||||||
|
return "8\t3";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,21 +0,0 @@
|
||||||
namespace SharpChat.SockChat.PacketsS2C {
|
|
||||||
public class ContextClearS2CPacket : ISockChatS2CPacket {
|
|
||||||
public enum ClearMode {
|
|
||||||
Messages = 0,
|
|
||||||
Users = 1,
|
|
||||||
Channels = 2,
|
|
||||||
MessagesUsers = 3,
|
|
||||||
MessagesUsersChannels = 4,
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly ClearMode Mode;
|
|
||||||
|
|
||||||
public ContextClearS2CPacket(ClearMode mode) {
|
|
||||||
Mode = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Pack() {
|
|
||||||
return string.Format("8\t{0}", (int)Mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -445,7 +445,7 @@ namespace SharpChat {
|
||||||
|
|
||||||
Events.Dispatch("chan:join", now, chan, user);
|
Events.Dispatch("chan:join", now, chan, user);
|
||||||
|
|
||||||
SendTo(user, new ContextClearS2CPacket(ContextClearS2CPacket.ClearMode.MessagesUsers));
|
SendTo(user, new ClearMessagesAndUsersS2CPacket());
|
||||||
SendTo(user, new UsersPopulateS2CPacket(GetChannelUsers(chan).Except(new[] { user }).Select(
|
SendTo(user, new UsersPopulateS2CPacket(GetChannelUsers(chan).Except(new[] { user }).Select(
|
||||||
user => new UsersPopulateS2CPacket.ListEntry(
|
user => new UsersPopulateS2CPacket.ListEntry(
|
||||||
user.UserId,
|
user.UserId,
|
||||||
|
|
Loading…
Reference in a new issue