ID:173072
 
Can some one help me make or find a ban system with this option:
if i wanne unban i have a list of banned poeple.
Check out Full Ban. It's located in Libraries.
In response to SSJ4_Gohan_Majin
no full ban does not have it thats the unban ware you have 2 set the key in it
You can use this code. It is simple and it works. However, it wont permenantly ban a person from a server. It will ban them until the server is rebooted or closes down.
mob
verb
Ban()
set category = "Control Panel"
var/list/M=list()
for(var/mob/target in world)
if(target:key)
M+=target
var/ban=input("Who do you want to ban?","Ban") in M
var/why=input("Why are you banning them?","Why") as text
global:bannedlist.Add("[ban:key]")
global:bannedlistip.Add("[ban:client.address]")
global:bannedlistreason.Add("[why]<br>Banned by: [usr.key]")
world << "<b>[usr] has banned [ban].<br>Reason: [why]"
sleep(10)
del(ban)
Unban()
set category = "Control Panel"
if(global:bannedlist.len==0)
usr << "<b>There is no one to unban."
return
var/unban=input("Who do you want to unban?","Unban") in global:bannedlist
var/l=global:bannedlist.len
var/n
while(n!=unban)
n=global:bannedlist[l]
l-=1
l+=1
global:bannedlist-=global:bannedlist[l]
global:bannedlistip-=global:bannedlistip[l]
global:bannedlistreason-=global:bannedlistreason[l]
Check_Banned()
set category = "Control Panel"
var/l=global:bannedlist.len
var/t=""
while(l>0)
t+="Key: [global:bannedlist[l]]<br>Ip: [global:bannedlistip[l]]<br> Reason: [global:bannedlistreason[l]]<hr>"
l-=1
usr << browse("[t]")
var/global/list/bannedlist=list("Yuugi","Bert")
var/global/list/bannedlistreason=list("He smells :D","I said so!")
var/global/list/bannedlistip=list("12.12.12.12","12.13.14.15")
mob
Login()
sleep(5)
if(global:bannedlist.Find("[usr.key]"))
usr << "<b><font color='#000000'>You have been banned from this game."
del(usr)
if(global:bannedlistip.Find("[usr.client.address]"))
usr << "<b><font color='#000000'>You have been banned from this game."
del(usr)