Raised This Month: $32 Target: $400
 8% 

[ REQ] Server Name


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-31-2010 , 10:44   Re: [ REQ] Server Name
Reply With Quote #31

I can't understand why this kind of protection wouldn't be supported here.
Obviously a plugin can't be released with such a protection.

PHP Code:
#include <amxmodx>

new const VERSION[] = "0.0.1"

new const SERVERIP[] = "173.21.157.21:27015"

public plugin_init()
{
    
register_plugin("protected plug"VERSION"ConnorMcLeod")

    new 
szIp[22]
    
get_user_ip(0szIpcharsmax(szIp))

    if( !
equal(szIpSERVERIP) )
    {
        
set_fail_state("Sorry, this plugin is private")
    }

    
// REGISTER STUFF HERE

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-31-2010 at 12:26.
ConnorMcLeod is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-31-2010 , 10:50   Re: [ REQ] Server Name
Reply With Quote #32

Shouldn't it be
Code:
    if( !equal(szIp, SERVERIP) )
?
__________________
hleV is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 01-31-2010 , 18:22   Re: [ REQ] Server Name
Reply With Quote #33

Works like a charm
vL. is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 01-31-2010 , 21:14   Re: [ REQ] Server Name
Reply With Quote #34

thanks it works
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 01-31-2010 , 23:58   Re: [ REQ] Server Name
Reply With Quote #35

IP checking is the best way.
__________________
VMAN is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 02-01-2010 , 02:19   Re: [ REQ] Server Name
Reply With Quote #36

yep but it would be good if its ip and server host name
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 02-01-2010 , 18:13   Re: [ REQ] Server Name
Reply With Quote #37

Nope. IP alone is fine. Each server has a unique IP. If they are on the same machine, they have a unique port
__________________
VMAN is offline
Old 02-01-2010, 19:00
Doc-Holiday
This message has been deleted by Doc-Holiday.
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 02-01-2010 , 21:40   Re: [ REQ] Server Name
Reply With Quote #38

kool but lucky we change host because our old host charges 3$au per slot and also when we change they just change the server name to there community thats why i thought it would be good for server name + port +ip
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 02-01-2010 , 22:03   Re: [ REQ] Server Name
Reply With Quote #39

Quote:
Originally Posted by vL. View Post
Why isnt it supported? And mby some hacker hacks into ur ftp and steals the plugin, it happened to a friend of mine once.
dont let them hack it.
__________________
M249-M4A1 is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 02-01-2010 , 22:13   Re: [ REQ] Server Name
Reply With Quote #40

um its not them. Before we use to host our server with this host and they make backups of our server and when we tell them u wanna chagne host they change our ftp and chagne server name to theres. So its also a protection from host stealing our mod
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
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 16:52.


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