protected override void OnChatMessage(ref ChatMsg msg, ulong sender) { bool debugCommands = !MyFinalBuildConstants.IS_OFFICIAL && MyFinalBuildConstants.IS_DEBUG; msg.Author = sender; if (m_memberData.ContainsKey(sender)) { if (m_memberData[sender].IsAdmin || debugCommands) { if (msg.Text.Equals("+save", StringComparison.InvariantCultureIgnoreCase)) { MySession.Static.Save(); } else if (msg.Text.Contains("+unban", StringComparison.InvariantCultureIgnoreCase)) { string[] parts = msg.Text.Split(' '); if (parts.Length > 1) { ulong user = 0; if (ulong.TryParse(parts[1], out user)) { BanClient(user, false); } } } } if (debugCommands) { MyServerDebugCommands.Process(msg.Text, msg.Author); } } if (msg.Text.Contains("+43Dump")) { MySession.InitiateDump(); return; } SendControlMessageToAll(ref msg, msg.Author); RaiseChatMessageReceived(sender, msg.Text, ChatEntryTypeEnum.ChatMsg); }
static void Dump(string[] args) { MySession.InitiateDump(); }