lua problem, how to get the IP of the player
Verfasst: 6. Dez 2007, 22:40
Hi, all!
I am from China inSky LOFC squadron. Happy to find here although I can't read German, because I think here must have someone can help me out of the problem. The ATC is really good and is the best plugin I have seen for LOFC.
The situation is there is a new dedicated LOFC open host set up for couple days. I planned to build up a stats for it. This part is almost done in fact. The script is based on the . I did some change and extract all the key data to mysql.
in export.lua it looks like this:
[codek1u]g_startTime = os.date( "%c");
lastRow = 0;
function LuaExportStart()
dofile( "Config/Export/calcRows.lua" );
calcRows();
end
function LuaExportBeforeNextFrame()
end
function LuaExportAfterNextFrame()
end
function LuaExportStop()
dofile( "Config/Export/ExportData.lua" );
ExportData();
end
[/codek1u]
the data can be imported into mysql via luasql. here is the table in mysql looks like:
[imgk1u]http://www.insky.cn/bbs/attachments/month_0712/20071206_f28c0dee0b2331ec12a4qcdCQMKtJ2Cc.jpg[/imgk1u]
okay, got the data, the other part is easy to take care.
But today I met a situation. Somebody uses other's name login the host to make some trouble. I don't want this happen in the stats system, it will cause big mess. an idea comes up and I think maybe there should be a webbased user register page running in the host and share the same database with the LOFC stats to record the user's last login IP address which can compare with the player's IP address in LOFC. if people want their stats data(records or points ) remain in the stats system, the IP address he last login the web must be the same as the IP address in LOFC. and the valid stats data will belong to the ID registered in the web.
sorry for so many words and my English. I am not native english speaker too. In simply words:
[bk1u]how to export the player's connected IP address in LOFC via script? [/bk1u]
I checked the AsyncNet.log, from this log, IP address can be extracted but how to tell it belongs to which player's?
really thanks if anybody can help me of this. or somebody can give me the better solution.
I know here have good programmers. waiting for the reply....[/b][/code]
I am from China inSky LOFC squadron. Happy to find here although I can't read German, because I think here must have someone can help me out of the problem. The ATC is really good and is the best plugin I have seen for LOFC.
The situation is there is a new dedicated LOFC open host set up for couple days. I planned to build up a stats for it. This part is almost done in fact. The script is based on the . I did some change and extract all the key data to mysql.
in export.lua it looks like this:
[codek1u]g_startTime = os.date( "%c");
lastRow = 0;
function LuaExportStart()
dofile( "Config/Export/calcRows.lua" );
calcRows();
end
function LuaExportBeforeNextFrame()
end
function LuaExportAfterNextFrame()
end
function LuaExportStop()
dofile( "Config/Export/ExportData.lua" );
ExportData();
end
[/codek1u]
the data can be imported into mysql via luasql. here is the table in mysql looks like:
[imgk1u]http://www.insky.cn/bbs/attachments/month_0712/20071206_f28c0dee0b2331ec12a4qcdCQMKtJ2Cc.jpg[/imgk1u]
okay, got the data, the other part is easy to take care.
But today I met a situation. Somebody uses other's name login the host to make some trouble. I don't want this happen in the stats system, it will cause big mess. an idea comes up and I think maybe there should be a webbased user register page running in the host and share the same database with the LOFC stats to record the user's last login IP address which can compare with the player's IP address in LOFC. if people want their stats data(records or points ) remain in the stats system, the IP address he last login the web must be the same as the IP address in LOFC. and the valid stats data will belong to the ID registered in the web.
sorry for so many words and my English. I am not native english speaker too. In simply words:
[bk1u]how to export the player's connected IP address in LOFC via script? [/bk1u]
I checked the AsyncNet.log, from this log, IP address can be extracted but how to tell it belongs to which player's?
really thanks if anybody can help me of this. or somebody can give me the better solution.
I know here have good programmers. waiting for the reply....[/b][/code]