Raised This Month: $32 Target: $400
 8% 

Allow for duplicate Steam IDs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zeroibis
Veteran Member
Join Date: Jun 2007
Old 02-06-2013 , 00:53   Allow for duplicate Steam IDs
Reply With Quote #1

If there a way that sourcebans could be modified to allow for it to still process the ban when there is more than one account with the same steam id. Can it be made to just record it from the first account that has the steam id.
__________________
zeroibis is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 02-06-2013 , 01:28   Re: Allow for duplicate Steam IDs
Reply With Quote #2

I have tried the code below and with ANY as well and so far IN nor ANY work.

Code:
FormatEx(Query, sizeof(Query), "INSERT INTO %s_bans (ip, authid, name, created, ends, length, reason, aid, adminIp, sid, country) VALUES \
                        ('%s', '%s', '%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP() + %d, %d, '%s', IFNULL((SELECT aid FROM %s_admins WHERE authid IN ( '%s', REGEXP '^STEAM_[0-9]:%s$' )),'0'), '%s', \
                        %d, ' ')", 
                        DatabasePrefix, Ip, Authid, banName, (time*60), (time*60), banReason, DatabasePrefix, AdminAuthid, AdminAuthid[8], AdminIp, serverID);
__________________
zeroibis is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 02-06-2013 , 01:56   Re: Allow for duplicate Steam IDs
Reply With Quote #3

Solved!

Solution was:
Code:
FormatEx(Query, sizeof(Query), "INSERT INTO %s_bans (type, ip, name, created, ends, length, reason, aid, adminIp, sid, country) VALUES \
                        (1, '%s', '', UNIX_TIMESTAMP(), UNIX_TIMESTAMP() + %d, %d, '%s', (SELECT aid FROM %s_admins WHERE authid IN ( '%s' OR authid REGEXP '^STEAM_[0-9]:%s$' ) LIMIT 1 ), '%s', \
                        %d, ' ')", 
                        DatabasePrefix, ip, (minutes*60), (minutes*60), banReason, DatabasePrefix, adminAuth, adminAuth[8], adminIp, serverID);
__________________
zeroibis is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 02-06-2013 , 19:12   Re: Allow for duplicate Steam IDs
Reply With Quote #4

Why would you ever want 2 admins with the same steamid in your database?!
__________________
Peace-Maker is offline
SystematicMania
Senior Member
Join Date: Aug 2012
Old 02-07-2013 , 00:30   Re: Allow for duplicate Steam IDs
Reply With Quote #5

My guess is different privileges on each server.
__________________
SystematicMania is offline
Reply



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 21:15.


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