namespace  { using ; using ; using †; using System; using System.Collections; using System.Runtime.InteropServices; using System.Text; using System.Threading; internal static class ‚ { private static Hashtable[] ; private static Thread ; private static int ; internal static int ; private static void () { while (true) { for (int i = 0; i < ; i++) { foreach (‚.ƒ ƒ in ((Hashtable) [i].Clone()).Values) { “ “; if (!”.‘(ƒ.)) { using (“ = „..ž()) { “.‰("DELETE FROM events WHERE roomid = '" + ƒ. + "'"); } [i].Remove(ƒ.); } else {   = ”.—(ƒ.); if (.€ != ƒ.) { using (“ = „..ž()) { “.‰("DELETE FROM events WHERE roomid = '" + ƒ. + "'"); } [i].Remove(ƒ.); . = false; } } } } Thread.Sleep(); Ž.("Drop dead event loop"); } } public static void (int categoryID, int userID, int roomID, string Name, string Description) { if (![categoryID - 1].Contains(roomID)) { ‚.ƒ ƒ = new ‚.ƒ(roomID, userID, Name, Description); using (“ “ = „..ž()) { “.ˆ("ename", Name); “.ˆ("edescription", Description); “.‰(string.Concat(new object[] { "INSERT INTO events (name,description,userid,roomid,category,date) VALUES (@ename, @edescription, '", userID, "', '", roomID, "', '", categoryID, "', '", DateTime.Now.TimeOfDay.ToString(), "')" })); } [categoryID - 1].Add(roomID, ƒ); } } public static void ‘(int roomID) { for (int i = 0; i < ; i++) { if ([i].ContainsKey(roomID)) { using (“ “ = „..ž()) { “.‰("DELETE FROM events WHERE roomid = '" + roomID + "'"); } [i].Remove(roomID); break; } } } public static void ’(int categoryID, int roomID, string Name, string Description) { if ([categoryID - 1].Contains(roomID)) { ‚.ƒ ƒ = (‚.ƒ) [categoryID - 1][roomID]; ƒ. = Name; ƒ. = Description; using (“ “ = „..ž()) { “.ˆ("name", Name); “.ˆ("desc", Description); “.‰(string.Concat(new object[] { "UPDATE events SET name = @name ,description = @desc ,category = '", categoryID, "',date = '", DateTime.Now.TimeOfDay.ToString(), "' WHERE roomid = '", roomID, "'" })); } [categoryID - 1].Remove(roomID); [categoryID - 1].Add(roomID, ƒ); } } public static bool “(int categoryID) { return ((categoryID > 0) && (categoryID <= )); } public static string ”(int categoryID) { try { int i = 0; StringBuilder builder = new StringBuilder(); foreach (‚.ƒ ƒ in ((Hashtable) [categoryID - 1].Clone()).Values) { if (”.‘(ƒ.)) { builder.Append(string.Concat(new object[] { ƒ., Convert.ToChar(2).ToString(), ”.—(ƒ.)., Convert.ToChar(2), ƒ., Convert.ToChar(2), ƒ., Convert.ToChar(2), ƒ., Convert.ToChar(2) })); i++; } } return (œ.€(i) + builder.ToString()); } catch { return "H"; } } public static string •(int roomID) { try { for (int i = 0; i < ; i++) { if ([i].ContainsKey(roomID)) { ‚.ƒ ƒ = (‚.ƒ) [i][roomID]; return string.Concat(new object[] { ƒ., Convert.ToChar(2).ToString(), ”.—(ƒ.)., Convert.ToChar(2).ToString(), ƒ., Convert.ToChar(2).ToString(), œ.€(i + 1), ƒ., Convert.ToChar(2).ToString(), ƒ., Convert.ToChar(2).ToString(), ƒ., Convert.ToChar(2).ToString() }); } } return "-1"; } catch { return "-1"; } } public static void ž() { try { .Abort(); } catch { }  = int.Parse(Œ.("events_categorycount"));  = new Hashtable[]; for (int i = 0; i < ; i++) { [i] = new Hashtable(); }  = int.Parse(Œ.("events_deadevents_removeinterval")) * 0x3e8;  = new Thread(new ThreadStart(‚.)); .Priority = ThreadPriority.BelowNormal; .Start(); } [StructLayout(LayoutKind.Sequential)] private struct ƒ { internal int ; internal int ; internal string ; internal string ; internal string ; internal ƒ(int roomID, int userID, string Name, string Description) { this. = roomID; this. = userID; this. = Name; this. = Description; this. = DateTime.Now.ToShortTimeString(); } } } }