Hello,
I'm trying to code a Ban verb which asks for a key to ban in an input rather than selecting a mob to Ban from the world and I'm using IP Ban too, meaning that once a GM types a key to ban in the input, his key and IP, both will be banned from the server.
The problem is with banning the IP, since my code takes input as a variable. Adding the key to the Banned Keys list is easy since I just have to add the returned variable from input, but how to Ban the key's IP is my problem.
Is this even possible to do? If yes, then how? Sorry for my english, but I'm not in full condition right now. :(
[EDIT] I just thought of storing all the IPs and Keys of the players who log in the game in a savefile, so it can be accessed later. This way, perhaps I would be able to accomplish what I'm trying to do. But is there any other "Better" way to do this?
Any help is appreciated.
Regards,
ID:155162
Aug 29 2011, 3:11 am (Edited on Aug 29 2011, 4:34 am)
|
|
In response to Hassanjalil
|
|
nice hassan =D
|
In response to Mrfreakanime94
|
|
Hey hassan,you forgot the Expire script,without that,the player is banned forever.
|
In response to Nakano15
|
|
Why you're using datums when you can easily do a list with lists inside?
Bans = list("Ocean King" = list("IP" = "127.0.0.1", "ComputerID" = "Lalalal", "Reason" = "Idk", "Expiration" = "Never")) |
In response to Ocean King
|
|
Wow that's cool. Thanks.
|
In response to Nakano15
|
|
well i was just giving him idea he have to create it self
|
In response to Ocean King
|
|
Ocean King wrote:
Why you're using datums when you can easily do a list with lists inside? Sorry for bumping the same topic, but how can I loop inside a sublist? I tried: for(var/text in Keys = list(IPs))) And: for(var/text in Keys = list(IPs = list()))) But these are giving compile errors, any help? Regards, |
In response to Hashir
|
|
|
In response to Hassanjalil
|
|
Hassanjalil wrote:
> for(var/V in Keys) I guess you mis-understood, I meant a sublist i.e, how will I loop through a list which is already inside a list? Example of Sublist:
var/list/Keys = list( IDs = list())
|
In response to Hashir
|
|
thats why i said using Datum Ban but any way
mob i think this is what you want |
In response to Hassanjalil
|
|
Hassanjalil wrote:
thats why i said using Datum Ban but any way > mob i think this is what you want Ah, thank you. |
now proc
then you could create A proc for logging their IP like
and now Run That Proc at login() like this