Ingame rcon tool, any admin can execute any command
admins need to be added to the sv_config.ini:
Its not compiled or tested .. but I don't have access to my pc
Download
IngameRCON.zip (Size: 2.28 KB / Downloads: 278)
admins need to be added to the sv_config.ini:
Code:
[RCON]
xuids=admin_1_xuid,admin_2_xuid,admin_3_xuidCode:
using System;
using System.Collections.Generic;
using Addon;
namespace plugin_test
{
public class plugin_test : CPlugin
{
List<string> admins = new List<string>();
bool disable = false;
public override ChatType OnSay( string Message, ServerClient Client )
{
if( disable )
return ChatType.ChatAll;
if( Message.StartsWith( "!rcon" ) && admins.Contains( Client.XUID ) )
{
if( Message.Length <= 6 )
TellClient( Client.ClientNum, "^2RCON: ^3Usage: !rcon [COMMAND]", true );
else
{
string cmd = Message.Substring( 6 );
ServerPrint( Client.Name + " used the rcon! command: \"" + cmd + "\"" );
ServerCommand( cmd );
}
return ChatType.ChatNone;
}
return ChatType.ChatAll;
}
public override void OnServerLoad()
{
string l = GetServerCFG( "RCON", "xuids", "" );
if( l == "" )
foreach( string xuid in l.Split( ',' ) )
admins.Add( xuid );
if( admins.Count == 0 )
disable = true;
ServerPrint( "Ingame RCON loaded. Author: iAegle. Version: 1.0" );
}
}
}Its not compiled or tested .. but I don't have access to my pc
Download
IngameRCON.zip (Size: 2.28 KB / Downloads: 278)
(08-10-2011, 12:58)Pozzuh Wrote:Se7en Wrote:Stealed, from cod4 mod ...look who's talking
[Release] Old School Mod v2.2
[Release] Scroll menu



