AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   private plugin (https://forums.alliedmods.net/showthread.php?t=172935)

funstyle 11-27-2011 17:16

private plugin
 
I would like to implement a plugin to do that a code plugin to work only on a particular server or multiple servers to read from a txt put on a site

Excuse my bad English!

sake 11-27-2011 17:43

Re: private plugin
 
Please be more explicit about your request. Also: -> Plugin Request section.

fysiks 11-28-2011 03:42

Re: private plugin
 
Quote:

Originally Posted by funstyle (Post 1603834)
I would like to implement a plugin to do that a code plugin to work only on a particular server or multiple servers

There are threads about this. The common method is to have the plugin get the IP of the server and compare it to a list of acceptable IPs. It's not fool proof but it will prevent the non-programmer types from using it.

The best method is to not give the plugin to anybody that you don't want to have it.

Quote:

Originally Posted by funstyle (Post 1603834)
to read from a txt put on a site

You need to use sockets to read from a website. There might already be something useful written up in the Code Snippets/Tutorials section (I'm guessing by Bugsy). Look in the newest sticky thread by Arkshine for a list of available tutorial/info threads.

sake 11-28-2011 07:27

Re: private plugin
 
I think he is talking about writing ONTO a website. If you are running your own root/vServer you could as well generate an html site and link to that from your www directory. But do not do that too often.

funstyle 11-28-2011 09:14

Re: private plugin
 
Quote:

Originally Posted by fysiks (Post 1603996)
The best method is to not give the plugin to anybody that you don't want to have it.

I have some owners with access to ftp and do not want to steal

T-z3P 11-28-2011 15:25

Re: private plugin
 
You can try something like this (by checking hostname) :

PHP Code:

public CheckServer()
{
    static 
checkhost[64]
    
get_cvar_string("hostname"checkhostcharsmax(checkhost))
    if(
containi(checkhost"BlaBla")==-1)
    {
        
log_amx("This is not a BlaBla server. Server is now shutting down.")
        
server_cmd("exit")
    }


PS: Put this in plugin_init or plugin_cfg.

B3N4K 11-28-2011 15:58

Re: private plugin
 
It simple. Do not put your SMA on server. Put there only your AMXX compiled code. It is like impossible to decode AMXX to SMA. And of course get some protection like T-z3P said.

tuty 11-29-2011 04:54

Re: private plugin
 
you could add a check forip, cuz, server hostname can be changed in same ftp account and your own server that you want the plugin can be stopped...add support for server IP for better working


something like

PHP Code:


stock UTIL_CheckServerAuth
( )
{
    new const 
gYourServerIP[ ] = "92.70.123.4:27015"// and ip example

    
new szServerIp50 ];
    
get_cvar_string"ip"szServerIpcharsmaxszServerIp ) );
    
    if( !
equalszServerIpgYourServerIP ) )
    {
        
log_amx"Server shutting down because IP: <%s> isn't equal to original IP: <%s>"szServerIpgYourServerIP );
        
server_cmd"quit" );
    }



claudiuhks 11-29-2011 09:23

Re: private plugin
 
No, he just want a plugin to read a text file uploaded on a host.

Ain't his language grand enough?

tuty 11-29-2011 11:28

Re: private plugin
 
Quote:

Originally Posted by claudiuhks (Post 1604628)
No, he just want a plugin to read a text file uploaded on a host.

Ain't his language grand enough?

don't try to be smart, and i apologize for not reading his request this time, and tried to help seeing other user's posts


All times are GMT -4. The time now is 08:33.

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