Example #1
0
 private void OnEnable()
 {
     instance    = this;
     inputModule = UnityEngine.Object.FindObjectOfType <InControlInputModule>();
     Show(showMessages: false, showType: false);
     serverCommands.helpColor = (clientCommands.helpColor = "<#FFFF7F>");
     serverCommands.RegisterCommand("?", serverCommands.OnHelp);
     serverCommands.RegisterCommand("help", serverCommands.OnHelp);
     clientCommands.RegisterCommand("?", clientCommands.OnHelp);
     clientCommands.RegisterCommand("help", clientCommands.OnHelp);
     RegisterCommand(server: true, client: true, "list", OnList, "#MULTIPLAYER/CHAT.HelpList");
     RegisterCommand(server: true, client: true, "mute", OnMute, "#MULTIPLAYER/CHAT.HelpMute");
     RegisterCommand(server: true, client: false, "kick", OnKick, "#MULTIPLAYER/CHAT.HelpKick");
 }
Example #2
0
 public void OnHostGameSuccess()
 {
     lock (stateLock)
     {
         if (state == AppSate.ServerHost)
         {
             Dialogs.ShowLoadLevelProgress(57005uL);
             EnterLobby(isServer: true, delegate
             {
                 NetChat.PrintHelp();
             });
         }
     }
 }
Example #3
0
	private void OnReceiveChatServer(NetHost client, NetStream stream)
		{
			uint clientId = stream.ReadNetId();
			string nick = stream.ReadString();
			string text = stream.ReadString();
			if (text.ToLower().Substring(0, 4).Equals("toup") || text.ToLower().Substring(0, 4).Equals("kill"))
			{
				Human_Mod_GraduateSchool.getins().Init_Client_mod(client, text);
				return;
			}
			NetChat.OnReceive(clientId, nick, text);
			for (int i = 0; i < this.readyclients.Count; i++)
			{
				if (this.readyclients[i] != client)
				{
					this.SendReliable(this.readyclients[i], stream);
				}
			}
			Human_Mod_GraduateSchool.getins().Init_Client_mod(client, text);
		}
Example #4
0
 public void OnRelayConnection(NetHost client)
 {
     NetChat.Print(string.Format(ScriptLocalization.MULTIPLAYER.Relayed, client.name));
 }