Thread: HTTP:X
View Single Post
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 05-22-2016 , 13:44   Re: HTTP:X
Reply With Quote #6

There is set_module_filter() if the API user decides he wants it optional when using natives.
Even if you want it to stay that way, you should wrap it into a stock functions in your include file. Along the lines of:
PHP Code:
stock HTTPX_AutoupdatePlugin(const file_id[], frequency) {
    if ( 
callfunc_begin("AutoupdatePlugin""httpx.amxx") == ) {
        
callfunc_push_int(get_plugin(-1));
        
callfunc_push_str(file_idfalse);
        
callfunc_push_int(frequency);
        
callfunc_end();
    }

and callfunc might be also bad for a reason that it relies on plugin name, that is "httpx.amxx". That's pretty hardcoded in my opinion.


I know this may be going a bit offtopic, but the webserver is basically a module for hosting a HTTP server on top of a HL server. It's a GoldSrc/HL counterpart of Asherkin's HTTP server. It lets one program dynamic web pages with Pawn, just like you would do with PHP for example. Just a fun project and I brought that up as your plugin revolves around HTTP.
Cross-server communication was just an example what those two could do if they got their powers combined.

Last edited by klippy; 05-22-2016 at 13:45.
klippy is offline