Hi. I have a big problem: How can I get the IP of a player who is online at the moment. Is there any command like /list-ip or anything like this? If no, is it possible to make a mod who shows an admin the player IP's?
Regards,
Cooper97
Problem's with player IP's
Problem's with player IP's
Sorry for my bad english. (I am from germany.)
-
- Moderator
- Posts: 4095
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Put this into a mod:
Command: /getip <name>
requires privs
Code: Select all
minetest.register_chatcommand("getip", {
params = "<name>",
description = "Get IP of player",
privs = {privs = true},
func = function(name, param)
if minetest.get_player_by_name(param) == nil then
minetest.chat_send_player(name, "Player not found")
return
end
minetest.chat_send_player(name, "IP of " .. param .. " is ".. minetest.get_player_ip(param))
end,
})
requires privs
Last edited by sfan5 on Wed Aug 07, 2013 07:15, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 11 guests