One option is to normalize the data before you add it to the database in a format that's easier to work with.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Tony Paloma Sent: Tuesday, 3 February 2009 2:50 PM To: 'Half-Life dedicated Win32 server mailing list' Subject: Re: [hlds] SourceBans typo will ban nearly every Valve employee :( Oh, right, I see what you mean. You need REGEXP for the [0-9]. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of msleeper Sent: Monday, February 02, 2009 7:48 PM To: Half-Life dedicated Win32 server mailing list Subject: Re: [hlds] SourceBans typo will ban nearly every Valve employee :( Yes, thank Left 4 Dead for changing the way auth/SteamIDs work. On Mon, 2009-02-02 at 19:43 -0800, Tony Paloma wrote: > Hah. That's awesome. This is one of the reasons I only use my own plugins. > > Is the REGEXP really necessary? Can't you just change it to = ? > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Nephyrin Zey > Sent: Monday, February 02, 2009 7:39 PM > To: Half-Life dedicated Win32 server mailing list > Subject: [hlds] SourceBans typo will ban nearly every Valve employee :( > > So here i am perusing my logs when i see > > L 02/02/2009 - 20:25:28: "EricS<114><STEAM_0:1:10><>" disconnected > (reason "You have been banned by this server, check > http://www.doublezen.net/ for more info") > > wait, what? > > No ban matches that steamID. So i dig into the SourceBans module, and find > this: > > SELECT bid FROM %s_bans WHERE ((type = 0 AND authid REGEXP > 'STEAM_[0-9]:%s') OR (type = 1 AND ip = '%s')) AND (length = '0' OR > ends > UNIX_TIMESTAMP()) AND RemoveType IS NULL > > What that means, is if 1234 is banned, so is 123, 12, and 1. Since > Valve has a lot of really short steam IDs, this means that any sizable > database will return matches against them. > > To fix this, if you run SourceBans, change line 774 to: > > SELECT bid FROM %s_bans WHERE ((type = 0 AND authid REGEXP > '^STEAM_[0-9]:%s$') OR (type = 1 AND ip = '%s')) AND (length = '0' OR > ends > UNIX_TIMESTAMP()) AND RemoveType IS NULL > > IE add that nice ^ and $ there, so it only matches complete IDs. > Recompile sourcebans.sp and install. > > I would like to apologize to EricS and invite him to play on the Nemu > servers whenever he damn well pleases! > > - Neph > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds

