Parent Directory | Revision Log
Revision 45 - (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 : | ian | 45 | #define VERSION "0.3" |
24 : | ian | 1 | |
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 : | ian | 45 | |
32 : | ian | 1 | p_baseurl = register_cvar( "sv_downloadbaseurl", "", FCVAR_PROTECTED ) |
33 : | p_sid = register_cvar( "sv_downloadserverid", "", FCVAR_PROTECTED ) | ||
34 : | ian | 45 | } |
35 : | |||
36 : | public plugin_cfg() | ||
37 : | { | ||
38 : | set_task(6.1, "delayed_load") | ||
39 : | } | ||
40 : | |||
41 : | public delayed_load() | ||
42 : | { | ||
43 : | ian | 1 | //p_dlurl = |
44 : | get_cvar_pointer( "sv_downloadurl" ) | ||
45 : | |||
46 : | new urlstr[100],map[36] | ||
47 : | get_pcvar_string( p_baseurl, urlstr, 99 ) | ||
48 : | if( strlen( urlstr ) ) | ||
49 : | { | ||
50 : | new sid[20] | ||
51 : | get_pcvar_string( p_sid, sid, 10 ) | ||
52 : | if( strlen( sid ) ) format( sid, 19, "&sid=%s", sid ) | ||
53 : | |||
54 : | get_mapname( map, 35 ) | ||
55 : | format( urlstr, 99, "%s?map=%s%s&res=", urlstr, map, sid ) | ||
56 : | |||
57 : | set_cvar_string( "sv_downloadurl", urlstr ) | ||
58 : | } | ||
59 : | } |
Contact | ViewVC Help |
Powered by ViewVC 1.0.4 |