Skip to content

BenjaminSchaaf/vibe-rcon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vibe.rcon

This is an implementation of the source RCON protocol, used to communicate remotely with game servers.

You can read about the source RCON protocol on the developer wiki.

Installing

You can install this package using dub:

dependency "vibe-rcon" version="~>1.0"
"dependencies": {
    "vibe-rcon": "~>1.0",
}

Usage

import vibe.rcon;

auto client = new RCONClient("119.15.96.156", 27041);

// You can use standard source RCON authentication
bool success = client.authenticate("<rcon password>");

// You can send rcon commands
string response = client.exec("status");

// You can also easily retrieve console variables (convars)
string value = client.readConVar("sv_password");

// For more direct control you can directly send and receive RCON packets
client.send(RCONPacket(2, RCONPacket.Type.AUTH_RESPONSE, "hi"));
RCONPacket response = client.receive();

// Or you can let the client handle the packet ID for you
int id = client.send(RCONPacket.Type.AUTH_RESPONSE, "hi");
RCONPacket response = client.receive();
assert(response.id == id);

License

This project is distributed under the MIT license.

About

Source RCON Protocol implementation for vibe.d

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages