Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Serverkeys

David O edited this page Dec 4, 2015 · 4 revisions

Beginning from version 0.1.3 there is support for serverkeys.
Serverkeys can be used to associate a server key to a group of admin keys, thus making it easier to have servers specific reports.
Modules which support this feature are the MySQL module and the TS3 module.

Server

On the server side each module has a convar for the server key, in this example we'll show the config of those.
Each server can have either the same key, or a different one.
We recommend to use the same key for each module per server.

MySQL module

The MySQL module's key can be set as followed

sm_calladmin_server_key "CSS_MINIGAME"

TS3 module

The TS3 module's key can be set as followed

sm_calladmin_ts3_key "CSS_MINIGAME"

Web

MySQL

The base key list looks like this

$access_keys = array
(
	'' => array
	(
		'',
	),
);

The first array key is the key which is associated with the following keys.

Here is an example for the setup we've done above.

$access_keys = array
(
	'SomeSecureKeyYourAdminUses' => array
	(
		'CSS_MINIGAME',
	),
);

The first key is the key which your admin sets, for example in his client, the following entries define which servers are associated with that key.

Here is a bigger example.

$access_keys = array
(
	'SomeKeyForCssAdmins' => array
	(
		'CSS_Server1',
		'CSS_Server2',
	),
	
	'SomeKeyForCsgoAdmins' => array
	(
		'CSGO_Server_1',
		'CSGO_Server_2',
	),
);

TS3

We use the same technique for the TS3 script, though it differs a little bit.
Here is an example for the setup we've done above.

$access_keys = array
(
	'CSS_MINIGAME' => array
	(
		'uid1',
		'uid2',
	),
);

In this case the given uids will only receive a message if the server has the given key.

Here is a bigger example.

$access_keys = array
(
	'CSS_MINIGAME' => array
	(
		'uid1',
		'uid2',
	),
	
	'CSS_SURF' => array
	(
		'uid2',
	),
	
	'CSS_BHOP' => array
	(
		'uid3',
	)
);
Clone this wiki locally