// chat.say() public static void Chat(ConsoleSystem.Arg arg) { if (arg.ArgsStr.StartsWith("\"/")) { Command(arg); return; } if (!chat.enabled) { arg.ReplyWith("Chat is disabled."); } else { if (arg.ArgsStr == "\"\"") { return; } BasePlayer basePlayer = ArgExtension.Player(arg); if (!(bool)((UnityEngine.Object)basePlayer)) { return; } Chat pChat = new Chat(new Player(basePlayer), arg); string str = arg.GetString(0, "text"); if (str.Length > 128) { str = str.Substring(0, 128); } if (chat.serverlog) { Debug.Log((object)(basePlayer.displayName + ": " + str)); } OnChat.OnNext(pChat); if (pChat.FinalText != "") { ConsoleSystem.Broadcast("chat.add " + StringExtensions.QuoteSafe(pChat.BroadcastName) + " " + StringExtensions.QuoteSafe(pChat.FinalText)); arg.ReplyWith(pChat.ReplyWith); } Logger.ChatLog(pChat.BroadcastName, pChat.FinalText); } }
public void BroadcastFrom(string name, string arg) { ConsoleSystem.Broadcast("chat.add " + StringExtensions.QuoteSafe(name) + " " + StringExtensions.QuoteSafe(arg)); }
public void MessageFrom(string from, string msg) { basePlayer.SendConsoleCommand("chat.add " + StringExtensions.QuoteSafe(from) + " " + StringExtensions.QuoteSafe(msg)); }
public void Broadcast(string arg) { ConsoleSystem.Broadcast("chat.add " + StringExtensions.QuoteSafe(server_message_name) + " " + StringExtensions.QuoteSafe(arg)); }
public void Message(string msg) { basePlayer.SendConsoleCommand("chat.add " + StringExtensions.QuoteSafe(Server.server_message_name) + " " + StringExtensions.QuoteSafe(msg)); }