Wiki

Clone wiki

SubSpace Continuum / SubSpace Continuum Directory

SubSpace Continuum Directory

Directory Structure

Your operating system file directory should contain the following:

conf/modules.conf
conf/global.conf
SSCD.exe
pthreadGC2.dll
libmysql.dll

modules.conf

Stores program module load order.
Lines beginning with ; are commented and that module will not be loaded.
Beware that the order in which modules are listed can be very sensitive.
The file contents should be as follows:

logman
log_console
mainloop

net
;enc_null
enc_vie
;enc_cont
;enc_ssc
proto_core

config
;sql

dataman
;data_sql
;data_file

dir_server
dir_client

global.conf

Stores program configuration values. Modules access their settings here.
The file contents should be as follows:

[General]
RefreshMinutes=60

[Listen]
ClientPort=4990
ServerPort=4991
AllowNull=1
AllowVIE=1
AllowCont=1
AllowSSC=1

[SQL]
HostName=localhost
UserName=SSCD
Password=SSCD
DataBase=SSCD
RetryDelay=30
WriteDelay=30

SQL

SSCD can optionally save to and load from a MySQL database.
You will need to first prepare your database prior to operation as follows:

CREATE USER 'SSCD'@'%' IDENTIFIED BY 'SSCD';
CREATE DATABASE 'SSCD';
GRANT ALL ON SSCD.* TO 'SSCD'@'%';

CREATE TABLE Zones
(
    ZoneID SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
    Name VARCHAR(50) NOT NULL,
    Password VARCHAR(50) NOT NULL,
    FirstSeen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    LastSeen TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP,
    IP INT UNSIGNED NOT NULL DEFAULT '0',
    Port SMALLINT UNSIGNED NOT NULL DEFAULT '0',
    Scores SMALLINT UNSIGNED NOT NULL DEFAULT '0',
    Version INT UNSIGNED NOT NULL DEFAULT '0',
    Description VARCHAR(400) NOT NULL DEFAULT ' ',
    PRIMARY KEY (ZoneID),
    UNIQUE KEY (Name)
);

CREATE TABLE PlayerCounts
(
    RecordID SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
    Name VARCHAR(50) NOT NULL,
    Players SMALLINT UNSIGNED NOT NULL DEFAULT '0',
    Time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (RecordID)
);

DELIMITER $$$
CREATE PROCEDURE PushZone
(IN Name2 VARCHAR(50), IN Password2 VARCHAR(50), IN IP2 INT, IN Port2 SMALLINT, IN Scores2 SMALLINT, IN Version2 INT, IN Description2 VARCHAR(400))
BEGIN
    IF NOT EXISTS(SELECT * FROM Zones WHERE Name=Name2) THEN
        INSERT INTO Zones SET 
            Name=Name2, Password=Password2, IP=IP2, Port=Port2, Scores=Scores2, Version=Version2, Description=Description2;
    ELSE
        UPDATE Zones SET 
            IP=IP2, Port=Port2, Scores=Scores2, Version=Version2, Description=Description2, LastSeen=NOW()
        WHERE Name=Name2 AND Password=Password2;
    END IF;
END $$$
DELIMITER ;

Updated