Well, it's somewhat roundabout... but it looks like it would work. Is there a 
reason I'd have to work with the client IP? I really only care about matching 
up a user's steam ID with their record in hlstatsx.

For that, I don't really need an IP, unless it's something I'm forced to work 
with for some reason :)



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roman Hatsiev
Sent: Tuesday, October 28, 2008 2:35 PM
To: Half-Life dedicated Win32 server mailing list
Subject: Re: [hlds] TF2: Web Control used during MOTD

Yes, you need SourceMod plugin for this, rather simple one though.
Here is an idea:

1. Upon client connect plugin insert a record into database which
contains IP address of client, his STEAMID and time of connection.

2. You MOTD page script looks at client IP address and checks it
against database to find that IP address among connections made within
last minute and bingo - you've got your client's STEAMID!

There may be a problem in some cases like multiple clients connecting
to your server from behind the NAT which uses the same IP address for
all clients or another client who surfs the Web via proxy server whose
address is different from the one client uses to connect to your
server but in most cases this will be quite reliable solution.

Also you may need to cleanup outdated records from your database
somehow, MOTD page script can do this prior to every query.

SM plugin is really simple, I can write it for you in few minutes :)
And if you are not happy with full scale SM installation you can run
it without any plugins except this one so it will not interfere your
existing configuration.

Regards,

Roman

On Tue, Oct 28, 2008 at 9:18 PM, Karl Weckstrom <[EMAIL PROTECTED]> wrote:
> I understand what you're saying - what you're not providing is a mechanism...
>
> Said steam ID exists somewhere as a variable - but how do you read that 
> variable? Via what mechanism?
>
> Honestly, if the answer is creating a new plugin for Sourcemod, we can stop 
> right here :) I don't feel up to coding anything in sourcemod.
>
> However, if there's a way to access those variables from the web control, I 
> could easily write something in vbscript that could parse the data from the 
> hlstatsx pages.
>
> So, is there a way? It could be a simple "No", and I would be ok with that.
>
> My knee-jerk reaction is that it isn't possible because those variables 
> aren't made available to the embedded browser used for the MOTD -  but maybe 
> someone knows something I don't.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bl4nk
> Sent: Tuesday, October 28, 2008 2:05 PM
> To: Half-Life dedicated Win32 server mailing list
> Subject: Re: [hlds] TF2: Web Control used during MOTD
>
> On client auth, have their steamid and ip shoved into a sql table. Then
> have the motd redirect to another page with user browsing's ip in the
> url (blah.com/motd?ip=255.255.255.255). Then it's just a simple case of
> grabbing the row from the sql table using their IP to get their steamid
> and then their stats/whatever you want.
>
> Karl Weckstrom wrote:
>> Have a snippet of code as an example? Which connect event? Where can the web 
>> control grab it?
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P. Bhandal
>> Sent: Tuesday, October 28, 2008 11:05 AM
>> To: Half-Life dedicated Win32 server mailing list
>> Subject: Re: [hlds] TF2: Web Control used during MOTD
>>
>> You grab their SteamID from the connect event, and then you force another
>> window open in the place of the MOTD. On the client's end, it just looks
>> like another MOTD, but it's actually customized based on their SteamID.
>>
>> On Tue, Oct 28, 2008 at 11:02 AM, Karl Weckstrom <[EMAIL PROTECTED]> wrote:
>>
>>
>>> It may - but it's a whole chicken/egg scenario. If you've connected and are
>>> staring at the MOTD, where do you pull the user's Steam ID from? There would
>>> have to be some way to get it programmatically via js/vbs or what not...
>>>
>>> -----Original Message-----
>>> From: [EMAIL PROTECTED] [mailto:
>>> [EMAIL PROTECTED] On Behalf Of Olly
>>> Sent: Tuesday, October 28, 2008 10:58 AM
>>> To: Half-Life dedicated Win32 server mailing list
>>> Subject: Re: [hlds] TF2: Web Control used during MOTD
>>>
>>> Doesnt hlstatsx (or maybe psychostats) already do this?
>>> 2008/10/28 P. Bhandal <[EMAIL PROTECTED]>
>>>
>>>
>>>> You could use the player connect event to grab their SteamID, then use
>>>> their
>>>> SteamID as an argument to grab their stats.
>>>>
>>>> It would probably require that you force a browser window open on them as
>>>> soon as they get in game to override the default motd.
>>>>
>>>> On Tue, Oct 28, 2008 at 10:33 AM, Karl Weckstrom <[EMAIL PROTECTED]>
>>>> wrote:
>>>>
>>>>
>>>>> Here's an interesting question.
>>>>>
>>>>> Over at www.TrashedGamers.com, we have a custom MOTD. That in and of
>>>>> itself isn't interesting, but I was thinking - is there a way to "read"
>>>>>
>>>> the
>>>>
>>>>> current steam ID of the person who's connected and reading the MOTD?
>>>>>
>>>>> I could write up some dynamic html and/or vbscript that could look up
>>>>>
>>>> their
>>>>
>>>>> current ranking in hlstatsx and have the MOTD say something like "You
>>>>>
>>> are
>>>
>>>>> currently ranked XXX of XXXX players"... I'm already putting the top 10
>>>>> there, but adding the player's current ranking sure would be a nice
>>>>>
>>>> touch.
>>>>
>>>>> Thanks in advance!
>>>>> -karl
>>>>>
>>>>> www.TrashedGamers.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>
>> _______________________________________________
>> 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

Reply via email to