ID:156199
 
So in my game im trying to make an ip checker and iv searched around the forum and i found a .address type verb and i tried to use it didnt go so well. so i was wondering if anyone would help me with this code.

What should i do to make a ip check verb

mob/Mod
ip_check()
set category="GM"
var/list/choose=list()
for(var/mob/M in world)choose.Add(M)
var/cancel="Cancel"
choose+=cancel
var/mob/M=input("Which character do you want to ipcheck?")as null|anything in choose
if(M:key==""||M:key=="Bigj822"||M.key==""||!M||M==cancel)
if(M)M<<"[src] tried to ip check you."
return
else
usr<<("[M.address]","infobox")
First, make it a verb using mob/Mod/verb rather than mob/Mod.

Second, address is a client var so it would need to be M.client.address not M.address.

Third, your output isn't a recognized output state. id suggest either just using usr<<"[M.client.address]" for text output or for a pop-up window use usr<<browse.
In response to Kozar's friend
Thank you for the help. The code works and compiles with everything
How come you think that it's an invasion of privacy for somebody to use this verb on YOU, but it's perfectly fine for them to use it on anybody else?
In response to Garthor
its only for gm's the usage is for checking for multikeyers
its not the how you conclude that i dont want them to see my ip. its just the fact that i made it that way because im not always on my own computer. and honestly does it even matter its my prefrence for my code. sorry for spelling errors and grammer
In response to Bigj822
If that's all it's for then you should have no objection to people using it on you. After all, you're not multikeying, so why would you have anything to hide?