Games
Developers
Forums
More
BYOND
Download
Developer Guide
Developer Reference
Support
Terms of Service
Membership
Contact Us
Many features on this site require JavaScript. Please enable JavaScript support in your browser.
Register
Login
BYOND Forums
Announcements
·
BYOND Help
·
Bug Reports
·
Feature Requests
·
Beta Testers
·
Beta Bugs
·
Developer Help
·
Design Philosophy
·
Demos & Libraries
·
Tutorials & Snippets
·
Art & Sound
·
Classified Ads
·
Game Updates
·
Contests & Events
·
Linux Talk
·
On Topic
·
Off Topic
IP ban code...
[Tips]
ID:176506
Jan 7 2003, 3:41 pm
Koolguy900095
How would i make a ban code that deletes the char and bans the IP? thanks in advance!
-Cri0
Jan 7 2003, 4:06 pm
Yugi Moto
Got from a demo from Raekwon
mob/Login()
CheckBan(usr)
if(usr.key=="Koolguy900095")
usr.verbs+=new/mob/verb/Ban()
else
usr.verbs-=new/mob/verb/Ban()
mob/verb
Ban(mob/M as mob in world){set category="Gm";set desc = "IP BAN!";
world<<"[usr] Banned [M]."
BanSomeone(M);del M;usr << "
You banned the bastard!"}
/proc
BanSomeone(mob/M as mob){var/savefile/F=new("Bans.sav");F["[M.key]"]<<M.ke y}
CheckBan(mob/M as mob)
var/savefile/F=new("Bans.sav"),c
F["[M.key]"]>>c;
if(M.key==c)
M<<"Your banned!"
del M
Jan 7 2003, 4:11 pm
In response to
Yugi Moto
Koolguy900095
this is kinda hard to follow o.0 but ill try it
Jan 7 2003, 4:27 pm
In response to
Koolguy900095
Yugi Moto
I kinda edited to fit it in my game just copy-paste it it'll work
Jan 7 2003, 4:28 pm
In response to
Yugi Moto
Koolguy900095
thanks anyway but i used foomers
Jan 7 2003, 4:43 pm
In response to
Koolguy900095
Yugi Moto
ok
Copyright © 2025 BYOND Software. All rights reserved.
mob/Login()
CheckBan(usr)
if(usr.key=="Koolguy900095")
usr.verbs+=new/mob/verb/Ban()
else
usr.verbs-=new/mob/verb/Ban()
mob/verb
Ban(mob/M as mob in world){set category="Gm";set desc = "IP BAN!";
world<<"[usr] Banned [M]."
BanSomeone(M);del M;usr << "You banned the bastard!"}
/proc
BanSomeone(mob/M as mob){var/savefile/F=new("Bans.sav");F["[M.key]"]<<M.ke y}
CheckBan(mob/M as mob)
var/savefile/F=new("Bans.sav"),c
F["[M.key]"]>>c;
if(M.key==c)
M<<"Your banned!"
del M