• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.2 All players have same global ip of server!

primate

Member
Joined
Apr 14, 2009
Messages
68
Solutions
1
Reaction score
5
Location
Colombia, Medellín.
All players who enter It server has my same IP! Does anyone know why this happens?

Additional Information:
I use debian 8 and TFS 1.x

Example:
I give ban ip player, All people what enter server is banned

Thanks for your time.


 
post your mc script

I am running forgottenserver-master unmodified, I look all people shown my ip global.

Code:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end

    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Multiclient Check List:")

    local ipList = {}
    local players = Game.getPlayers()
    for i = 1, #players do
        local tmpPlayer = players[i]
        local ip = tmpPlayer:getIp()
        if ip ~= 0 then
            local list = ipList[ip]
            if not list then
                ipList[ip] = {}
                list = ipList[ip]
            end
            list[#list + 1] = tmpPlayer
        end
    end

    for ip, list in pairs(ipList) do
        local listLength = #list
        if listLength > 1 then
            local tmpPlayer = list[1]
            local message = ("%s: %s [%d]"):format(Game.convertIpToString(ip), tmpPlayer:getName(), tmpPlayer:getLevel())
            for i = 2, listLength do
                tmpPlayer = list[i]
                message = ("%s, %s [%d]"):format(message, tmpPlayer:getName(), tmpPlayer:getLevel())
            end
            player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, message .. ".")
        end
    end
    return false
end
 
use print_r(ipList) and print_r(players) after it the loop that assigns ips to the table and show me what it prints to your console
if you do not have print_r function, go to your lib and place this in one of your lib files
https://gist.github.com/nrk/31175

edit: make sure you have multiple players on with different ips just to make sure
 
use print_r(ipList) and print_r(players) after it the loop that assigns ips to the table and show me what it prints to your console
if you do not have print_r function, go to your lib and place this in one of your lib files
https://gist.github.com/nrk/31175

edit: make sure you have multiple players on with different ips just to make sure

Thanks for the help, But I have no idea how to use and add that function!
 
Last edited:
Back
Top