public static bool SaveAsDatabaseSQL() { bool result; if (!Core.DatabaseType.Equals("MYSQL")) { result = false; } else { using (Dictionary <uint, ClanData> .ValueCollection.Enumerator enumerator = Clans.Database.Values.GetEnumerator()) { while (enumerator.MoveNext()) { ClanData current = enumerator.Current; Clans.SQL_Update(current, true); } goto IL_68; } IL_5A: LibRust.Cycle(); Thread.Sleep(100); IL_68: if (MySQL.Queued) { goto IL_5A; } result = true; } return(result); }
public static bool SaveAsDatabaseSQL() { bool result; if (!Core.DatabaseType.Equals("MYSQL")) { result = false; } else { using (List <string> .Enumerator enumerator = Blocklist.list_0.GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; MySQL.Update(string.Format("REPLACE INTO `db_blocked_ip` (`ip_address`) VALUES ('{0}');", current)); } goto IL_6C; } IL_5E: LibRust.Cycle(); Thread.Sleep(100); IL_6C: if (MySQL.Queued) { goto IL_5E; } result = true; } return(result); }
public static int SaveAsDatabaseSQL() { if (!Core.DatabaseType.Equals("MYSQL")) { return(0); } foreach (ulong num in Database.Keys) { MySQL.Update(string.Format(SQL_INSERT_USER_BANNED, new object[] { num, Database[num].IP, Database[num].Time.ToString("yyyy-MM-dd HH:mm:ss"), Database[num].Period.ToString("yyyy-MM-dd HH:mm:ss"), MySQL.QuoteString(Database[num].Reason), MySQL.QuoteString(Database[num].Details) })); } while (MySQL.Queued) { LibRust.Cycle(); Thread.Sleep(100); } return(Database.Count); }
public static bool SaveAsDatabaseSQL() { if (!Core.DatabaseType.Equals("MYSQL")) { return(false); } foreach (string str in list_0) { MySQL.Update(string.Format("REPLACE INTO `db_blocked_ip` (`ip_address`) VALUES ('{0}');", str)); } while (MySQL.Queued) { LibRust.Cycle(); Thread.Sleep(100); } return(true); }
public static bool SaveAsDatabaseSQL() { if (!Core.DatabaseType.Equals("MYSQL")) { return(false); } foreach (ClanData data in Database.Values) { SQL_Update(data, true); } while (MySQL.Queued) { LibRust.Cycle(); Thread.Sleep(100); } return(true); }
public static int SaveAsDatabaseSQL() { int result; if (!Core.DatabaseType.Equals("MYSQL")) { result = 0; } else { using (Dictionary <ulong, UserBanned> .KeyCollection.Enumerator enumerator = Banned.Database.Keys.GetEnumerator()) { while (enumerator.MoveNext()) { ulong current = enumerator.Current; MySQL.Update(string.Format(Banned.SQL_INSERT_USER_BANNED, new object[] { current, Banned.Database[current].IP, Banned.Database[current].Time.ToString("yyyy-MM-dd HH:mm:ss"), Banned.Database[current].Period.ToString("yyyy-MM-dd HH:mm:ss"), MySQL.QuoteString(Banned.Database[current].Reason), MySQL.QuoteString(Banned.Database[current].Details) })); } goto IL_117; } IL_109: LibRust.Cycle(); Thread.Sleep(100); IL_117: if (MySQL.Queued) { goto IL_109; } result = Banned.Database.Count; } return(result); }