Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo Smit committed Feb 13, 2016
1 parent 64ac73c commit ecddc1d
Show file tree
Hide file tree
Showing 57 changed files with 5,593 additions and 0 deletions.
68 changes: 68 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
WolfAdmin module for Wolfenstein: Enemy Territory servers.
Copyright (C) 2015 Timo 'Timothy' Smit

REQUIREMENTS

* Wolfenstein: Enemy Territory server
* NoQuarter mod (1.2.7 or higher, maybe 1.2.5 works as well)
* Lua 5.1 library and Lua modules enabled (installed binaries)
* A MySQL server is required if you want to use alias listing, warn and
level history. Otherwise the module will not work, so please make sure
you have one. If you want to make use of a MySQL server, the module
requires an additional MySQL library (luasql.mysql).
In case you do not have the LuaSQL MySQL library installed, you are
able to download this library from the WolfAdmin file database at
http://dev.timosmit.com/files/wolfadmin/.

INSTRUCTIONS (NEW)

* Unpack the /luascripts folder into your /nq directory
* Unpack the contents of the /config folder into your /nq directory (or
/.etwolf/nq on Linux systems)
* Optionally, copy the contents of the cvars.cfg to your own server
configuration file
* Copy the .pk3 file corresponding to this WolfAdmin version to your
/nq directory
* Modify /nq/wolfadmin.cfg to your needs
* Modify /nq/shrubbot.cfg to add WolfAdmin specific flags
* Add /luascripts/wolfadmin/main.lua to the lua_modules cvar
* Run the .sql script in /database/new on your MySQL server
* Run your server

INSTRUCTIONS (UPGRADE)

* Unpack the /luascripts folder into your /nq directory
* Run the .sql script in /database/upgrade/previous-version-here on your
MySQL server
* Run your server

TROUBLESHOOTING

* libmysqlclient.so.15: cannot open shared object file: No such file or
directory
This means you need an additional library for the LuaSQL module, which is
used by WolfAdmin for the database connection. This file can usually be
downloaded via your package manager or from the WolfAdmin file database
at http://dev.timosmit.com/files/wolfadmin/. After downloading you will
have to copy this file to your fs_basepath (usually the root folder of
the server, where the etded file is located).
* WolfAdmin config will not get loaded/one of greetings/rules is not loaded
Make sure that there are two empty lines (containing no spaces) at the
end of your .cfg files. Due to the loading mechanism WolfAdmin uses, you
have to add these completely empty lines, right at the end. Additionally,
between two blocks of information you also have to leave an empty line.
Check the config files in the /config folder for an example.

WEBSITE

Check out the website for a full documentation.

http://dev.timosmit.com/wolfadmin/

BUGS

Please report your bugs at

http://dev.timosmit.com/bugtracker/?project_id=1

Thanks in advance :-) Happy bug hunting!
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions config/cvars.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// WolfAdmin specific CVARs
set g_fileGreetings "greetings.cfg"
set g_fileRules "rules.cfg"
set g_fileSprees "sprees.cfg"

set g_welcomeMessage "^dwolfadmin: ^9This server is running WolfAdmin, type ^7/wolfadmin ^9for more information."
set g_welcomeArea 3

set g_greetingArea 3
set g_botGreetings 1

set g_evenerMinDifference 2
set g_evenerMaxDifference 5
set g_evenerInterval 30

set g_voteNextMapTimeout 0
set g_restrictedVotes ""

set g_renameLimit 3
set g_renameInterval 60

set g_spreeRecords 1
set g_botRecords 1

set g_warnHistory 1

set g_announceRevives 1
8 changes: 8 additions & 0 deletions config/greetings.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[level]
level = 0
greeting = Welcome ^7[N]^9!

[user]
guid = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
greeting = Welcome the console!

40 changes: 40 additions & 0 deletions config/rules.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[rule]
shortcut = sk
rule = ^1NO ^7spawnkilling^9!

[rule]
shortcut = tk
rule = ^1NO ^7teamkilling^9!

[rule]
shortcut = tb
rule = ^1NO ^7teambleeding^9!

[rule]
shortcut = xp
rule = ^1NO ^7XP whoring^9!

[rule]
shortcut = lan
rule = ^7English ^9in ^7main ^9and ^7team chat^9.

