ID:171334
 
i have no clue how to do it...but if i could id like to know how...
client.address

This is the variable that contains the IP address of the connected client.
So basically, it's simple:

mob/admin/verb/IP_Ban()
set category="Admin"
var/list/pcs[0]
for(var/client/C in world)pcs+=C
var/client/C=input("Please select the user you'd like to ban.")as null|anything in pcs
if(!C)return
banned.Add(C.address)

client/New()
if(banned.Find(address))
src<<"<font color=black><b>You have been banned!"
del(src)
..()


You may wonder why I changed the font color at the message.
This is because that your game may have the trait of having a script assigned. As good as this can be, the script will be unloaded when you logout. Setting the font color to black will help 90% of the BYOND community to read it. The other 10% were smart enough to actually change their background color, so they'll be able to extract the message even if they don't see it!

I could search up the .system class and stuff like that to generate a client-side error (like "Connection failed." etc.) but I'm too lazy at the moment!
In response to Phoenix Man
thanks..
In response to Phoenix Man
Phoenix Man wrote:
As good as this can be, the script will be unloaded when you logout.

To solve this, you should make a global list and save it everytime you ban/unban someone. And on client/New(), have the client load the savefile and load the list, then check if that client.key or address is in the list.
A much better solution would be This.

--Goz