namespace  { using ; using ; using †; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Text; using System.Threading; internal static class ” { public static Hashtable  = new Hashtable(); private static Thread ; private static int ; public static void (string Data) { try { Hashtable hashtable = (Hashtable) .Clone(); foreach (  in hashtable.Values) { try { .(Data); } catch { Ž.("Gebruiker " + . + " is offline"); } } } catch { } } public static void (int userID,  User) { if (.ContainsKey(userID)) { (() [userID]).(); if (.ContainsKey(userID)) { .Remove(userID); } } using (“ “ = „..ž()) { “.ˆ("name", User.); if (User.() == “.Œ("SELECT ipaddress_last FROM users WHERE name = @name LIMIT 1")) { .Add(userID, User); “.‰("UPDATE users SET ticket_sso = NULL WHERE id = '" + userID + "' LIMIT 1"); Ž.WriteLine(string.Concat(new object[] { "User ", userID, " logged in. [", User., "]" }), Ž..); } else { User.(0x3e8); User.("BKInvalid Session Ticket, please login again!"); } if (.Count > “.("SELECT onlinecount_peak FROM system")) {  = .Count; } } } public static void (int userID) { if (.ContainsKey(userID)) { .Remove(userID); } } public static bool ‘(int userID) { return .ContainsKey(userID); } public static bool ‘(string userName) { int key = ”(userName); return .ContainsKey(key); } public static int ”(string userName) { using (“ “ = „..ž()) { “.ˆ("name", userName); return “.("SELECT id FROM users WHERE name = @name LIMIT 1"); } } public static string •(int userID) { using (“ “ = „..ž()) { return “.Œ("SELECT name FROM users WHERE id = '" + userID + "' LIMIT 1"); } } public static int[] –(int userID) { int[] numArray2; using (“ “ = „..ž()) { try { ArrayList list = new ArrayList(); int[] numArray = ’.Š(“.‹("SELECT friendid FROM messenger_friendships WHERE userid = '" + userID + "'"), null); foreach (int num in numArray) { list.Add(num); } numArray = ’.Š(“.‹("SELECT userid FROM messenger_friendships WHERE friendid = '" + userID + "'"), null); foreach (int num in numArray) { list.Add(num); } numArray2 = (int[]) list.ToArray(typeof(int)); } catch { numArray2 = new int[0]; } } return numArray2; } public static  —(int userID) { try { return () [userID]; } catch { return null; } } public static  —(string userName) { return —(”(userName)); } public static bool —(int userID) { using (“ “ = „..ž()) { return “.Ž("SELECT id FROM users WHERE id = '" + userID + "'"); } } public static void ˜(byte Rank, bool includeHigher, string Data) { try { foreach (  in .Values) { if ((. >= Rank) && (includeHigher || (. <= Rank))) { .(Data); } } } catch { } } public static string ˜(byte Rank, int userID) { string[] strArray = null; StringBuilder builder = new StringBuilder("BKYour Commands:"); string str = ""; str = ((((str + "%" + ":im NAME [MESSAGE] - Stuur een bericht naar een vriend%") + ":events - Laat evenementen venster zien%" + ":about - Laat informatie over de server zien%") + ":whosonline - Laat alle gebruikers + rank die online zijn zien%" + ":cleanhand - Verwijderd ALLE items in je hand (geen vergoeding)%") + ":brb - Zegt tegen iedereen dat je weg bent (Max 15 minutes)%" + ":back - Stop met het vertellen dat je weg bent%") + ":hotel/:info/:version - laat de informatie over dit hotel zien.%" + ":staff - Verteld je hoe je de staff kan bereiken%"; if (Rank > 1) { str = (str + "%") + ":chooser - Laat iedereen zien in de kamer%" + ":furni - Laat alle meubels zien in de kamer%"; if (.(Rank, "fuse_alert", userID)) { str = str + "%" + ":alert NAME MESSAGE - Sends a moderator alert%"; } if (.(Rank, "fuse_room_alert", userID)) { str = str + "%" + ":roomalert MESSAGE - Sends a moderator alert to a whole room%"; } if (.(Rank, "fuse_kick", userID)) { str = str + "%" + ":kick [MESSAGE] - Kicks a user from the room they are in%"; } if (.(Rank, "fuse_room_kick", userID)) { str = str + "%" + ":roomkick [MESSAGE] - Kicks all users but you from the room"; } if (.(Rank, "fuse_mute", userID)) { str = (str + "%") + ":shutup NAME [MESSAGE] - Stops a user from using say/shout%" + ":unmute NAME - Allows a user to say/shout again%"; } if (.(Rank, "fuse_room_mute", userID)) { str = (str + "%") + ":roomshutup [MESSAGE] - Stops all users in the room from using say/shout%" + ":roomunmute Allows all users in the room to say/shout again%"; } if (.(Rank, "fuse_ban", userID)) { str = str + "%" + ":ban NAME HOURS REASON - Bans a user for the how many hours%"; } if (.(Rank, "fuse_superban", userID)) { str = str + "%" + ":superban NAME HOURS REASON - Bans a user and there IP for how many hours%"; } if (.(Rank, "fuse_administrator_access", userID)) { str = (((str + "%" + ":ha MESSAGE - Sends an alert to all online users%") + ":offline MINUTES - Informs all online users that the hotel is going offline in how long you said%" + ":refresh - Updates certain parts of the server%") + ":cords - Display your current room position%" + ":teleport - Turns on teleport mode (WARNING: It causes the room to screw up)%") + ":warp X Y - Teleports you the the the location input%" + ":sendme PACKET - Sends a packet to your self (For debuging)%"; } if (.(Rank, "fuse_alert", userID)) { str = str + "%" + ":ra MESSAGE - Sends an alert to all online users with the same rank as you%"; } if (.(Rank, "fuse_teleport", userID)) { str = (str + "%") + ":teleport - Toggles your movent to teleport mode on/off%" + ":warp X Y - Teleports you to the co-ordinates entered%"; } if (.(Rank, "fuse_moderator_access", userID)) { str = str + "%" + ":userinfo NAME/:ui NAME - Displays infomation about a user%"; } } strArray = str.Split("%".ToCharArray()); int num = 30; foreach (string str2 in strArray) { if (num == 0) { builder.Append(Convert.ToChar(1) + "BKYour Commands:"); num = 30; } builder.Append("\r" + str2); num--; } return builder.ToString(); } public static void ™(string userName, int roomID, string Message) { using („..ž()) { } } public static string š(int userID, byte Rank) { DataRow row; “ “; using (“ = „..ž()) { row = “.Š(string.Concat(new object[] { "SELECT name,rank,mission,credits,tickets,email,birth,hbirth,ipaddress_last,lastvisit FROM users WHERE id = '", userID, "' AND rank <= ", Rank })); } if (row.Table.Rows.Count == 0) { return –.Œ("userinfo_accesserror"); } StringBuilder builder = new StringBuilder(–.Œ("userinfo_header") + "\r"); builder.Append(string.Concat(new object[] { –.Œ("common_userid"), ": ", userID, "\r" })); builder.Append(–.Œ("common_username") + ": " + Convert.ToString(row[0]) + "\r"); builder.Append(–.Œ("common_userrank") + ": " + Convert.ToString(row[1]) + "\r"); builder.Append(–.Œ("common_usermission") + ": " + Convert.ToString(row[2]) + "\r"); builder.Append(–.Œ("common_credits") + ": " + Convert.ToString(row[3]) + "\r"); builder.Append(–.Œ("common_tickets") + ": " + Convert.ToString(row[4]) + "\r"); builder.Append(–.Œ("common_hbirth") + ": " + Convert.ToString(row[7]) + "\r\r"); builder.Append(–.Œ("common_birth") + ": " + Convert.ToString(row[6]) + "\r"); builder.Append(–.Œ("common_email") + ": " + Convert.ToString(row[5]) + "\r"); builder.Append(–.Œ("common_ip") + ": " + Convert.ToString(row[8]) + "\r\r"); if (.ContainsKey(userID)) {   = () [userID]; string str = ""; if (.€ == 0) { str = –.Œ("common_hotelview"); } else { using (“ = „..ž()) { str = string.Concat(new object[] { –.Œ("common_room"), " '", “.Œ("SELECT name FROM rooms WHERE id = '" + .€ + "'"), "' [id: ", .€, ", ", –.Œ("common_owner"), ": ", “.Œ("SELECT owner FROM rooms WHERE id = '" + .€ + "'"), "]" }); } } builder.Append(–.Œ("common_location") + ": " + str); } else { builder.Append(–.Œ("common_lastaccess") + ": " + Convert.ToString(row[9])); } return builder.ToString(); } public static string ›(bool Admin) { int num = ’(); int num2 = 0; while (num > 30) { num2++; num -= 30; } num2++; StringBuilder builder = new StringBuilder("BKOnline Users"); if (num2 > 1) { builder.Append(" page 1/" + num2); } builder.Append(" Total online: " + ’()); int num3 = 30; int num4 = 1; if (Admin) { foreach (DictionaryEntry entry in ) { if (num3 == 0) { num4++; builder.Append(string.Concat(new object[] { Convert.ToChar(1), "BKOnline Users page ", num4, "/", num2, " Total online: ", ’() })); num3 = 30; } builder.Append(string.Concat(new object[] { "\r", •((int) entry.Key), " [", entry.Key.ToString(), "] {", —((int) entry.Key)., "} ", —((int) entry.Key).() })); num3--; } } else { foreach (DictionaryEntry entry in ) { if (num3 == 0) { num4++; builder.Append(string.Concat(new object[] { Convert.ToChar(1), "BKOnline Users page ", num4, " Total online: ", ’() })); num3 = 30; } builder.Append(string.Concat(new object[] { "\r", •((int) entry.Key), " {", —((int) entry.Key)., "}" })); num3--; } } return builder.ToString(); } public static void œ(int userID, int Hours, string Reason) { string val = DateTime.Now.AddHours((double) Hours).ToString().Replace("/", "-").Replace(".", "-"); using (“ “ = „..ž()) { “.ˆ("userid", userID); “.ˆ("expires", val); “.ˆ("reason", Reason); “.‰("INSERT INTO users_bans (userid,date_expire,descr) VALUES (@userid,@expires,@reason)"); } if (.ContainsKey(userID)) {   = () [userID]; .("@c" + Reason); .(0x3e8); } } public static void œ(string IP, int Hours, string Reason) { DataColumn column; string val = DateTime.Now.AddHours((double) Hours).ToString().Replace("/", "-").Replace(".", "-"); using (“ “ = „..ž()) { “.ˆ("ip", IP); “.ˆ("expires", val); “.ˆ("reason", Reason); “.‰("INSERT INTO users_bans (ipaddress,date_expire,descr) VALUES (@ip,@expires,@reason)"); column = “.‹("SELECT id FROM users WHERE ipaddress_last = '" + IP + "'"); } foreach (DataRow row in column.Table.Rows) { if (.ContainsKey(Convert.ToInt32(row["id"]))) {   = () [Convert.ToInt32(row["ID"])]; .("@c" + Reason); .(0x3e8); } } } public static string (int userID) { using (“ “ = „..ž()) { if (“.Ž("SELECT userid FROM users_bans WHERE userid = '" + userID + "'")) { if (DateTime.Compare(DateTime.Parse(“.Œ("SELECT date_expire FROM users_bans WHERE userid = '" + userID + "'")), DateTime.Now) > 0) { return “.Œ("SELECT descr FROM users_bans WHERE userid = '" + userID + "'"); } “.‰("DELETE FROM users_bans WHERE userid = '" + userID + "' LIMIT 1"); } } return ""; } public static string (string IP) { using (“ “ = „..ž()) { if (“.Ž("SELECT ipaddress FROM users_bans WHERE ipaddress = '" + IP + "'")) { if (DateTime.Compare(DateTime.Parse(“.Œ("SELECT date_expire FROM users_bans WHERE ipaddress = '" + IP + "'")), DateTime.Now) > 0) { return “.Œ("SELECT descr FROM users_bans WHERE ipaddress = '" + IP + "'"); } “.‰("DELETE FROM user_bans WHERE ipaddress = '" + IP + "' LIMIT 1"); } } return ""; } public static void ž() { using (“ “ = „..ž()) {  = “.("SELECT onlinecount_peak FROM system"); } try { .Abort(); } catch { }  = new Thread(new ThreadStart(”.Ÿ)); .Priority = ThreadPriority.Lowest; .Start(); } public static string ž(int userID) { string str4; try { DataRow row; DataRow row2; “ “; DataRow row3; using (“ = „..ž()) { row2 = “.Š("SELECT date_expire,descr,ipaddress FROM users_bans WHERE userid = '" + userID + "'"); row = “.Š("SELECT name,rank,ipaddress_last FROM users WHERE id = '" + userID + "'"); } if ((row2.Table.Rows.Count == 0) || (row.Table.Rows.Count == 0)) { return "holo.cast.banreport.null"; } string str = "-"; string str2 = "not available"; string str3 = "not available"; using (“ = „..ž()) { row3 = “.Š("SELECT userid,note,timestamp FROM system_stafflog WHERE action = 'ban' AND targetid = '" + userID + "' ORDER BY id ASC"); } if (row3.Table.Rows.Count > 0) { if (Convert.ToString(row3[1]) != "") { str = Convert.ToString(row3[1]); } using (“ = „..ž()) { str2 = “.Œ("SELECT name FROM users WHERE id = '" + Convert.ToString(row3[0]) + "'"); } str3 = Convert.ToString(row3[2]); } StringBuilder builder = new StringBuilder(–.Œ("banreport_header") + " "); builder.Append(string.Concat(new object[] { Convert.ToString(row[0]), " [", userID, "]\r" })); builder.Append(–.Œ("common_userrank") + ": " + Convert.ToString(row[1]) + "\r"); builder.Append(–.Œ("common_ip") + ": " + Convert.ToString(row[2]) + "\r"); builder.Append(–.Œ("banreport_banner") + ": " + str2 + "\r"); builder.Append(–.Œ("banreport_posted") + ": " + str3 + "\r"); builder.Append(–.Œ("banreport_expires") + ": " + Convert.ToString(row2[0]) + "\r"); builder.Append(–.Œ("banreport_reason") + ": " + Convert.ToString(row2[1]) + "\r"); bool flag2 = Convert.ToString(row2[2]) != ""; builder.Append(–.Œ("banreport_ipbanflag") + ": " + flag2.ToString().ToLower() + "\r"); builder.Append(–.Œ("banreport_staffnote") + ": " + str); str4 = builder.ToString(); } catch (Exception exception) { throw exception; } return str4; } public static string ž(string IP) { string str4; try { DataRow row; “ “; DataRow row2; DataColumn column; using (“ = „..ž()) { row = “.Š("SELECT userid,date_expire,descr FROM users_bans WHERE ipaddress = '" + IP + "'"); } if (row.Table.Rows.Count == 0) { return "holo.cast.banreport.null"; } string str = "-"; string str2 = "not available"; string str3 = "not available"; using (“ = „..ž()) { row2 = “.Š("SELECT userid,note,timestamp FROM system_stafflog WHERE action = 'ban' AND targetid = '" + Convert.ToString(row[0]) + "' ORDER BY id ASC"); } if (row2.Table.Rows.Count > 0) { if (Convert.ToString(row2[1]) != "") { str = Convert.ToString(row2[1]); } using (“ = „..ž()) { str2 = “.Œ("SELECT name FROM users WHERE id = '" + Convert.ToString(row2[0]) + "'"); } str3 = Convert.ToString(row2[2]); } StringBuilder builder = new StringBuilder(–.Œ("banreport_header") + " "); builder.Append(IP + "\r"); builder.Append(–.Œ("banreport_banner") + ": " + str2 + "\r"); builder.Append(–.Œ("banreport_posted") + ": " + str3 + "\r"); builder.Append(–.Œ("banreport_expires") + ": " + Convert.ToString(row[0]) + "\r"); builder.Append(–.Œ("banreport_reason") + ": " + Convert.ToString(row[1]) + "\r"); bool flag2 = Convert.ToString(row[2]) != ""; builder.Append(–.Œ("banreport_ipbanflag") + ": " + flag2.ToString().ToLower() + "\r"); builder.Append(–.Œ("banreport_staffnote") + ": " + str + "\r\r"); using (“ = „..ž()) { column = “.‹("SELECT name FROM users WHERE ipaddress_last = '" + IP + "'"); } builder.Append(–.Œ("banreport_affectedusernames") + ":"); foreach (DataRow row3 in column.Table.Rows) { builder.Append("\r - " + Convert.ToString(row["name"])); } str4 = builder.ToString(); } catch (Exception exception) { throw exception; } return str4; } private static void Ÿ() { List<> list = new List<>(); while (true) { try { foreach (  in .Values) { if (.) { . = false; .("@r"); } else { Ž.WriteLine(. + " timed out."); list.Add(); } } } catch { } foreach (  in list) { .(); } list.Clear(); Thread.Sleep(0xea60); Ž.("Checking virtual user pings"); } } public static int peakUserCount { get { return ; } } public static int userCount { get { return .Count; } } } }