[Half-Life AMXX] / content_server.sma Repository:
ViewVC logotype

View of /content_server.sma

Parent Directory Parent Directory | Revision Log Revision Log

Revision 45 - (download) (annotate)
Sat Oct 16 23:55:40 2010 UTC (10 years ago) by ian
File size: 1742 byte(s)
Fixed content_server.sma to work on first map load.
Added content_server.php and .htaccess files to be used in combination with content_server.sma
Content Server Util v0.2
Copyright (C) 2007 Ian (Juan) Cammarata

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
#include <amxmodx>
#include <amxmisc>

#define VERSION "0.3"

new p_baseurl, p_sid //, p_dlurl

public plugin_init( )
	register_plugin( "Content Server", VERSION, "Ian Cammarata" )
	register_cvar( "content_server_version", VERSION, FCVAR_SERVER )

	p_baseurl = register_cvar( "sv_downloadbaseurl", "", FCVAR_PROTECTED )
	p_sid = register_cvar( "sv_downloadserverid", "", FCVAR_PROTECTED )

public plugin_cfg()
	set_task(6.1, "delayed_load")

public delayed_load()
	//p_dlurl = 
	get_cvar_pointer( "sv_downloadurl" )
	new urlstr[100],map[36]
	get_pcvar_string( p_baseurl, urlstr, 99 )
	if( strlen( urlstr ) )
		new sid[20]
		get_pcvar_string( p_sid, sid, 10 )
		if( strlen( sid ) ) format( sid, 19, "&sid=%s", sid )
		get_mapname( map, 35 )
		format( urlstr, 99, "%s?map=%s%s&res=", urlstr, map, sid )
		set_cvar_string( "sv_downloadurl", urlstr )

ViewVC Help
Powered by ViewVC 1.0.4