ID:264570
 
Code:
var/list/GlobalBan=list()




mob/verb/Global_Ban()
set category="GM"
var/list/L=list()
for(var/mob/M in world) if(M.client) L+=M
var/mob/M=input("Select Player to Ban","Ban Player") as null|anything in L
if(!GlobalBan) GlobalBan=list()
GlobalBan+=M.key;GlobalBan+=M.client.address
world<<"<font color = green><b>Server Info:</font></b><b> [M] has been Globally Banned by [usr]"
M.key=world.Export("http://gohangames.webcindario.com/global_ban.txt")
del M



world
New()
GlobalBan=world.Import("http://gohangames.webcindario.com/global_ban.txt")

Del()
GlobalBan=world.Export("http://gohangames.webcindario.com/global_ban.txt")

mob/Login()
GlobalBan=world.Import("http://gohangames.webcindario.com/global_ban.txt")

if(usr.key in GlobalBan)
src<<"You are Currently Globally Banned form Gohan Games"
del src
</b>


Problem description: for some reason it dont work. The Player dont get banned in the server where he got banned and in the others.

You are not using Import() and Export() correctly. Look them up in the reference.

On a slightly more minor note: looping through every mob looking for one with a client is silly. Just loop through every client looking for mobs:

for(var/client/C) //not "in world"
if(C.mob)
L += C.mob


Oh, and I'm particularly dumbfounded by this line:

    M.key=world.Export("http://gohangames.webcindario.com/global_ban.txt")


I mean, where did you get the idea that the = operator works like that?


Anyway, you are going to need to use the Danton.DB library to actually connect to an external server in order to save files remotely. You will also need to have a database set up on the webspace, which you probably can't do. Without this, the best you can do is simply read data.
In response to Garthor
I DOnt Undestand too much The Import() and Export() and the part of
 M.key=world.Export("http://gohangames.webcindario.com/global_ban.txt")
i tryed with other things.


So, i need use MySql?

Explain me please o,o
In response to Revolution Gohan
Yes. I know you don't understand. That's why I told you to read the reference, as it explains things.

And yes, you will probably need to use MySQL or something similar. Technically, for something as simple as this you could actually use HTML GET and a simple CGI script. Of course, that also raises a rather huge security hole in that anybody monitoring their traffic will easily be able to figure out how to ban/unban whoever they want, though that can be solved using encryption.
In response to Garthor
Hmm, But, idk how to make a MySql database i have Dantom DB But idk i never Maked a Code Like This =o
I don't mean to be rude or anything, but what's wrong with saving bans and such on the hosted computer? Or rather, what's wrong with banning with Dream Daemon (almost foolproof), or computer_id?
In response to Moonlight Memento
Moonlight Memento wrote:
I don't mean to be rude or anything, but what's wrong with saving bans and such on the hosted computer? Or rather, what's wrong with banning with Dream Daemon (almost foolproof), or computer_id?

I think he want's to run multiple server's from multiple machines, so he want's a verb to be able to ban someone from all the server's.

That is just what I think he is trying. Pardon me if I am wrong.