Parent Directory | Revision Log
Revision 25 - (view) (download)
1 : | ian | 25 | /* |
2 : | Content Server Util v0.2 | ||
3 : | Copyright (C) 2007 Ian (Juan) Cammarata | ||
4 : | |||
5 : | This program is free software: you can redistribute it and/or modify | ||
6 : | it under the terms of the GNU Affero General Public License as | ||
7 : | published by the Free Software Foundation, either version 3 of the | ||
8 : | License, or (at your option) any later version. | ||
9 : | |||
10 : | This program is distributed in the hope that it will be useful, | ||
11 : | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 : | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 : | GNU Affero General Public License for more details. | ||
14 : | |||
15 : | You should have received a copy of the GNU Affero General Public License | ||
16 : | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 : | -------------------------------------------------------------------------------- | ||
18 : | http://ian.cammarata.us | ||
19 : | */ | ||
20 : | ian | 1 | #include <amxmodx> |
21 : | #include <amxmisc> | ||
22 : | |||
23 : | #define VERSION "0.2" | ||
24 : | |||
25 : | new p_baseurl, p_sid //, p_dlurl | ||
26 : | |||
27 : | public plugin_init( ) | ||
28 : | { | ||
29 : | register_plugin( "Content Server", VERSION, "Ian Cammarata" ) | ||
30 : | register_cvar( "content_server_version", VERSION, FCVAR_SERVER ) | ||
31 : | |||
32 : | p_baseurl = register_cvar( "sv_downloadbaseurl", "", FCVAR_PROTECTED ) | ||
33 : | p_sid = register_cvar( "sv_downloadserverid", "", FCVAR_PROTECTED ) | ||
34 : | //p_dlurl = | ||
35 : | get_cvar_pointer( "sv_downloadurl" ) | ||
36 : | |||
37 : | new urlstr[100],map[36] | ||
38 : | get_pcvar_string( p_baseurl, urlstr, 99 ) | ||
39 : | if( strlen( urlstr ) ) | ||
40 : | { | ||
41 : | new sid[20] | ||
42 : | get_pcvar_string( p_sid, sid, 10 ) | ||
43 : | if( strlen( sid ) ) format( sid, 19, "&sid=%s", sid ) | ||
44 : | |||
45 : | get_mapname( map, 35 ) | ||
46 : | format( urlstr, 99, "%s?map=%s%s&res=", urlstr, map, sid ) | ||
47 : | |||
48 : | set_cvar_string( "sv_downloadurl", urlstr ) | ||
49 : | } | ||
50 : | } |
Contact | ViewVC Help |
Powered by ViewVC 1.0.4 |