Raised This Month: $12 Target: $400
 3% 

private plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
funstyle
Member
Join Date: Feb 2010
Location: RO, Bucharest
Old 11-27-2011 , 17:16   private plugin
Reply With Quote #1

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!
__________________
funstyle is offline
Send a message via Yahoo to funstyle
sake
Senior Member
Join Date: Jul 2011
Old 11-27-2011 , 17:43   Re: private plugin
Reply With Quote #2

Please be more explicit about your request. Also: -> Plugin Request section.
__________________
sake is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-28-2011 , 03:42   Re: private plugin
Reply With Quote #3

Quote:
Originally Posted by funstyle View Post
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 View Post
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.
__________________
fysiks is offline
sake
Senior Member
Join Date: Jul 2011
Old 11-28-2011 , 07:27   Re: private plugin
Reply With Quote #4

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.
__________________

Last edited by sake; 11-28-2011 at 07:29.
sake is offline
funstyle
Member
Join Date: Feb 2010
Location: RO, Bucharest
Old 11-28-2011 , 09:14   Re: private plugin
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
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
__________________
funstyle is offline
Send a message via Yahoo to funstyle
T-z3P
Senior Member
Join Date: Apr 2008
Location: Iasi, Romania
Old 11-28-2011 , 15:25   Re: private plugin
Reply With Quote #6

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.
__________________



Last edited by T-z3P; 11-28-2011 at 15:26.
T-z3P is offline
Send a message via Yahoo to T-z3P Send a message via Skype™ to T-z3P
B3N4K
Senior Member
Join Date: Jun 2008
Location: Czech Republic
Old 11-28-2011 , 15:58   Re: private plugin
Reply With Quote #7

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.
B3N4K is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-29-2011 , 04:54   Re: private plugin
Reply With Quote #8

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" );
    }

__________________

Last edited by tuty; 11-29-2011 at 05:00.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 11-29-2011 , 09:23   Re: private plugin
Reply With Quote #9

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

Ain't his language grand enough?
__________________

Last edited by claudiuhks; 11-29-2011 at 09:23.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-29-2011 , 11:28   Re: private plugin
Reply With Quote #10

Quote:
Originally Posted by claudiuhks View Post
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
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:11.


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