Raised This Month: $32 Target: $400
 8% 

Automatic demo recording v1.6.4 (steambans support added)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Timiditas
Senior Member
Join Date: Apr 2009
Plugin ID:
1040
Plugin Version:
1.6.4
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    6 
    Plugin Description:
    Makes sure sourceTV bot spawns on server (re)start/crash and starts/stops recording depending on presence of human clients
    Old 07-25-2009 , 21:34   Automatic demo recording v1.6.4 (steambans support added)
    Reply With Quote #1

    _

    new in v1.6.4
    - removed the need of the file autodemo_changemap.cfg
    plugin will just restart the map that is currently running if sourcetv fakeclient is absent

    - new cvar: sm_autodemo_playercount - default 2
    recording is started only if this amount of REAL players are on the server


    Required server settings:
    tv_enable 1
    tv_autorecord 0 (!)


    Well I have sourceTV record everything for quite some time now.
    And it bugged me that it recorded demos even if nobody was on the server, so our available space got hooked pretty quick.

    This plugin checks the presence of HUMAN clients on connection and disconnection of players, and starts/stops the sourceTV recording feature.

    Also, if your server has just been started, or it crashed and auto-restarted, it changes to a new map so the sourceTV bot will connect.

    When you run this plugin, make sure the cvar tv_autorecord
    is set to ZERO!

    The only hooked event is player_team, so this plugin works on all source mods that support this event.

    Update to 1.2
    Just a small but crucial bugfix that prevented recording after a mapchange

    v1.2d, nothing changed except for debug messages and logging
    log goes to "autodemo_smx.log" in the sourcemod log folder.
    timed checks, critical faults are logged to autodemo_smx_critical.log

    v1.3 - bugfix, exchanged "OnClientDisconnect" for "OnClientDisconnect_Post"
    exchanged hooked event with "OnMapStart"-forward

    v1.4
    Code:
    sm_autodemo_filename_format "%m-%d-%y %H.%M-*H.*M *MAP"
    
    Filename format of the demos.
     Default: "%m-%d-%y %H.%M-*H.*M *MAP"
    Note that you cannot use asterisks. I use them as escape char here for map name and ending time.
    For the ending time, only *H and *M are supported. They equal %H and %M
    I will NOT check if you use invalid filename characters for your target platform
    AFAIK, unix supports colons in filenames. Windows does not. Just stick to dots.
    
    For supported % placeholders, refer to:
    http://cplusplus.com/reference/clibrary/ctime/strftime/
    
    
    
    Do not record when there are only spectators
     Default: "1"
    sm_autodemo_ignore_spectators "1"
    
    
    0 = Don't delete old demos, 1 = Check on mapchange only, 2 = Check every x seconds(ttl_tick)
     Default: "1"
    sm_autodemo_ttl_checkmode "1"
    
    Hours to keep demos on disk before deletion. default = 168 = 7 days
     Default: "168"
    sm_autodemo_ttl_hours "168"
    
    Interval in seconds, that are checked for old demos that can be deleted
     Default: "120.0"
    sm_autodemo_ttl_tick "120.0"
    
    Recording is started only if this amount of REAL players are on the  server. Must be >0
     Default: "2"
    sm_autodemo_playercount "2"
    The console command
    sm_autodemo_query
    tells you if recording is in progress currently, and to what file.


    v1.5
    a thousands of bugfixes and re-design

    sm_autodemo_steambans cvar has been removed, due to some engine limitations. See start of this posting.

    The "status" command has been replaced by a logging function. You get a .log file that has the same name
    as the demofile, where the 'simulated' status output goes into, so you have the SteamIDs of the players.
    These will be deleted together with the demofile if they exceed TTL.

    v1.6
    sm_autodemo_ttl_hours * changed
    // Hours to keep demos on disk before deletion. Default unlimited (0). Must be >=1 otherwise its unlimited.
    // Having this, and ttl_kilobyte = 0 overrides ttl_checkmode to 0
    // Default: "0"
    sm_autodemo_ttl_hours "0"

    sm_autodemo_ttl_kilobyte * added
    // Max size in kilobytes of demos before the oldest gets deleted. Default unlimited (0). Must be >=51200 otherwise its unlimited. Max size is 4294967295 KB = 3,9 Therabyte
    // Having this, and ttl_hours = 0 overrides ttl_checkmode to 0
    // Default: "0"
    sm_autodemo_ttl_kilobyte "0"

    Note that ttl_kilobyte takes only completed demos into account.
    This can be changed, if someone demands.
    If any of ttl_kilobyte, ttl_hours or ttl_checkmode is 0, no new demofile will be written to the log!!
    (The demo is written to the log after the recording has been stopped. So you could use this to prevent certain single demos from being deleted)

    1.6.1
    Fixed plugin thinking dead players are spectators
    1.6.2
    Improved SourceTV detection.
    New CVAR:
    sm_autodemo_mapchange
    - Do a mapchange if SourceTV absent
    0 = never, 1 = once, 2 = always
    Default: 1

    Added optional checking if new plugin version is available.
    This feature depends on socket extension.
    If you want to enable that feature, you must uncomment
    //#define SOCKET_ENABLED // Comment this line out to disable Sockets. this line at the top and recompile. (You will need the file socket.inc from the sockets extension in your scripting folder)
    If enabled, it writes a message into SourceMods error log, the new version number and where to get it.

    1.6.3
    Update check feature dropped
    Autodemo Plugin now supports SteamBans plugin
    sb_status is automatically fired when a new player connects and SteamBans was detected running.
    The fake status textfiles are now optional and can be deactivated by setting the cvar sm_autodemo_fakestatus_file to 0

    v1.6.4
    - removed the need of the file autodemo_changemap.cfg
    plugin will just restart the map that is currently running if sourcetv fakeclient is absent

    - new cvar: sm_autodemo_playercount - default 2
    recording is started only if this amount of REAL players are on the server
    Attached Files
    File Type: sp Get Plugin or Get Source (autodemo.sp - 4027 views - 19.7 KB)
    __________________


    Last edited by Timiditas; 07-01-2010 at 13:02.
    Timiditas is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 07-30-2009 , 16:25   Re: Automatic demo recording v1.4
    Reply With Quote #2

    So, to get that clear, it would suffice to issue an sb_status on every client connect, right?
    Is there a public cvar that steambans registers, that I can check for if steambans is installed?
    If not, I'll just use a cvar myself that the admin must set via cfg, so sb_status gets called.

    ~

    Regarding filesizes, splitting would work I think. But it would be VERY unconvenient for the peeps watching the demos.

    ~

    I doubt that filecompression is possible via sourcemod.

    ~edit:
    I have attached a version for anyone that is willing to test, that executes sb_status on every new client connection if the new cvar "sm_autodemo_steambans" is set to 1.
    If you already have the config file in your cfg/sourcemod directory, you need to add that cvar by hand.
    Is there any cvar that steambans registers on the server, that I could automatically check for if steambans is installed?
    __________________


    Last edited by Timiditas; 08-02-2009 at 18:12.
    Timiditas is offline
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 07-31-2009 , 14:31   Re: Automatic demo recording v1.4
    Reply With Quote #3

    I will try to test it this weekend, also it may be wise to delay the sb_status by a few seconds (maybe like 10-20) so that there is time to ensure that the steamid is not pending. (just in case)
    __________________
    zeroibis is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 07-31-2009 , 14:42   Re: Automatic demo recording v1.4
    Reply With Quote #4

    Oh yeah, I didn't think of that. Maybe you want to wait a few minutes and test it with the delay incorporated`?

    ~

    Now this is strange.
    autodemo_list.txt is bloated up to 43MB and filled with crap!
    This can make your server not respond or crash.
    File renaming does not work on a windows source dedicated server. Don't know why. (solved)
    __________________


    Last edited by Timiditas; 08-03-2009 at 13:26.
    Timiditas is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 08-02-2009 , 13:04   Re: Automatic demo recording v1.5
    Reply With Quote #5

    File updated to 1.5. If anyone is using pre-1.5 plugin, update IMMEDIATELY and delete the file
    addons\sourcemod\data\autodemo_list.txt
    Thanks.

    I must have been blind, however I found a function in the sourcemod api reference, that can return the size of a file. So limiting the filesize for all demos will be in v1.6

    ~

    STATUS (AND SB_STATUS ?) DOES NOT GET RECORDED BY SOURCETV (engine limitation)!
    See beginning of first posting in this thread.
    sb_status support removed, status replaced by logging
    __________________


    Last edited by Timiditas; 08-02-2009 at 21:10.
    Timiditas is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 08-06-2009 , 07:05   Re: Automatic demo recording v1.5
    Reply With Quote #6

    I still see servers around that use pre-1.5 version plugin. You MUST update if you don't want your server to become unstable!

    Quote:
    Originally Posted by Timiditas View Post
    File updated to 1.5. If anyone is using pre-1.5 plugin, update IMMEDIATELY and delete the file
    addons\sourcemod\data\autodemo_list.txt
    Thanks.
    __________________

    Timiditas is offline
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 11-04-2009 , 16:34   Re: Automatic demo recording v1.6.3 (steambans support added)
    Reply With Quote #7

    However when I run sm_autodemo_query it says autodemo.smx: Currently not recording when my server is full. Here is my config:
    Code:
    // This file was auto-generated by SourceMod (v1.2.4)
    // ConVars for plugin "autodemo.smx"
    
    
    // Enable/Disable the plugin
    // -
    // Default: "1"
    sm_autodemo_enabled "1"
    
    // Write faked output of 'status' command to a textfile with same name like demofile
    // -
    // Default: "1"
    sm_autodemo_fakestatus_file "0"
    
    // Filename format of the demos. See configfile for description!
    // -
    // Default: "%m-%d-%y %H.%M-*H.*M *MAP"
    sm_autodemo_filename_format "%m-%d-%y %H.%M-*H.*M *MAP"
    
    // Do not record when there are only spectators
    // -
    // Default: "1"
    sm_autodemo_ignore_spectators "1"
    
    // Do a mapchange if SourceTV absent. 0 = never, 1 = once, 2 = always
    // -
    // Default: "1"
    sm_autodemo_mapchange "1"
    
    // 0 = Don't delete old demos, 1 = Check on mapchange only, 2 = Check every x seconds(ttl_tick)
    // -
    // Default: "0"
    sm_autodemo_ttl_checkmode "1"
    
    // Hours to keep demos on disk before deletion. Default unlimited (0). Must be >=1 otherwise its unlimited.
    // -
    // Default: "0"
    sm_autodemo_ttl_hours "48"
    
    // Max size in kilobytes of demos before the oldest gets deleted. Default unlimited (0). Must be >=51200 otherwise its unlimited. Max size is 4294967295 KB = 3,9 Therabyte
    // -
    // Default: "0"
    sm_autodemo_ttl_kilobyte "0"
    
    // Interval in seconds, that are checked for old demos that can be deleted
    // -
    // Default: "120.0"
    sm_autodemo_ttl_tick "120.0"
    I checked server.cfg and I do not have tv_autorecord anywhere and I assume it is 0 by default so I have not touched that.

    If you need any more info just let me know.
    __________________
    zeroibis is offline
    Barkelay
    Junior Member
    Join Date: Jul 2019
    Old 08-11-2019 , 04:07   Re: Automatic demo recording v1.6.4 (steambans support added)
    Reply With Quote #8

    2 players - does not record a demo
    1 player - records a demo
    WTF!? О_о

    // Recording is started only if this amount of REAL players are on the server. Must be >0
    // -
    // Default: "2"
    sm_autodemo_playercount "2"
    Barkelay is offline
    Dragonshadow
    BANNED
    Join Date: Jun 2008
    Old 09-28-2009 , 12:05   Re: Automatic demo recording v1.6.2
    Reply With Quote #9

    Has anyone checked if this works with tf2?
    Edit: seems to work.

    Last edited by Dragonshadow; 09-28-2009 at 12:34.
    Dragonshadow is offline
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 10-08-2009 , 12:45   Re: Automatic demo recording v1.6.2
    Reply With Quote #10

    Something interesting I found when looking around the net today: http://www.steambans.com/forums.php?fid=4&tid=6901

    Quote:
    Now that finally the 24/7 HLTV demo recorder for HL1 / GoldSource mods has been approved by Steambans, all that is missing is the same for HL2 / Source mods like CS:S or DOD:S.

    Here is the HLTV page: http://www.steambans.com/support.php?c=info&page=hltv

    With SRCTV the same should be possible for HL2 mods - even easier actually, since no additional programm has to be used, SRCTV is a part of SRCDS. Unfortunately with my idea you still ned Matie's EventScripts, but hey - that's easy to install
    This mod for HL1 servers came out a year ago. Based off this I think it it clear that steambans will accept tv recordings with sb_status output in them. Also it is clearly possible to get the output to appear in the demo one way or the other.

    Hopefully support for sb_status can be reevaluated with this new information.

    From other searches it looks like they are fine with any sort of demo as long as you can get the sb_status in it. This is why they currently do not currently accept source tv demos b/c they have not seen anyone be able to get the command to appear in console. This same rule also applied to HLtv until the above posted mod was released a year ago.
    __________________

    Last edited by zeroibis; 10-08-2009 at 12:47.
    zeroibis is offline
    Reply



    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:19.


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