Absurd Minds

More than 100 years without a motto.
It is currently 21 Nov 2024 19:51

All times are UTC-04:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 22 Mar 2012 13:38 
Offline
User avatar

Joined: 25 Mar 2010 19:07
Posts: 8392
I have some HLTVs watching various servers. I'd like to be able to write a script that checks the server, say, ever 10 seconds, and if it finds that there is a player connected, automatically starts recording an HLTV demo. If there are no users connected, it would stop the HLTV demo.

Also, if this script could purge HLTV demos after 2 weeks, that would be spectacular.

_________________
Server list
Donate


Top
   
PostPosted: 22 Mar 2012 14:09 
Offline
User avatar

Joined: 10 Jan 2012 23:06
Posts: 300
Location: 5860 Kirk Rd, Canfield, OH 44406
ten seconds ?? wouldn't that create a lot of demo files?? that could build up pretty quickly in your mem....

_________________
Walk through life and pay attention...


Top
   
PostPosted: 22 Mar 2012 14:27 
Offline
User avatar

Joined: 25 Feb 2012 19:18
Posts: 908
Location: Ontario, Canada
This exists apparently
http://www.hltv.org/?pageid=204&type=ar

The purge would be simple, again in /etc/crontab for 4AM everyday. This should delete files 14 days old
00 4 * * * /usr/bin/find /hltv/path -mtime +14 -exec rm {} \;

_________________
Image


Top
   
PostPosted: 22 Mar 2012 15:09 
Offline
User avatar

Joined: 25 Mar 2010 19:07
Posts: 8392
Quote:
ten seconds ?? wouldn't that create a lot of demo files?? that could build up pretty quickly in your mem....
Oh, maybe... I thought it would be intelligent enough to check and see if one was already recording.

_________________
Server list
Donate


Top
   
PostPosted: 22 Mar 2012 17:27 
Offline
User avatar

Joined: 25 Mar 2010 19:21
Posts: 5029
and the hltv will be recording to a harddrive here at our place that is either 250 or 500 gigs I forget. we are gonna try to get some good footage from our pubbing to make some videos.

_________________
I'm so official, like a dealer with a pistol or referee with a whistle.


Top
   
PostPosted: 22 Mar 2012 23:46 
Offline
User avatar

Joined: 20 Mar 2012 19:18
Posts: 401
will we be able to see the demos?


Top
   
PostPosted: 22 Mar 2012 23:48 
Offline
User avatar

Joined: 25 Mar 2010 19:07
Posts: 8392
Hopefully, if I can get it working.

_________________
Server list
Donate


Top
   
PostPosted: 11 Apr 2012 21:20 
Offline
User avatar

Joined: 25 Mar 2010 19:07
Posts: 8392
I posted this on alliedmodders, and after a few weeks got the most amazing plugin from 8088. I've attached the necessary files, as well as the installation instructions.

Requirements:
  • PHP 5.2.8 or higher, with PDO
  • MySQL 5 or higher
Installation:
  1. extract and upload everything to your web space (preferrably into a directory that is password protected)
  2. create a database and import hlds.sql
  3. edit lib/db.php and change the values of $db_host, $db_user, $db_password and $db_database
  4. open index.php in your browser and start adding/editing your servers
  5. edit the path to db.php in cronjob/cronjob.php if you move conjob.php to a different location (recommended, but not required)
  6. create a cronjob to have cronjob/cronjob.php executed at regular intervals:
    1. this requires the path to db.php to be absolute:
      Code:
      php /path/to/cronjob.php
    2. and this allows for a relative path to db.php:
      Code:
      cd /path/to/cronjob.php && php cronjob.php


Attachments:
hltv (3).zip [19.46 KiB]
Downloaded 585 times

_________________
Server list
Donate
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC-04:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited