Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Squirrelies/NS2AdminLib

Open more actions menu

Repository files navigation

NS2AdminLib

A .NET Standard C# library for administering a Natural Selection 2 server.

Example usage:

using (NS2Admin admin = new NS2Admin(@"MyUser", @"MyPass", "www.mydomain.com", 80))
{
    // Illustrates how to get server information including current tick rate, players connected, player list, etc.
    NS2ServerInfo info = admin.GetServerInfo();

    // Sends an RCON command to the server. In this example, we send the sv_say command with some parameters we retrieved from the info call previously.
    admin.Rcon(string.Format("sv_say Server Perf. [Tick Rate: {0}] [Uptime: {1}] [Players: {2}] [Bots: {3}]", Math.Round(info.frame_rate, 2, MidpointRounding.AwayFromZero), TimeSpan.FromSeconds(info.uptime), info.RealPlayers, info.Bots));
}

About

A .NET Standard C# library for administering a Natural Selection 2 server.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.