PDA

View Full Version : Some kind of security addon i need..


JokeRRR
04-27-2008, 04:56
well im actually kinda know howto write/edit plugins ive done 2-3 new tho but when i do it, my 'dumb dedicated server owner' just gets it from my server and puts it to his server.. lol i mean he steals it :D so i have an idea about this.. i want to put something like
"look for server's ip, if its not "x.x.x.x" then say "DONT STEAL AGAIN" else run the plugin.." something like that but i dont know howto look for server's ip in scripting i mean what kind of if clause i need to use for this?
the idea is, i will put rows to all of my plugins so they will work only on my server.. i guess it will look like;

new ip[32]
ip=get the ip command
if ( ip != "x.x.x.x" ) { server_cmd("say dont steal") }
else {
rest of the plugin i want to put
}

something like this :) or u can use plugin_handled vs vs tho.. thanks for any advices :)

|PJ| Shorty
04-27-2008, 05:14
new ip[32]
get_user_ip(0,ip,31,0)
if(!equal(ip,"1.1.1.1:27015")) { //your ip
//server_cmd(....) or something else
return PLUGIN_HANDLED
}
//rest of plugin

JokeRRR
04-27-2008, 07:54
yeah!! works!! thanks mate!!

purple_pixie
04-28-2008, 11:32
So ... wait, this is an Open Source forum, dedicated to Open Source software, and this guy gets a request for a plugin-privatiser??

And to be fair, if someone is providing you a (free?) dedicated server, allowing him to use your plugins seems quite fair.

Gods, I hate this "I don't want anyone else to have my plugins" idea.

Especially when someone comes onto Allied Mods and requests a plugin first, then asks how to make a plugin private.
If someone were all "How do I stop others using this plugin" and I found it was one I wrote, I would be very, very unimpressed.
Open Source is the win.

grimvh2
04-28-2008, 11:41
Gods, I hate this "I don't want anyone else to have my plugins" idea.


same here , whats wrong with it?
plugins are for public use and is allowed for evryone