Raised This Month: $170 Target: $400
 42% 

Fix SteamIDs for the new update


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nikkii
Member
Join Date: Feb 2012
Old 08-21-2014 , 19:31   Fix SteamIDs for the new update
Reply With Quote #1

This will convert the new value to the old, allowing all of your current stats to be saved.

In scripts/HLstats_EventHandlers.plib, find
Code:
$owner =~ /.+?<STEAM_[0-9]+:([0-9]+:[0-9]+)>.*/;
Add this before it:
Code:
$owner =~ s!\[U:1:(\d+)\]!'STEAM_0:'.($1 % 2).':'.int($1 / 2)!eg;
In scripts/hlstats.pl, find
Code:
$uniqueid =~ s/^STEAM_[0-9]+?\://;
Add this before it:
Code:
$uniqueid =~ s!\[U:1:(\d+)\]!'STEAM_0:'.($1 % 2).':'.int($1 / 2)!eg;
In scripts/TRcon.pm, find
Code:
$uniqueid =~ s/^STEAM_[0-9]+?\://i;
Add this before or after it:
Code:
$uniqueid =~ s!\[U:1:(\d+)\]!($1 % 2).':'.int($1 / 2)!eg;
__________________
Owner of ProbablyAServer, a server without game changing mods and donation benefits

RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper

Last edited by Nikkii; 08-22-2014 at 07:53.
Nikkii is offline
Jabra
Junior Member
Join Date: Oct 2011
Location: Germany
Old 08-21-2014 , 20:42   Re: Fix SteamIDs for the new update
Reply With Quote #2

Works like a charm. Thanks!
__________________

Jabra is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 08-21-2014 , 22:30   Re: Fix SteamIDs for the new update
Reply With Quote #3

I'd try this but I'm sure they will release an update tomorrow or sometime this weekend.
Horsedick is offline
Mavrick4283
Veteran Member
Join Date: Apr 2010
Old 08-22-2014 , 00:39   Re: Fix SteamIDs for the new update
Reply With Quote #4

Quote:
Originally Posted by Horsedick View Post
I'd try this but I'm sure they will release an update tomorrow or sometime this weekend.
No.... This is the new format....


We apologize for the lack of warning regarding the SteamID format change in today's update. It was our intent to give the community a heads-up before the change was released, but it was missed.

The change was made to update TF2 to use the current SteamID format, which most other games on Steam and Steam itself uses. You will find that you can now use SteamIDs rendered by these other locations in your interactions with the engine. The engine will still recognize the old format, though, so your current server ban lists should still be valid.

The conversion equation has already been posted by a community member, but here it is again:

Old: STEAM_0:A:B
New: [U:1:B*2+A]
Example: STEAM_0:1:1234 ---> [U:1:2469]

We're sorry for the problems this may cause while you update your scripts to use the new format. It was not our intent to disrupt your servers.

-Eric
__________________
Mavrick4283 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 08-22-2014 , 00:44   Re: Fix SteamIDs for the new update
Reply With Quote #5

The newest 1.6 SM snapshot has fixed this. Anyone who converted their admins' steam ids is out of luck. You should have waited for the SourceMod team to put out a fix.
__________________
ddhoward is offline
KorDen
Member
Join Date: Sep 2012
Old 08-22-2014 , 05:13   Re: Fix SteamIDs for the new update
Reply With Quote #6

Quote:
Originally Posted by ddhoward View Post
The newest 1.6 SM snapshot has fixed this. Anyone who converted their admins' steam ids is out of luck. You should have waited for the SourceMod team to put out a fix.
SM fixes only internal SM functions, but not general logging and 'status' command


How about converting entire HLXCE databases to new format and use new IDs?
KorDen is offline
soja92
Member
Join Date: Mar 2012
Old 08-22-2014 , 06:55   Re: Fix SteamIDs for the new update
Reply With Quote #7

Thanks for this quick fix!

Now my TF2 servers have stats working again, and my other servers log properly too
soja92 is offline
Nikkii
Member
Join Date: Feb 2012
Old 08-22-2014 , 07:52   Re: Fix SteamIDs for the new update
Reply With Quote #8

Quote:
Originally Posted by KorDen View Post
SM fixes only internal SM functions, but not general logging and 'status' command


How about converting entire HLXCE databases to new format and use new IDs?
I was thinking about doing this, but the problem is players will lose their stats (unless you convert the ids over, could be 350,000+ rows) and there's a few parts that rely on STEAM_ in the php code.

This is more of a quick patch to just make it work.
__________________
Owner of ProbablyAServer, a server without game changing mods and donation benefits

RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper
Nikkii is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 08-22-2014 , 09:06   Re: Fix SteamIDs for the new update
Reply With Quote #9

Quote:
Originally Posted by Mavrick4283 View Post
No.... This is the new format....
I was talking about something from you guys - Hey any chance on helping me out with my other question I've been asking you about these last few weeks?

I know you are busy but I just need to figure out if this is doable in a easy manner or what needs to be done either way.

https://forums.alliedmods.net/showthread.php?t=244891
Horsedick is offline
NeonHeights
Member
Join Date: Dec 2012
Old 08-22-2014 , 13:55   Re: Fix SteamIDs for the new update
Reply With Quote #10

This is awesome, thank you
__________________
NeonHeights is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:51.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode