Page 1 of 1

*discontinued* ArcAdmin

Posted: Wed Jun 22, 2016 9:25 pm
by iPlayer
DISCONTINUED
This admin system has been discontinued in favor of Source.Python Admin

Image
Source Code: https://bitbucket.org/kirillmysnik/arcadmin/src/
Downloads: https://bitbucket.org/kirillmysnik/arcadmin/downloads

WHAT'S THIS?
ArcAdmin is a Source.Python-powered modular admin system written specifically for such plugins as ArcJail and ArcRPG, although it can be used as a standalone admin panel.

VIDEO DEMO


INSTALLATION
1. Install Source.Python and then SpamProofCommands, MOTDPlayer, Advanced TranslationStrings custom packages on your dedicated server.
2. From the downloaded archive of ArcAdmin, copy contents of srcds folder to your gamemod folder (e.g. cstrike).
3. Add the following line to your cfg/autoexec.cfg:

Code: Select all

sp plugin load arcadmin

4. Open addons/source-python/data/plugins/arcadmin/config.ini with any text editor and configure the following line:

Code: Select all

uri=sqlite:///{arcadmin_data_path}/arcadmin.db

You may leave it as is if you want to use SQLite database - recommended choice for most cases.
5. If you haven't already, install and configure Flask (preferably nginx+uWSGI+Flask combo) and MOTDPlayer on your web-server.
6. From the downloaded archive of ArcAdmin, copy contents of flask folder to your Flask folder (so that motdplayer_applications folder is merged); contents of flask-templates folder to Flask templates folder; contents of flask-static folder to the static folder of your web-server installation.
7. Currently ArcAdmin supports only its own database-based auth provider. Add the following line to the arcadmin_admins table of your database:

Code: Select all

steamid = <your steamid as a server owner>
name = <alias for this admin entry, e.g. iPlayer>
permissions = <JSON-object where keys are flags and values are permissions. E.g.: {"*": 99} >
active = <1 to enable admin rights, 0 to disable. E.g.: 1>

For the SQLite database, you can use DB Browser for SQLite to alter the arcadmin.db.
Image
Just load the plugin once, and the file will be created, then you can edit it.
8.Start the server, join it and type arcadmin in your console or !arcadmin in chat - the main popup will apear.

AVAILABLE COMMANDS
Chat
!arcadmin - brings main popup up
!bans - brings Bans page up (when using this command from chat, the page may disappear instantly - just type it again)
Client
arcadmin - brings main popup up
bans - brings Bans page up
Server
arcadmin_reload_admins - starts the process of reloading admins list from all auth backends

I don't have nginx+uWSGI+Flask combo, what should I do?
On the same machine with your SRCDS: install Python 2.7, install pip for it, and execute the following commands:

Code: Select all

pip install flask
pip install flask-sqlalchemy

(you may also do this from virtual environment to avoid installing Flask and Flask-SQLAlchemy globally)

Create a folder somewhere called, for example, my_motdplayer_root.
Download MOTDPlayer and unpack its contents this way:
flask -> my_motdplayer_root
flask-static -> my_motdplayer_root/static
flask-templates -> my_motdplayer_root/templates
After doing so, you will have the following folders in your my_motdplayer_root: motdplayer, motdplayer_applications, static, templates.

Then create a file my_motdplayer_root/settings.py with the following contents:

Syntax: Select all

SQLALCHEMY_DATABASE_URI = 'sqlite:///C:\\my_motdplayer_root\\database.db'  # Full path to the file "database.db" inside of your folder
#SQLALCHEMY_DATABASE_URI = 'sqlite:////home/iplayer/my_motdplayer_root/database.db' # Note four slashes ("////") on linux
SECRET_KEY = 'ALKJWALDJHDNLKPU2149012091851290510825121' # Random unique set of digits and letters


Then run a file called runserver_sample.py. Make sure you run it with your Python 2.7 interpreter, not Python 3.x

Don't forget to copy secret salt from your SRCDS, as described on MOTDPlayer release page.

Why so complicated?
Because of MOTDPlayer. Though, I'm going to make a video tutorial on how to install nginx + uWSGI + Flask + MOTDPlayer and SRCDS with some plugins on Debian.

Re: (alpha) arcadmin

Posted: Thu Jun 23, 2016 8:12 am
by L'In20Cible
Looks good from the video so far, nice work!

Re: (alpha) arcadmin

Posted: Thu Jun 23, 2016 9:02 am
by iPlayer
Thanks!

Re: (alpha) arcadmin

Posted: Thu Jun 23, 2016 5:56 pm
by La Muerte
Sweet. You're on to something good.

Re: (alpha) arcadmin

Posted: Thu Jun 23, 2016 6:04 pm
by iPlayer
Thanks! But I'm afraid most people won't bother to install it, setup process is rather complicated. That's the main problem that worries me :(