


And please create a backup before running this script. Make sure that you adapt the OLD_DATABASE and NEW_DATABASE constants. You can run that script with any Python 2.x interpreter. Print('Done!')It's a cleaner and more general (and probably faster) solution. Print('Failed to convert SteamID "".'.format(steamid))ĭata = RE_STEAMID.sub(match_converter, data) RE_STEAMID = re.compile(r'(STEAM_\d:\d:\d+)') Code: Select all 16:38:56 EventScripts caught an exception: Traceback (most recent call last): File '/home/gameserver/server/irrenanstallt/hl2mp/addons. Syntax: Select all from _future_ import with_statement so when the server loads this config it will match the steamid2 with the connecting user and won't block this individual because they don't use steamid2 but steamid3 instead. with this i just have to convert the steamids in our current database once and then always keep going with the new steamid formatationĪnother thing that is bugging me is when I trigger a ban it will fetch the steamid3 convert those to steamid2 and save it in the bans config. So what i actually want is to rewrite the uniqueid fetching in the playerlibrary so it fetches the steamid3 so it does not always need to convert. I actually intend to stay with the steamid3 but the thing is even after converting the old steamids to new in our databanks the plugins will still use the steamid2 format. This will insert the steamid2 to databanks when using a command on a player such as giving levels fro example. Return 'STEAM_0:%s:%s'% (universe, (account_id - universe) // 2)īy doing this playerlib.uniqueid will return the steamid2 of the player. Syntax: Select all def steamid3to2(steamid):
