Monthly Target: $400 Donations: $140
 35% 

Notices

Spray 'n Display (incl. Web Panel)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Geit
Senior Member
Join Date: Oct 2009
Location: Home
Plugin ID:
1685
Plugin Version:
1.11
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    94 
    Plugin Description:
    Spray 'n Display allows you to see all the sprays that have been used on your server in a simple web panel, along with admin tools to block inappropriate sprays
    Old 05-24-2010 , 19:45   Spray 'n Display (incl. Web Panel)
    Reply With Quote #1

    Spray 'n Display allows you to see all the sprays that have been used on your server in a simple web panel, along with admin tools to block inappropriate sprays

    Updating 1.0 to 1.1

    • Run this on the SQL database
      Code:
      ALTER TABLE `sprays`  ADD COLUMN `ip` VARCHAR(16) NOT NULL AFTER `steamid`;
    • Reupload index.php and badspray.png
    • Reupload compiled plugin.

    Links:
    Spray Tracker in action. (XenForo)
    DevIL
    ImageMagick


    Requirements:

    • SRCDS server with SM installed
    • Web Server:
      • PHP 5.2 or later
      • MYSQL 4.1 or later
    • Imagemagick (commandline)
    • DevIL image Library 1.7.8
    Known bugs:
    Some sprays may sometimes fail to convert, the cause is unknown.

    Credits:
    Original idea and reference: Ubercow and the rest at nom-nom-nom.us etc
    Original code: Darkimmortal, Geit - Gamingmasters.co.uk
    vBulletin intergrate to Barebones conversion of web script: Reag - Reager.org, LasPlagas (CrudeOil) - rrerr.me

    Installation:

    1l. For linux, you are first required to compile vtfconv with the DevIL library, to do this just run the compile file which is included within the package.
    1w. For Windows, simply extract vtfconv.exe and DevIL.dll to your windows\system32 folder or any other folder in your system PATH.
    2. You now need to setup the webpanel, see below for installation instructions for Barebones and vBulletin installation
    3. Setup the following cron (windows users can use cronw or equivalent) job: */5 * * * * php server/path/to/sprays/sprays/cron/sprays.php &> /dev/null
    • That will set the file to be executed every 5 minutes, the script automatically downloads the vtfs and sends them though vtfconv, making a series of pngs which imagemagick then merges together as a gif, the script then deletes the vtfs and the png frames.
    • Inside sprays.php you can disable the deletion of the vtf files by commenting out line 138.
    4. Compile spraytracker.sp, edit if needed as the plugin automatically connects to the default mysql entry on sourcemod.
    5. Setup your sourcemod databases.cfg to set it so the plugin can connect to the mysql database.
    6. Upload plugin once done and change map to get player details, if no errors player info should now be presented inside the mysql database.

    If all went right your system should now be running.


    Barebones Webpanel Setup

    1. First you need to edit the settings file (webpanel/barebones/settings.php), this holds the INdir, OUTdir, FTP and MySQL details.
    • If you are using an external server FTP will be required to extract the files, if your server is localhost you can disable FTP and set the indir to the server path to where your src server is located/tf/downloads, if not use the provided example and match it to your FTP folder. Once this file is setup, save and close.
    2. Proceed to upload the following folders to your webspace under the dir /sprays/: cron, css, images, inc, js and (If on Linux) CHMOD cron/log to 777, this will enable the cron job to print out a simple log of every time it downloads a file to see if it failed or not.
    3. Please now import sprays.sql into your created database, if you haven't created one, Do it now, otherwise step 2 was a waste of a time.
    4. Remember to edit index.php's line 31, this is used for the simple login system to allow admins to block sprays from view on the server.

    vBulletin Webpanel Setup

    1. First you need to edit the settings file (webpanel/vbulletin/settings.php), this holds the INdir, OUTdir, FTP and MySQL details and the GID's of the admin groups.
    • If you are using an external server FTP will be required to extract the files, if your server is localhost you can disable FTP and set the indir to the server path to where your src server is located/tf/downloads, if not use the provided example and match it to your FTP folder. Once this file is setup, save and close.
    2. Add a new template called 'drops_index' to your Vbulletin installation (AdminCP -> Styles & Templates -> Style Manager -> Add new Template) using the content from webpanel/vbulletin/drops_index.txt -- You will need to add the template for every active style installed!
    2. Proceed to upload the following folders to your webspace under the dir {VBULLETINROOT}/sprays/: cron, css, images, inc, js and (If on Linux) CHMOD cron/log to 777, this will enable the cron job to print out a simple log of every time it downloads a file to see if it failed or not.
    3. Please now import sprays.sql into your created database, if you haven't created one, Do it now, otherwise step 2 was a waste of a time.

    ChangeLog
    :

    1.1:

    • Added IP tracking to the plugin.
    • Changed index.php so it uses ip:port for server names rather than just port.
    • Changed badspray.png to be more generic
    • (1.11) - Ninja update to fix a bug that would crash servers.
    Attached Files
    File Type: sp Get Plugin or Get Source (spraytracker.sp - 1356 views - 5.3 KB)
    File Type: zip SprayTracker.zip (812.7 KB, 1492 views)

    Last edited by Geit; 07-18-2013 at 21:41.
    Geit is offline
    Reag
    Junior Member
    Join Date: Aug 2009
    Old 05-24-2010 , 19:47   Re: Spray Tracker
    Reply With Quote #2

    Hope you all enjoy.

    Last edited by Reag; 05-24-2010 at 19:53.
    Reag is offline
    LordVader!
    Member
    Join Date: Nov 2009
    Old 05-25-2010 , 14:30   Re: [ANY] Spray Tracker
    Reply With Quote #3

    Nice!
    LordVader! is offline
    Darkimmortal
    Senior Member
    Join Date: Aug 2008
    Location: UK
    Old 05-25-2010 , 16:16   Re: [ANY] Spray Tracker
    Reply With Quote #4

    Enjoy
    __________________

    Last edited by Darkimmortal; 05-26-2010 at 21:58.
    Darkimmortal is offline
    Geit
    Senior Member
    Join Date: Oct 2009
    Location: Home
    Old 05-25-2010 , 16:19   Re: Spray 'n Display (incl. Web Panel)
    Reply With Quote #5

    Added support for Windows Servers, changed the thread title, and fixed the public CVar not actually being in the plugin.

    Last edited by Geit; 05-25-2010 at 16:42.
    Geit is offline
    Darkimmortal
    Senior Member
    Join Date: Aug 2008
    Location: UK
    Old 05-25-2010 , 16:26   Re: Spray 'n Display (incl. Web Panel)
    Reply With Quote #6

    Should add that Windows users will need to set up an equivalent scheduled task or use cronw.
    __________________
    Darkimmortal is offline
    Inflikted
    SourceMod Donor
    Join Date: Jan 2009
    Old 05-26-2010 , 13:47   Re: Spray 'n Display (incl. Web Panel)
    Reply With Quote #7

    i get this error when attempting to compile for linux

    Code:
    vtfconv.c:47: error: ‚ILuint‚ undeclared (first use in this function)
    vtfconv.c:47: error: (Each undeclared identifier is reported only once
    vtfconv.c:47: error: for each function it appears in.)
    vtfconv.c:47: error: expected ‚;‚ before ‚ImgId‚
    vtfconv.c:48: error: ‚ILenum‚ undeclared (first use in this function)
    vtfconv.c:48: error: expected ‚;‚ before ‚Error‚
    vtfconv.c:58: error: ‚IL_VERSION_NUM‚ undeclared (first use in this function)
    vtfconv.c:58: error: ‚IL_VERSION‚ undeclared (first use in this function)
    vtfconv.c:70: error: ‚ImgId‚ undeclared (first use in this function)
    vtfconv.c:89: error: ‚IL_FILE_OVERWRITE‚ undeclared (first use in this function)
    vtfconv.c:90: error: ‚IL_RGBA‚ undeclared (first use in this function)
    vtfconv.c:90: error: ‚IL_UNSIGNED_BYTE‚ undeclared (first use in this function)
    vtfconv.c:99: error: ‚IL_NUM_IMAGES‚ undeclared (first use in this function)
    vtfconv.c:110: error: ‚IL_FALSE‚ undeclared (first use in this function)
    vtfconv.c:118: error: ‚Error‚ undeclared (first use in this function)
    Inflikted is offline
    FrozenHaxor
    Senior Member
    Join Date: Jun 2009
    Location: Poland
    Old 05-26-2010 , 15:24   Re: Spray 'n Display (incl. Web Panel)
    Reply With Quote #8

    Looks epic ;)
    __________________
    FrozenHaxor is offline
    Inflikted
    SourceMod Donor
    Join Date: Jan 2009
    Old 05-26-2010 , 15:47   Re: Spray 'n Display (incl. Web Panel)
    Reply With Quote #9

    question, I dont really code for sourcemod or anything. Only for php. So this may be entirely wrong. But wouldn't it be more efficient for the gameservers to send the sprays to a centralized location using sockets extension rather than having the web server do it and entering in all the ftp info's/folders/etc. and then have the cron only convert the files from vtf to gif, rather than trying to mass connect to so many different ftp servers. I only say this because we run 16 servers across 4 different dedicated hosts, I'm not sure how well cron would do in completing the task quickly and reliably.

    Thanks for the plugin though, its an awesome concept that a lot of server admins will love!!
    Inflikted is offline
    Darkimmortal
    Senior Member
    Join Date: Aug 2008
    Location: UK
    Old 05-26-2010 , 17:55   Re: Spray 'n Display (incl. Web Panel)
    Reply With Quote #10

    Quote:
    Originally Posted by Inflikted View Post
    question, I dont really code for sourcemod or anything. Only for php. So this may be entirely wrong. But wouldn't it be more efficient for the gameservers to send the sprays to a centralized location using sockets extension rather than having the web server do it and entering in all the ftp info's/folders/etc. and then have the cron only convert the files from vtf to gif, rather than trying to mass connect to so many different ftp servers. I only say this because we run 16 servers across 4 different dedicated hosts, I'm not sure how well cron would do in completing the task quickly and reliably.
    Just modify it to load a different config based on the command line args sent to the script and have 4 cron jobs set up - better to take as much load off the gameserver as possible

    Quote:
    Originally Posted by Inflikted View Post
    i get this error when attempting to compile for linux

    Code:
    vtfconv.c:47: error: ‚ILuint‚ undeclared (first use in this function)
    vtfconv.c:47: error: (Each undeclared identifier is reported only once
    vtfconv.c:47: error: for each function it appears in.)
    vtfconv.c:47: error: expected ‚;‚ before ‚ImgId‚
    vtfconv.c:48: error: ‚ILenum‚ undeclared (first use in this function)
    vtfconv.c:48: error: expected ‚;‚ before ‚Error‚
    vtfconv.c:58: error: ‚IL_VERSION_NUM‚ undeclared (first use in this  function)
    vtfconv.c:58: error: ‚IL_VERSION‚ undeclared (first use in this  function)
    vtfconv.c:70: error: ‚ImgId‚ undeclared (first use in this function)
    vtfconv.c:89: error: ‚IL_FILE_OVERWRITE‚ undeclared (first use in this  function)
    vtfconv.c:90: error: ‚IL_RGBA‚ undeclared (first use in this function)
    vtfconv.c:90: error: ‚IL_UNSIGNED_BYTE‚ undeclared (first use in this  function)
    vtfconv.c:99: error: ‚IL_NUM_IMAGES‚ undeclared (first use in this  function)
    vtfconv.c:110: error: ‚IL_FALSE‚ undeclared (first use in this function)
    vtfconv.c:118: error: ‚Error‚ undeclared (first use in this function)
    Do you have DevIL installed?

    On Fedora simply 'yum install DevIL DevIL-devel' and on other distros you will probably need to build it yourself (Debian particularly has too old a version in its repos).
    __________________

    Last edited by Darkimmortal; 05-28-2010 at 08:53.
    Darkimmortal is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 14:30.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode