**IW4MAdmin** is an administration tool for [IW4x](https://iw4xcachep26muba.onion.link/), [Pluto T6](https://forum.plutonium.pw/category/33/plutonium-t6), [Pluto IW5](https://forum.plutonium.pw/category/5/plutonium-iw5), and most Call of Duty<74> dedicated servers. It allows complete control of your server; from changing maps, to banning players, **IW4MAdmin** monitors and records activity on your server(s). With plugin support, extending its functionality is a breeze.
If you wish to further customize your experience of **IW4MAdmin**, the following configuration file(s) will allow you to changes core options using any text-editor.
#### `IW4MAdminSettings.json`-- _this file is created after initial setup_
* This file uses the [JSON](https://en.wikipedia.org/wiki/JSON#JSON_sample) specification, so please validate it before running **IW4MAdmin**
`WebfrontBindUrl`
* Specifies the address and port the webfront will listen on.
* The value can be an [IP Address](https://en.wikipedia.org/wiki/IP_address):port or [Domain Name](https://en.wikipedia.org/wiki/Domain_name):port
|tempban|tb|temporarily ban a client for specified time (defaults to 1 hour)|True|!tb \<player\> \<duration (m\|h\|d\|w\|y)\> \<reason\>|Administrator|
|alias|known|get past aliases and ips of a client|True|!known \<player\>|Moderator|
|baninfo|bi|get information about a ban for a client|True|!bi \<player\>|Moderator|
IW4Madmin functionality can be extended by writing additional plugins in C#.
#### JavaScript
IW4MAdmin functionality can be extended using JavaScript.
The JavaScript parser supports [some](https://github.com/sebastienros/jint/issues/343) of ECMAScript 6's new features.
#### Plugin Object Template
In order to be properly parsed by the JavaScript engine, every plugin must conform to the following template.
```js
const plugin = {
author: 'YourHandle',
version: 1.0,
name: 'Sample JavaScript Plugin',
onEventAsync(gameEvent, server) {
},
onLoadAsync(manager) {
},
onUnloadAsync() {
},
onTickAsync(server) {
}
}
```
#### Required Properties
-`author`— [string] Author of the plugin (usually your name or online name/alias)
-`version`— [float] Version number of your plugin (useful if you release several different versions)
-`name`— [string] Name of your plugin (be descriptive!)
-`onEventAsync`— [function] Handler executed when an event occurs
-`gameEvent`— [parameter object] Object containing event type, origin, target, and other info (see the GameEvent class declaration)
-`server`— [parameter object] Object containing information and methods about the server the event occured on (see the Server class declaration)
-`onLoadAsync`— [function] Handler executed when the plugin is loaded by code
-`manager`— [parameter object] Object reference to the application manager (see the IManager interface definition)
-`onUnloadAsync`— [function] Handler executed when the plugin is unloaded by code (see live reloading)
-`onTickAsync`— [function] Handler executed approximately once per second by code *(unimplemented as of version 2.1)*
-`server`— [parameter object] Object containing information and methods about the server the event occured on (see the Server class declaration)
### Live Reloading
Thanks to JavaScript's flexibility and parsability, the plugin importer scans the plugins folder and reloads the JavaScript plugins on demand as they're modified. This allows faster development/testing/debugging.
If you'd like to receive notifications on your Discord guild, configure and start `DiscordWebhook.py`
#### Requirements
- [Python 3.6](https://www.python.org/downloads/) or newer
- The following [PIP](https://pypi.org/project/pip/) packages (provided in `requirements.txt`)
```certifi>=2018.4.16
chardet>=3.0.4
idna>=2.7
pip>=18.0
requests>=2.19.1
setuptools>=39.0.1
urllib3>=1.23
```
#### Configuration Options
-`IW4MAdminUrl`— Base url corresponding to your IW4MAdmin `WebfrontBindUrl`.
Example http://127.0.0.1
-`DiscordWebhookNotificationUrl`— [required] Discord generated URL to send notifications/alerts to; this includes **Reports** and **Bans**
Example https://discordapp.com/api/webhooks/id/token
-`DiscordWebhookInformationUrl`— [optional] Discord generated URL to send information to; this includes information such as player messages
-`NotifyRoleIds`— [optional] List of [discord role ids](https://discordhelp.net/role-id) to mention when notification hook is sent
#### Launching
With Python installed, open a terminal/command prompt window open in the `Webhook` folder and execute `python DiscordWebhook.py`
---
## Misc
#### Anti-cheat
This is an [IW4x](https://iw4xcachep26muba.onion.link/) only feature (wider game support planned), that uses analytics to detect aimbots and aim-assist tools.
To utilize anti-cheat, enable it during setup **and** copy `_customcallbacks.gsc` from `userraw` into your `IW4x Server\userraw\scripts` folder.
The anti-cheat feature is a work in progress and as such will be constantly tweaked and may not be 100% accurate, however the goal is to deter as many cheaters as possible from IW4x.
By default, all **IW4MAdmin** information is stored in `Database.db`. Should you need to reset your database, this file can simply be deleted. Additionally, this file should be preserved during updates to retain client information.
Setting the `ConnectionString` property in `IW4MAdminSettings.json` will cause **IW4MAdmin** to attempt to use a MySQL connection for database storage.