[rule]
shortcut = chat
rule = ^1NO ^7insulting ^9or ^7swearing^9!

[rule]
shortcut = advert
rule = ^7Do ^1NOT ^7advertise^9!

[rule]
shortcut = push
rule = ^7Do ^1NOT ^9push your ^7team mates^9!

[rule]
shortcut = level
rule = ^7Do ^1NOT ^9ask for ^7admin levels^9!

[rule]
shortcut = bug
rule = ^7Do ^1NOT ^9use ^7map bugs^9/^7exploits^9!

Empty file added config/sprees.cfg
Empty file.
8 changes: 8 additions & 0 deletions config/wolfadmin.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[db]
type = mysql
hostname = localhost
port = 3306
database = wolfadmin
username = wolfadmin
password = suchasecret

67 changes: 67 additions & 0 deletions database/new/wolfadmin.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
CREATE TABLE IF NOT EXISTS `players` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`guid` char(32) NOT NULL,
`ip` varchar(40) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `guid` (`guid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `aliases` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`player` int(10) unsigned NOT NULL,
`alias` varchar(128) NOT NULL,
`cleanalias` varchar(128) NOT NULL,
`lastused` int(10) unsigned NOT NULL,
`used` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `playerid_idx` (`player`),
CONSTRAINT `aliasplayer` FOREIGN KEY (`player`) REFERENCES `players` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `levels` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`player` int(10) unsigned NOT NULL,
`level` int(11) NOT NULL,
`admin` int(10) unsigned NOT NULL,
`datetime` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `leveladmin_idx` (`admin`),
KEY `levelplayer` (`player`),
CONSTRAINT `leveladmin` FOREIGN KEY (`admin`) REFERENCES `players` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `levelplayer` FOREIGN KEY (`player`) REFERENCES `players` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `warns` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`player` int(10) unsigned NOT NULL,
`reason` varchar(128) NOT NULL,
`admin` int(10) unsigned NOT NULL,
`datetime` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `playerid_idx` (`player`),
KEY `invoker_idx` (`admin`),
CONSTRAINT `warnadmin` FOREIGN KEY (`admin`) REFERENCES `players` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `warnplayer` FOREIGN KEY (`player`) REFERENCES `players` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `maps` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`lastplayed` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `records` (
`mapid` int(10) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL,
`date` int(10) unsigned NOT NULL,
`record` smallint(5) unsigned NOT NULL,
`player` int(10) unsigned NOT NULL,
PRIMARY KEY (`mapid`,`type`),
KEY `ksplayer_idx` (`player`),
CONSTRAINT `kspreeplayer` FOREIGN KEY (`player`) REFERENCES `players` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spreemap` FOREIGN KEY (`mapid`) REFERENCES `maps` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `players` (`id`, `guid`, `ip`) VALUES (1, 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', '127.0.0.1');
INSERT INTO `aliases` (`id`, `player`, `alias`, `lastused`, `used`) VALUES (1, 1, 'console', 0, 0);
21 changes: 21 additions & 0 deletions database/upgrade/1.0.0a1/wolfadmin.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CREATE TABLE `maps` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`lastplayed` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE `records` (
`mapid` int(10) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL,
`date` int(10) unsigned NOT NULL,
`record` smallint(5) unsigned NOT NULL,
`player` int(10) unsigned NOT NULL,
PRIMARY KEY (`mapid`,`type`),
KEY `ksplayer_idx` (`player`),
CONSTRAINT `kspreeplayer` FOREIGN KEY (`player`) REFERENCES `players` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spreemap` FOREIGN KEY (`mapid`) REFERENCES `maps` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `wolfadmin`.`players` (`id`, `guid`, `ip`) VALUES (1, 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', '127.0.0.1');
INSERT INTO `wolfadmin`.`aliases` (`id`, `player`, `alias`, `lastused`, `used`) VALUES (1, 1, 'console', 0, 0);
2 changes: 2 additions & 0 deletions database/upgrade/1.0.0b/wolfadmin.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE `wolfadmin`.`aliases`
ADD COLUMN `cleanalias` VARCHAR(128) NOT NULL AFTER `alias`;
Loading

0 comments on commit ecddc1d

Please sign in to comment.