★ UTLogin2 ★

Search, find and discuss about Mutators!
User avatar
Que
Masterful
Posts: 712
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

★ UTLogin2 ★

Post by Que »

UTLogin , a Tool that logs useful information about clients

Image

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.
You do not have the required permissions to view the files attached to this post.
Last edited by Que on Fri Jun 04, 2021 12:26 pm, edited 8 times in total.
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
User avatar
[rev]rato.skt
Adept
Posts: 409
Joined: Mon Aug 16, 2010 1:09 pm

Re: ★ UTLogin ★

Post by [rev]rato.skt »

Nice :D man i go teste later!
Brazilian Server:
Classic madruga.utbr.cf:7777
Duel x1.utbr.cf:6666
UT2004 2004.utbr.cf:5555
User avatar
Que
Masterful
Posts: 712
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: ★ UTLogin2 ★

Post 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
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
User avatar
Chronox
Novice
Posts: 17
Joined: Sat Sep 07, 2013 5:25 am
Personal rank: Rookie Admin
Location: Colombia

Re: ★ UTLogin2 ★

Post by Chronox »

Hey nice mutator here.

Instructions steps mention:

ServerActor=UTLogin2.UTLoginSA

There is a missing"s" in ServerActors :P
Image
User avatar
Que
Masterful
Posts: 712
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: ★ UTLogin2 ★

Post 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 :P
fixed. :gj:
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
User avatar
sektor2111
Godlike
Posts: 6190
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ★ UTLogin2 ★

Post 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.
ProAsm
Skilled
Posts: 219
Joined: Sun Sep 29, 2013 7:12 am

Re: ★ UTLogin2 ★

Post 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.
utl2.zip
You do not have the required permissions to view the files attached to this post.
User avatar
Barbie
Godlike
Posts: 2546
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: ★ UTLogin2 ★

Post 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

Code: Select all

if (sIP == "")
	sIP = "127.0.0.0";
Maybe you meant 127.0.0.1 for localhost address and not 127.0.0.0 for network address.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6190
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ★ UTLogin2 ★

Post 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...
ProAsm
Skilled
Posts: 219
Joined: Sun Sep 29, 2013 7:12 am

Re: ★ UTLogin2 ★

Post 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.
User avatar
sektor2111
Godlike
Posts: 6190
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ★ UTLogin2 ★

Post 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.
User avatar
sektor2111
Godlike
Posts: 6190
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ★ UTLogin2 ★

Post 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...