Page 1 of 1
★ UTLogin2 ★
Posted: Mon Apr 05, 2021 11:04 pm
by Que
UTLogin , a Tool that logs useful information about clients
This is an updated version of the mod UTLogit.
Code: Select all
//----------------------------------------------------------------------------
// UTLogin V2 by ProAsm & noOne
//----------------------------------------------------------------------------
Installing UTLogin2
------------------------
The following files need to be in the UnrealTournament\System folder.
UTLogin2.u
UTLogin2.int
?Mutator=UTLogin2.UTLogin
OR
ServerActors=UTLogin2.UTLoginSA
This version requires a server package in the UnrealTournament.ini file
[Engine.GameEngine]
ServerPackages=UTLogin2
UTLogin2 logs to the UTLogin.ini file with various bits of information pertaining to clients.
Example;
Date|Name|IPAddress|Ping|Visits|Resolution|Version|AudioDriver|Renderer
[UTLogin2.UTLogin]
PlayerLogin[0]=04/06 - 09:01|no0ne.|xxx.xxx.xxx.xxx|45|6|1312 x 736|469|ALAudio|OpenGLDrv|
To open Login Window:
Login as Admin then: Mutate UTLogin2 Menu
Note: To Open UTLogin2 menu on server first login as Admin then type `Mutate UTLogin2 Menu` in console.
Re: ★ UTLogin ★
Posted: Tue Apr 06, 2021 12:25 am
by [rev]rato.skt
Nice
man i go teste later!
Re: ★ UTLogin2 ★
Posted: Tue Apr 13, 2021 7:50 am
by Que
Forgot to Mention that you can access the menu ingame
you can access the UTLogin2 Menu by logging in as admin and Typing `Mutate UTLogin2 Menu`
if you have the older version then `Mutate UTLogin Menu`.
updated first post with latest version and readme
Re: ★ UTLogin2 ★
Posted: Fri Jun 04, 2021 6:31 am
by Chronox
Hey nice mutator here.
Instructions steps mention:
ServerActor=UTLogin2.UTLoginSA
There is a missing"s" in ServerActors
Re: ★ UTLogin2 ★
Posted: Fri Jun 04, 2021 12:27 pm
by Que
Chronox wrote: ↑Fri Jun 04, 2021 6:31 am
Hey nice mutator here.
Instructions steps mention:
ServerActor=UTLogin2.UTLoginSA
There is a missing"s" in ServerActors
fixed.
Re: ★ UTLogin2 ★
Posted: Sat Jun 05, 2021 9:40 am
by sektor2111
I think I'm not curious what this code does in maps with birds, rabbits and so on MonsterHunt, MonsterHuntArena... or... I might be wrong...
Code: Select all
P = Level.PawnList; // 0x00000073 : 0x0084
if ( P != None ) // 0x0000007F : 0x0098
{
if ( P.PlayerReplicationInfo.PlayerID == CurrentID ) // 0x00000087 : 0x00A3 - I have no reason to check all pawns like that
{
....
}
P = P.nextPawn; // 0x000000A1 : 0x00C7
goto JL0098; // 0x000000AD : 0x00DB
}
Not a problem, a subclass of this mutator might have another deal... out of "Super.Tick" as there is nothing important to "Tick" in parent classes.
Re: ★ UTLogin2 ★
Posted: Sun Jun 06, 2021 9:04 am
by ProAsm
Surely you do not believe the code that UTPT produces ?
Here is the actual code if you want to see what that routine really looks like and does.
Re: ★ UTLogin2 ★
Posted: Sun Jun 06, 2021 12:37 pm
by Barbie
I think what sektor wanted to say is that it would be better to check
PlayerReplicationInfo for NONE before accessing it; it would also avoid nasty "ScriptWarnings".
Here is another piece I stumbled over:
Code: Select all
for (j=0; j<20; j++)
{
x = InStr(sNick, "|");
if (x > 0)
sNick = Left(sNick, x)$":"$Mid(sNick, Len(sNick));
}
It looks like you want to replace all occurrences of "|" with ":". Therefore you don't need to iterate 20 times but only so often as "|" exists in it:
Code: Select all
do
{
x = InStr(sNick, "|");
if (x >= 0)
sNick = Left(sNick, x) $ ":" $ Mid(sNick, Len(sNick));
} while (x >= 0)
Furthermore InStr() can return 0 also if the searched substring is at first position, so use ">=" instead of ">" if "|" is not allowed at first position.
I looked a bit further in that function and found
Maybe you meant 127.0.0.1 for
localhost address and not 127.0.0.0 for
network address.
Re: ★ UTLogin2 ★
Posted: Sun Jun 06, 2021 4:36 pm
by sektor2111
UTPG doesn't show other things than compiled code in a closer format as original code so to speak - Incomplete.
Maybe this is how to sort out what we need IN ALL GAMES.
Code: Select all
if (Level.Game.CurrentID > CurrentID) // a new player has joined
{
for ( P=Level.PawnList; P!=None; P=P.NextPawn )
{
if ( !P.bIsPlayer ) //Fast skip native non-players ( || P.bDeleteMe )
continue;
else
{
if ( P.PlayerReplicationInfo != None ) //Any unarmed Skaarj because of "ReplaceWith" won't mess with us in any way
if (P.PlayerReplicationInfo.PlayerID == CurrentID)
break;
}
}
....
Available also for all those MapVoteLA types, a bIsPlayer is not always a Player - a la Epic.
In my codes I always try to deal only with VALID Actors as much as possible.
But I repeat: Maybe I'm wrong, if engine adds new pawn in front of the rest, then code skips accessing non-players from the rest of chain... unless a timing is different in a moment... based of whatever CreatureFactory...
Re: ★ UTLogin2 ★
Posted: Mon Jun 07, 2021 10:30 am
by ProAsm
I think I need to explain myself here a bit
Regarding the PlayerReplicationInfo.
If Level.Game.CurrentID has changed then only a Bot or a Player could have changed it, therefore testing the PRI is not necessary, even in 469
I have used this routine since 1999 in many mods and have never had a Access None.
As far as the x > 0 for the InStr is concerned, the first character in the Nick does not matter if its a pipe '|' as long as there are no characters in front of the pipe.
The IP 127.whatever is also just a text display for the Admin, that can be "Unknown" or just plain blank, it does not matter.
Re: ★ UTLogin2 ★
Posted: Mon Jun 07, 2021 7:39 pm
by sektor2111
Yep... because new pawn is added in front of list and cycle breaks (if I'm looking at "AddPawn" native), otherwise doing such checks for PRI without checking PRI existence are not friendly at all at this point. In this context indeed it can be clean.
Re: ★ UTLogin2 ★
Posted: Mon Jun 21, 2021 9:20 am
by sektor2111
Perhaps the PawnList deal it's not that important as it is the rest... Server 451b + XCGE 24, priority AboveNormal pointed in two of four CPU Cores.
This is what it does (I stripped some data for preventing stupid laws related discussions)
Code: Select all
[UTLogin2.UTLogin]
PlayerLogin[0]=06/20 - 02:05|AName|x.x.x.x|67|1|Unknown|000|Unknown|Unknown|
PlayerLogin[1]=06/20 - 02:05|AnotherName|x.x.x.x|46|1|Unknown|000|Unknown|Unknown|
PlayerLogin[2]=06/21 - 03:00|MySelf|x.x.x.x|191|3|1280 x 720|436|Galaxy|D3D9Drv|
I was the only player logged properly, the rest are looking like they are aliens...