public static void LoadGlobalOptions() { if (!File.Exists(Path.Combine(General.SavePath, "GlobalOptions.bin"))) return; using (FileStream bin = new FileStream(Path.Combine(General.SavePath, "GlobalOptions.bin"), FileMode.Open, FileAccess.Read, FileShare.Read)) { GenericReader reader = new BinaryFileReader(new BinaryReader(bin)); int version = reader.ReadInt(); if (version >= 2) s_MultiPort = reader.ReadInt(); if (version >= 2) s_MultiServer = reader.ReadString(); int count = 0; if (version >= 1) { count = reader.ReadInt(); Notification not = null; for (int i = 0; i < count; ++i) { not = new Notification(); not.Load(reader); } } count = reader.ReadInt(); string txt = ""; for (int i = 0; i < count; ++i) { txt = reader.ReadString(); if(!s_Filters.Contains(txt)) s_Filters.Add(txt); } s_FilterPenalty = (FilterPenalty)reader.ReadInt(); if(version >= 1) s_MacroPenalty = (MacroPenalty)reader.ReadInt(); s_MaxMsgs = reader.ReadInt(); s_ChatSpam = reader.ReadInt(); s_MsgSpam = reader.ReadInt(); s_RequestSpam = reader.ReadInt(); s_FilterBanLength = reader.ReadInt(); s_FilterWarnings = reader.ReadInt(); if (version >= 1) s_AntiMacroDelay = reader.ReadInt(); s_IrcPort = reader.ReadInt(); s_IrcMaxAttempts = reader.ReadInt(); s_IrcEnabled = reader.ReadBool(); s_IrcAutoConnect = reader.ReadBool(); s_IrcAutoReconnect = reader.ReadBool(); s_FilterSpeech = reader.ReadBool(); s_FilterMsg = reader.ReadBool(); s_Debug = reader.ReadBool(); s_LogChat = reader.ReadBool(); s_LogPms = reader.ReadBool(); s_IrcStaffColor = (IrcColor)reader.ReadInt(); s_IrcServer = reader.ReadString(); s_IrcRoom = reader.ReadString(); s_IrcNick = reader.ReadString(); s_TotalChats = reader.ReadULong() - 1; } }
private string ColorFor(Notification not) { return HTML.White; }
public NotAlertGump(Mobile m, Notification not) : base(m, 300, 50) { c_Not = not; if(c_Not.AntiMacro) c_Timer = Timer.DelayCall(TimeSpan.FromSeconds(Data.AntiMacroDelay), new TimerCallback(AntiMacro)); }
public NotMessageGump(Mobile m, Notification not) : base(m, 100, 100) { c_Not = not; }
public EditNotGump(Mobile m, Notification not) : base(m, 100, 100) { c_Not = not; }
public TimeGump(Mobile m, GumpPlus g, Notification not) : base(g.Owner, 100, 100) { c_Gump = g; c_Not = not; }