I need a way to store a client.address when a client logs on in like a file, people/[ckey]/IP.sav , that way, i have everyone who logs into my games IP so if i have a problem with them, in game i could ban them without them there. I plan to define a proc that will give me a list of keys which i can choose from and it will give me the owner of that keys IP so i could input the IP into my ban.sav file.
If someone could help me with the storing IP code, id be greatly appreciative.
Trog
ID:174271
![]() Sep 5 2003, 6:32 pm
|
|
BTW that code you gave me didnt work, i used a save file editor and there was no IP in there to be found; i tried the original and this
client/New() ..() var/savefile/F = new("people/[ckey]/IP.sav") F["[address]"] << address but neither worked Alright, but how could i make a verb so that i can see a list of the ckeys stored with like a switch, choose one and it will show me there ip? like: mob/verb/FindRP() var/savefile/F = new("people/[ckey]/IP.sav") var/checking F["[client.address]"] >> checking if(client.address == checking) world<<"[client.address]" but that didnt work, if anyone can help that would be great. Trog |
I tried this piece of code, but it didnt work.
client/New() ..() var/savefile/F = new("people/[ckey]/IP.sav") F["[address]"] << address it may have stored something, cause it creats a people and troglodyte folder and an IP.sav, but when using nadrews save file editor, i found no IP address within the sav file is this code right? and if so is there another way i could check if it stored the address? Trog |
YOU NEED TO BE ON A HOSTED SERVER TO HAVE AN ADDRESS
If you are not on a hosted server, it will act as though you are not online, and your IP will be null. Therefor sending null to the IP.sav file. |
this is what i have so far, if someone fixes this for me, and creates the .txt code i wanted on the bottom, il pay 45 dimes.
client/New() Post here if your interested in the 45 dimes, and are able to fix this problem and help with my request. Trog |
switch(alert("whos IP would you like to look at?",,AH))//
that needs changed to: switch(input("whos IP would you like to look at?","") in AH) because, 1) can not read a list in ALERT proc, and 2) when using the input proc, if you want the options to appear from a list, you put: in LIST after input("message","title") |
You dont have to lie to get information, we all practically knew you were not going to pay anyone 45 dimes for a simple syntax error you made V_V
|
do you have AIm? cause il send you the environment, you fix it and il send you the dime and you can send me the environment, i have the dimes
|
Ok, i have it finished, (sorry for the delay, had a storm last night while i was working, and computer went off) Please log back on AIM so i can send you the files.
|
Cant you use Write(file,value)? It will append to the value to the end of the file. I've never used it, but from memory, you may be able to use this.
Write("players/ip-[ckey].txt","/n[address]") |
client/New() I tested it, its bug-free, and works, it even tells you what to do if you try it. Of course, its just my style, theres probobly, better scripters who may have a 'better' way of doing this. But how it got it, its pretty good, and organized with the file's |
..()
var/savefile/F = new("people/[ckey]/IP.sav")
F<<address
simple as that...