Esempio n. 1
0
 private void DeleteChannel(ChannelDeleteEvent cde)
 {
     Wrapper.RunCommand(
         @"UPDATE `sqc_messages` SET `msg_deleted` = " + Wrapper.FromUnixTime(@"@deleted") + @" WHERE `msg_channel_id` = @channelId AND `msg_deleted` IS NULL",
         Wrapper.CreateParam(@"deleted", cde.DateTime.ToUnixTimeSeconds()),
         Wrapper.CreateParam(@"channelId", cde.ChannelId)
         );
 }
Esempio n. 2
0
 private void DeleteChannel(ChannelDeleteEvent cde)
 {
     lock (Sync) {
         MemoryMessageChannel channel = Channels.FirstOrDefault(c => cde.ChannelId.Equals(c.ChannelId));
         if (channel == null)
         {
             return;
         }
         Channels.Remove(channel);
         Messages.RemoveAll(m => m.Channel.Equals(channel));
     }
 }