public void Save(XmlWriter writer) { writer.WriteStartElement("setting"); writer.WriteElementString("port", Port.ToString()); writer.WriteElementString("kicktimer", KickTimer.ToString()); writer.WriteElementString("credentialssystem", ((int)CredentialsSystem).ToString()); writer.WriteElementString("maxsimultaneconnections", MaxSimultaneConnections.ToString()); writer.WriteElementString("maxactiveconnections", MaxActiveConnections.ToString()); writer.WriteEndElement(); }
private void UserAFK(Mobile m) { if (m == null) { return; } m.CloseGump(typeof(AFKCPassPhraseGump)); m.Say("I'm AFK!"); Account mAccount = m.Account as Account; if (mAccount != null) { CommandLogging.WriteLine(m, "{0} {1} {2} ", m.AccessLevel, CommandLogging.Format(m), "Failed AFK Check."); string text = String.Format("{0} AFK Check-{1}: **Failed** Retries={2}/{3} Seconds={4}/{5}", DateTime.Now, m.Name, m_RetryCount, m_MaxRetries, m_TotalSeconds, m_MaxSeconds); mAccount.Comments.Add(new AccountComment("AFK Checker", text)); if (m_Jail) { MoveToJail(m); } else if (m_MoveToMap != null && m_MoveTo != Point3D.Zero) { m.MoveToWorld(m_MoveTo, m_MoveToMap); Effects.SendBoltEffect(m, true, 0); Effects.PlaySound(new Point3D(m.X, m.Y, m.Z), m.Map, 0x307); } if (m_Website != null) { try { m.LaunchBrowser(m_Website); } catch { } } if (m_Kick) { m_KickTimer = new KickTimer(m, TimeSpan.FromSeconds(5)); m_KickTimer.Start(); } if (m_Staff != null && !m_Staff.Deleted && m_Staff.Map != Map.Internal) { m_Staff.SendMessage(37, "*{0} FAILED AFK Check*", m.Name); m_Staff.CloseGump(typeof(AFKCancelGump)); } } }
private void UserAFK(Mobile m) { if (m == null) return; m.CloseGump(typeof(AFKCPassPhraseGump)); m.Say("I'm AFK!"); Account mAccount = m.Account as Account; if (mAccount != null) { CommandLogging.WriteLine(m, "{0} {1} {2} ", m.AccessLevel, CommandLogging.Format(m), "Failed AFK Check."); string text = String.Format("{0} AFK Check-{1}: **Failed** Retries={2}/{3} Seconds={4}/{5}", DateTime.Now, m.Name, m_RetryCount, m_MaxRetries, m_TotalSeconds, m_MaxSeconds); mAccount.Comments.Add(new AccountComment("AFK Checker", text)); if (m_Jail) MoveToJail(m); else if (m_MoveToMap != null && m_MoveTo != Point3D.Zero) { m.MoveToWorld(m_MoveTo, m_MoveToMap); Effects.SendBoltEffect(m, true, 0); Effects.PlaySound(new Point3D(m.X, m.Y, m.Z), m.Map, 0x307); } if (m_Website != null) { try { m.LaunchBrowser(m_Website); } catch { } } if (m_Kick) { m_KickTimer = new KickTimer(m, TimeSpan.FromSeconds(5)); m_KickTimer.Start(); } if (m_Staff != null && !m_Staff.Deleted && m_Staff.Map != Map.Internal) { m_Staff.SendMessage(37, "*{0} FAILED AFK Check*", m.Name); m_Staff.CloseGump(typeof(AFKCancelGump)); } } }