*discontinued* ArcAdmin

Release your plugins here!
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

*discontinued* ArcAdmin

Postby iPlayer » Wed Jun 22, 2016 9:25 pm

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.
Last edited by iPlayer on Tue Apr 18, 2017 6:29 pm, edited 3 times in total.
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: (alpha) arcadmin

Postby L'In20Cible » Thu Jun 23, 2016 8:12 am

Looks good from the video so far, nice work!
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: (alpha) arcadmin

Postby iPlayer » Thu Jun 23, 2016 9:02 am

Thanks!
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
La Muerte
Administrator
Posts: 180
Joined: Sun Jul 15, 2012 1:48 pm
Location: Belgium
Contact:

Re: (alpha) arcadmin

Postby La Muerte » Thu Jun 23, 2016 5:56 pm

Sweet. You're on to something good.
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: (alpha) arcadmin

Postby iPlayer » Thu Jun 23, 2016 6:04 pm

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 :(
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 28 guests