Providing Location

How would I go about displaying something like this in the chatbox?

Pickles connected from United States
Carrot connected from Canada

Except I want mine to always display like this
Penguin connected from The Moon

http://forum.facepunch.com/showthread.php?t=969950