ID:263603
 


Ban_Player(mob/PC/M in world)
set category = "GM"
var/savefile/H = new("H_Admin.ban")
var/Reason
switch(alert("Include a Reason for Banning [M]?","Mute","Yes","No"))
if("Yes")
var/Reason2 = input("What is the reason for Muting [M]")as text
Reason = Reason2
switch(alert("Ban [M]'s Key, IP or Both?","Ban [M]","Key","IP","Both"))
if("Key")
Banned_Key += M.ckey
H["Banned_Key"] << Banned_Key
if("IP")
Banned_IP += M.client.address
H["Banned_IP"] << Banned_IP
if("Both")
Banned_Key += M.ckey
Banned_IP += M.client.address
H["Banned_Key"] << Banned_Key
H["Banned_IP"] << Banned_IP
if(!Reason)
world << "\red [M] has been Banned"
else
world << "\red [M] has been Banned «Reason: [Reason]»"
del(M)

Unban_Player()
set category = "GM"
var/savefile/H = new("H_Admin.ban")
switch(alert("Unban a Key or IP?","Unban","Key","IP"))
if("Key")
var/M = input("What Key do you want to Unban?","Unban Key")as null | anything in Banned_Key
if(!M)src << "No Keys to Unban!";return
Banned_Key -= M
H["Banned_Key"] << Banned_Key
src << "\red [M] has been Unbanned"
GMMessage("[src] Unbanned Key: [M]")

if("IP")
var/M = input("What IP do you want to Unban?","Unban IP")as null | anything in Banned_IP
if(!M)src << "No IPs to Unban!";return
Banned_IP -= M
H["Banned_IP"] << Banned_IP
src << "\red [M] has been Unbanned"
GMMessage("[src] Unbanned IP: [M]")


Unban not working

You're reloading the banned IP.
In response to Xx Dark Wizard xX
well then how do i not Reload the banned ip
In response to Anti-Newb
WRITE YOUR OWN CODE!
In response to Xx Dark Wizard xX
JUST TELL ME HOW TO FIX IT! AND ILL BE ON MY WAY!
In response to Anti-Newb
When dealing with savefiles, the data always goes towards the small side of the << or >> .
EX:
proc/Load()
var/myData
var/savefile/F = new('testfile.sav')
F["DATA"] >> myData // Data travels from the savefile, to 'myData'

proc/Save()
var/myData
var/savefile/F = new('testfile.sav')
F["DATA"] << myData // 'myData' gets sent to the savefile
In response to Flick
Thanks
In response to Anti-Newb
... you're kidding us, right?
In response to Xx Dark Wizard xX
EDIT: It was stolen Zeta code, so my vague post is invaildated. Thanks for pointing that out.
In response to Hamha01
Yeah right. Apparently, you aren't familiar with zeta or, is it, WOTS? Axerob's version is pretty great now, but that old source that got leaked wasn't very good at all. It was buggy and slow.
In response to CaptFalcon33035
CaptFalcon33035 wrote:
Yeah right. Apparently, you aren't familiar with zeta or, is it, WOTS? Axerob's version is pretty great now, but that old source that got leaked wasn't very good at all. It was buggy and slow.

Oh, sorry. I actually am unfamilar with Zeta. Sincerest appoligies. I haven't been here in a long time.
In response to Flick
Data travels to the small end of >> or << not the large end >_> Because it's "sending" the data as if througha funnel, the large end is the top of the funnel, where you pour sugar/water/whatever in, and the small end is where it comes out
In response to CaptFalcon33035
CaptFalcon33035 wrote:
Yeah right. Apparently, you aren't familiar with zeta or, is it, WOTS? Axerob's version is pretty great now, but that old source that got leaked wasn't very good at all. It was buggy and slow.

Actually, WOTS does NOT use a mob/PC path....i assume that is rebirth...not too sure
In response to Tails5
Yeah, thats what I said... >_>

Thanks ;)
In response to Axerob
Rob I Swear 2 God I Was Banned For Something I Never Did I Made A Joke With Stealth And Next Thing U Kno Poof I Was Banned I Would Think It Would Be Fair If U Unbanned Me But If Not WOTS Is A Great Game And I Wish U Luck
In response to Koil
Did you fix it?

I suggest writing your own code as in:

Make it add the player's ckey to a bans.sav file and then upon client login, check the save and kick the ckey if it's a match. As for removal, you can just take it off the list. If you get that far, you can expand your ban by blocking IPs, IP ranges (octet1.octet2.*.*), etc... also look up Lists in the F1 DM help manual.
In response to King Gunnerblast
Yeah, I fixed it a couple weeks ago. And replaced the Unban system with
        
UnBan_Player()
set category = "GM"
var/ListB=input("Which List Do You Want To Remove Something From?","Unban")in list("Key","IP")
if(ListB=="IP")
var/UnBan = input("Remove What From Address Banned List?","UnBan") as null|anything \
in Banned_IP
if(!UnBan) return
Banned_IP -= UnBan
else
var/UnBan = input("Remove What From Key Banned List?","UnBan") as null|anything \
in Banned_Key
if(!UnBan) return
Banned_Key -= UnBan

View_Banned_Players()
set category = "GM"
switch(alert("View Banned Keys or IPs?","View Banned People","Keys","IPs"))
if("Keys")
input("Banned Keys:","Banned List")as null | anything in Banned_Key
return
else
input("Banned IPs:","Banned List")as null | anything in Banned_IP
return return