Exemple #1
0
        protected override string DoPack()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append((int)ServerPacketId.ContextPopulate);
            sb.Append(IServerPacket.SEPARATOR);
            sb.Append((int)ServerContextSubPacketId.Message);
            sb.Append(IServerPacket.SEPARATOR);
            sb.Append(DateTimeOffset.Now.ToUnixTimeSeconds());
            sb.Append(IServerPacket.SEPARATOR);
            sb.Append(Sender.Pack());
            sb.Append(IServerPacket.SEPARATOR);
            sb.Append(BotArguments.Notice(STRING_ID, Message));
            sb.Append(IServerPacket.SEPARATOR);
            sb.Append(STRING_ID);
            sb.Append(IServerPacket.SEPARATOR);
            sb.Append('0');
            sb.Append(IServerPacket.SEPARATOR);
            sb.Append(@"10010");

            return(sb.ToString());
        }
Exemple #2
0
 public BanListPacket(IUser sender, IEnumerable <IBanRecord> bans)
     : base(sender.UserId, BotArguments.Notice(@"banlist", string.Join(@", ", bans.Select(
                                                                           b => string.Format(@"<a href=""javascript:void(0);"" onclick=""Chat.SendMessageWrapper('/unban '+ this.innerHTML);"">{0}</a>, ", b.Username)
                                                                           ))))
 {
 }
 public WhoIsResponsePacket(IUser sender, string userName, IPAddress ipAddress)
     : base(sender, BotArguments.Notice(@"ipaddr", userName, ipAddress))
 {
 }
 public UserListResponsePacket(IUser sender, IUser requester, IEnumerable <IUser> users)
     : base(sender, BotArguments.Notice(@"who", MakeUserList(requester, users)))
 {
 }
 public UserListResponsePacket(IUser sender, string channelName, IUser requester, IEnumerable <IUser> users)
     : base(sender, BotArguments.Notice(@"whochan", channelName, MakeUserList(requester, users)))
 {
 }
Exemple #6
0
 public ChannelCreateResponsePacket(IUser sender, string channelName)
     : base(sender, BotArguments.Notice(@"crchan", channelName))
 {
 }
 public FloodWarningPacket(IUser sender)
     : base(sender.UserId, BotArguments.Notice(@"flwarn"))
 {
 }
Exemple #8
0
 public ChannelPasswordResponsePacket(IUser sender)
     : base(sender, BotArguments.Notice(@"cpwdchan"))
 {
 }
Exemple #9
0
 public SilenceRevokeNoticePacket(IUser sender)
     : base(sender, BotArguments.Notice(@"unsil"))
 {
 }
Exemple #10
0
 public UserNickChangePacket(IUser sender, string oldName, string newName)
     : base(sender, BotArguments.Notice(@"nick", oldName, newName))
 {
 }
 public SilenceNoticePacket(IUser sender)
     : base(sender, BotArguments.Notice(@"silence"))
 {
 }
Exemple #12
0
 public ChannelRankResponsePacket(IUser sender)
     : base(sender.UserId, BotArguments.Notice(@"cprivchan"))
 {
 }
Exemple #13
0
 public BroadcastMessagePacket(BroadcastMessageEvent broadcast)
     : base(broadcast.UserId, BotArguments.Notice(@"say", broadcast.Text))
 {
 }
 public SilenceRevokeResponsePacket(IUser sender, string userName)
     : base(sender, BotArguments.Notice(@"usilok", userName))
 {
 }
Exemple #15
0
 public PardonResponsePacket(IUser sender, string userName)
     : base(sender, BotArguments.Notice(@"unban", userName))
 {
 }
Exemple #16
0
 public PardonResponsePacket(IUser sender, IPAddress ipAddr)
     : base(sender, BotArguments.Notice(@"unban", ipAddr))
 {
 }