ID:190381
 
1 dime!! What a ripoff :D

Im gonna bann you!....er...um...hmm.

j/k
In response to Dareb
An IP ban code isn't too hard, really..
In response to Hanns
No its not, but it is almost worth 1 dime to have it done for you if you dont want to bother with it like me. Although i already have a good one thats both key and ip.
In response to Scoobert
Scoobert wrote:
No its not, but it is almost worth 1 dime to have it done for you if you dont want to bother with it like me. Although i already have a good one thats both key and ip.

http://www.byond.com/hub/hub.cgi?hub=RaeKwon/IPBan =P

RaeKwon
In response to RaeKwon
LOL Siientx got ripped off i was gonna buy it but then Reakwon i guess stole his costomers :D

O'... by the way How do you use the ip ban code Rea -_-?
is it like just automatic?
In response to RaeKwon
If there was proper grammar, decent coding technique, and not every line was commented (or close enough to every line), I'd say good job Rae.
In response to OneFishDown
He needs to spend some time learning to decompress and write clean, readable code, instead of trying to make it as compact and unreadable as possible. It might make you feel more skilled if you can write compact code that no one can understand, but half the skill in programming really comes from writing readable code.

...

Here's some more banned code for you to grub around with.

banned

var
list/ip_bans[] = list() // List of IPs that were banned.
list/key_bans[] = list() // List of keys that were banned.


proc/Find(mob/mob, message="You've been banned!")

/* If the player's client's IP or key have been banned, delete them. */
if(ip_bans.Find(mob.client.address) || key_bans.Find(mob.client.key))

mob << message
del(mob)

return 1
return 0


proc/Add(mob/mob, message="You've been banned!")

/* If their current IP has not been banned, ban it. */
if(!ip_bans.Find(mob.client.address))
ip_bans[mob.client.address] = mob.client.key


/* If their current key has not been banned, ban it. */
if(!key_bans.Find(mob.client.key))
key_bans[mob.client.key] = mob.client.address

/* Inform the player, delete them, and inform everyone else. */
world << "<b>[mob] has been banned.</b>"
mob << "<b>[message]</b>"
del(mob)

return 1


proc/Remove(mob_key)

/* If the name was found in the key bans list, remove the
connected IP and key from the ban lists. */

if(key_bans.Find(mob_key))

ip_bans -= key_bans[mob_key]
key_bans -= mob_key

return 1
return 0
... USAGE EXAMPLE ...
var/banned/banned = new()

mob/Login()

if(banned.Find(src))
return

..()

mob/verb/Ban(mob/M as mob in world)
banned.Add(M)

mob/verb/UnBan(mob as null|anything in banned.key_bans)
if(banned.Remove(mob))
src << "[mob] has been unbanned."
In response to Pagemaster
Pagemaster wrote:
LOL Siientx got ripped off i was gonna buy it but then Reakwon i guess stole his costomers :D

O'... by the way How do you use the ip ban code Rea -_-?
is it like just automatic?

Just copy and paste the code into your game.

RaeKwon
In response to Druin
Here's some more banned code for you to grub around with.

Why was the code banned?
In response to Lesbian Assassin
Lesbian Assassin wrote:
Why was the code banned?

It was responsible for too many people who didn't know how to code having decent banning systems. =P