[Include] IpCheck - Adverticement
#1

Hey guys,
as I've seen a few questions about it on the forum and also got some requests by friends about something like this,
I decided to create a small function that allows you to check any text/string for an included IP.

The include contains a simple "IsIp" function that behaves like a boolean.
Here's an example how to use it:
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(IsIp(text))
    {
        SendClientMessage(playerid, 0x999999AA, "You may not advertice!");
        Kick(playerid);
        return 0;
    }
    return 1;
}
So if I would enter "182.395.158.21" (or w/e) into the chat and would use my example above, it would send me a message and kick me from the server.

I hope you guys like it!

External download: My website
or internal download: attached below
Reply
#2

Nice idea
Reply
#3

Prevent from writing in other way?
Es:
Quote:

182,268,1,2

So writing an ip using commas or different character or making it understandable as this:
Quote:

Go to 192 168 5 254

P.S. Please post on pastebin, I don't want to download just to see the code
Reply
#4

Nope, it doesn't prevent players from writing an IP with , : - or w/e... I'm gonna to add such a feature to it, later.
I'll also upload a pastebin
Reply
#5

Works nice for me, thanks.
Reply
#6

This is useless. People will always find a way to advertise on your server. Rather than relying on a faulty system, have a good admin team who knows how to operate. It helps to have anti-spam systems and stuff implemented as well; this way they cannot spam their server IP, website, or name before an admin can ban them.
Reply
#7

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
This is useless. People will always find a way to advertise on your server. Rather than relying on a faulty system, have a good admin team who knows how to operate. It helps to have anti-spam systems and stuff implemented as well; this way they cannot spam their server IP, website, or name before an admin can ban them.
True, but admins have a life too and yeah you can better do all you can against advertising/cheaters/hackers as just leaving it as it ?

Nice script m8
Reply
#8

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
This is useless. People will always find a way to advertise on your server. Rather than relying on a faulty system, have a good admin team who knows how to operate. It helps to have anti-spam systems and stuff implemented as well; this way they cannot spam their server IP, website, or name before an admin can ban them.
Correct, this function cannot prevent players from adverticing, spamming, etc., however it can help you. It can be used as a support for spam scripts or w/e. Rember: This is just a function, not a whole script.
Reply
#9

Good job
Reply
#10

Quote:
Originally Posted by Sascha
Посмотреть сообщение
Nope, it doesn't prevent players from writing an IP with , : - or w/e... I'm gonna to add such a feature to it, later.
I'll also upload a pastebin
ya...panto right...
they can make an advertise with out :: , : - or w/e
like this
Код:
Join My Server! All IP 10 0 0 1 PORT 7777
so i suggest you to make a script thet blocks you from sending up to 3 numbers(with space between them)
(for example: 3 numbers like thet :" 123 123 123 " and not like this: "123" )
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)