Skip to content

About

Local/SourceBans++ ban management for CS2 via Metamod

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

CS2 Admin

Downloads Last commit Open issues Closed issues Size GitHub Workflow Status

Metamod Admin plugin for CS2 with SM style configuration and SB++ support.

Shared maplist with cs2-rockthevote.

API

Other Metamod: Source plugins can access public methods found in ics2admin.h and forwards.h

#include "interfaces/cs2admin/ics2admin.h"

// In AllPluginsLoaded or later:
ICS2Admin *admin = (ICS2Admin *)g_SMAPI->MetaFactory(
    CS2ADMIN_INTERFACE, nullptr, nullptr);

if (admin && admin->HasFlag(slot, CS2ADMIN_FLAG_BAN))
    // player can ban
#include "interfaces/cs2admin/forwards.h"

ICS2AdminForwards *fwd = (ICS2AdminForwards *)g_SMAPI->MetaFactory(
    CS2ADMIN_FORWARDS_INTERFACE, nullptr, nullptr);

Installation

Requirements

  • CS2 Server (Recommended to use SteamRT3 Docker)
  • MetaMod: Source 2.0
  • sql_mm
  • (Optional) MySQL Database
  • (Optional) SB++ Web Panel (Tested only on 1.8+)
  • (Optional) mm-cs2menus - when loaded, targeting commands typed with no arguments (e.g. !ban, !kick, !mute, !report, !map) open an in-game picker instead of printing usage. Players are grouped by team, and the ban/mute/gag/silence/kick/report form sets duration and reason on one screen. Its "Other" reason takes the next chat line, hidden from everyone. !addban picks from recently disconnected players.
  • (Optional) mm-cs2rockthevote - !map and !maps use its map list, and !map shows !nominate's table.

How to

  1. Get the latest release for your operating system (linux/windows).
  2. Extract the contents of the release archive in your server's root folder /game/csgo/.
  3. Configure the main cfg in /game/csgo/cfg/cs2admin/core.cfg with database credentials and other preferences.
  4. Configure Admins in admins.cfg or admins_simple.ini, Admin Groups in admin_groups.cfg and Admin overrides in admin_overrides.cfg (these can be directly copied from existing SM cfg with the same names). They and tags.cfg ship as *.example.*, copy each without the .example.
  5. Create a new file called maplist.txt or rename the bundled maplist.example.txt file to it, then add your maps to the file. Not needed when mm-cs2rockthevote uses the CS2KZ API pool (KzApiMaplist).

The cs2admin plugin mirrors SourceMod's Admin configuration structure completely. This means the following articles are valid here too:

Usage

See COMMANDS

Build

Prerequisites

  • This repository is cloned recursively (ie. has submodules)
  • python3
  • ambuild, make sure ambuild command is available via the PATH environment variable;
  • MSVC (VS build tools)/Clang installed for Windows/Linux.

AMBuild

mkdir -p build && cd build
python3 ../configure.py --enable-optimize
ambuild

Docker

docker compose run --rm build

Credits

Contributing

Feel free to create PRs or issues regarding anything, but this is very much just for fkz and I will not implement bloat like funcommands.

About

Local/SourceBans++ ban management for CS2 via Metamod

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Contributors

Languages