Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 548 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 548 Bytes

rcon.v

RCON client in V

Documentation

Example

import rcon

fn main() {
	// `rcon.connect_tcp` parameter is string in address:port format
	mut client := rcon.connect_tcp('127.0.0.1:25575')!
	defer {
		client.close() or {}
	}
	// perform authentication. it may return 'invalid password' error
	client.login('mypassw0rd')!

	// execute command. returns string as result
	client.execute('say Hello world')!

	players := client.execute('list')!
	println('Players on server: ${players}')
}