Exemple #1
0
            public JuicedRemoteConsole(JuicedRcon parent)
            {
                this.parent = parent;
                rootProfile = JuicedRconConfig.Profile.CreateRootProfile();

                port     = Interface.Oxide.Config.Rcon.Port;
                commands = new Dictionary <string, Func <string[], string> >
                {
                    { CommandType.CommandJuicedRconEnable, (args) => parent.EnableCommand(args) },
                    { CommandType.CommandJuicedRconDisable, (args) => parent.DisableCommand(args) },
                    { CommandType.CommandJuicedRconProfile, (args) => parent.ProfileCommand(args) }
                };
            }
Exemple #2
0
 /// <summary>
 /// OnOpen triggers when a new RCON session is established
 /// </summary>
 protected override void OnOpen()
 {
     _address = Context.UserEndPoint.Address;
     JuicedRcon.Log(LogType.Log, $"Established rcon connection {Profile?.DisplayName}[{_address}]");
 }
Exemple #3
0
 /// <summary>
 /// OnError triggers when an RCON session has an error
 /// </summary>
 /// <param name="e"></param>
 protected override void OnError(ErrorEventArgs e)
 {
     JuicedRcon.Log(LogType.Exception, $"An exception has occurred: {e.Message}");
 }
Exemple #4
0
 /// <summary>
 /// OnClose triggers when an RCON session is closed
 /// </summary>
 /// <param name="e"></param>
 protected override void OnClose(CloseEventArgs e)
 {
     JuicedRcon.Log(LogType.Log, $"Closed rcon connection {Profile?.DisplayName}[{_address}]");
 }