Raised This Month: $51 Target: $400
 12% 

[CSGO] Player Connect Log Fix


Post New Thread Reply   
 
Thread Tools Display Modes
psychonic

BAFFLED
Join Date: May 2008
Old 06-28-2015 , 22:54   Re: [CSGO] Player Connect Log Fix
Reply With Quote #51

Quote:
Originally Posted by Reg1oxeN View Post
sm plugin version
That will generate extra player_connect events, but should be fine other than that. (player_connect only happens at time of first connect, whereas OnClientConnected happens at connect and at map change. Additionally, the address field in the player_connect event normally also contains client port, and does with this thread's extension, but does not with your plugin).

Last edited by psychonic; 06-28-2015 at 22:54.
psychonic is offline
Reg1oxeN
New Member
Join Date: Jan 2014
Location: Russia
Old 06-29-2015 , 01:29   Re: [CSGO] Player Connect Log Fix
Reply With Quote #52

Quote:
Originally Posted by psychonic View Post
That will generate extra player_connect events, but should be fine other than that. (player_connect only happens at time of first connect, whereas OnClientConnected happens at connect and at map change. Additionally, the address field in the player_connect event normally also contains client port, and does with this thread's extension, but does not with your plugin).
Expanding from time to time need to be recompiled, in contrast to the plugin. About OnClientConnected at map change i forgot. Not all that bad, as an alternative approach.
Reg1oxeN is offline
ahmaden
Member
Join Date: Mar 2014
Old 08-21-2015 , 15:21   Re: [CSGO] Player Connect Log Fix
Reply With Quote #53

tested it , server crash , but when i disable cannounce.smx plugin , everything appears to be fine
how to solve it ,cant disable cannounce.smx because i need it too !
ahmaden is offline
psychonic

BAFFLED
Join Date: May 2008
Old 08-21-2015 , 15:42   Re: [CSGO] Player Connect Log Fix
Reply With Quote #54

Quote:
Originally Posted by ahmaden View Post
tested it , server crash , but when i disable cannounce.smx plugin , everything appears to be fine
how to solve it ,cant disable cannounce.smx because i need it too !

Quote:
Originally Posted by psychonic View Post
The exact cause isn't readily apparent from just looking at the code. (I'd have to debug it.) But, it certainly seems relevant to Connect Announce blocking or resending the the player_connect event. The preferred alternative to this would be to use SetEventBroadcast (available since around SM 1.4) rather than rewriting the event from scratch to send without broadcasting to clients.
Quote:
Originally Posted by psychonic View Post
Followup, it's actually due to this issue, https://bugs.alliedmods.net/show_bug.cgi?id=5097

If an extension (or MM:S plugin, and anything outside of SM really) has a pre-hook on an event, and an SM plugins pre-hooks the same event, and the plugin's hook happens to trigger first, and the plugin blocks the event, a crash will occur.

The best workaround in this case is as mentioned in the previous post, changing Connect Announce to just use SetEventBroadcast instead of dropping and recreating the event.
psychonic is offline
ahmaden
Member
Join Date: Mar 2014
Old 08-21-2015 , 15:57  
Reply With Quote #55

The best workaround in this case is as mentioned in the previous post, changing Connect Announce to just use SetEventBroadcast instead of dropping and recreating the event.

how to do that ?

Last edited by ahmaden; 08-28-2015 at 21:47. Reason: merge doublepost
ahmaden is offline
FallenNT
Member
Join Date: Feb 2013
Location: Russia
Old 08-30-2015 , 04:20   Re: [CSGO] Player Connect Log Fix
Reply With Quote #56

Quote:
Originally Posted by nelioneil View Post
Could someone please upload a compiled working Windows version please
Compatible version for 1.7.3-git5233 + 1.10.6-git940
please

Last edited by FallenNT; 08-30-2015 at 04:22.
FallenNT is offline
Send a message via ICQ to FallenNT
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-28-2015 , 09:26   Re: [CSGO] Player Connect Log Fix
Reply With Quote #57

Quote:
Originally Posted by FallenNT View Post
Compatible version for 1.7.3-git5233 + 1.10.6-git940
please
Yes, please.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Nolongerinthegame
AlliedModders Donor
Join Date: Sep 2005
Old 11-09-2015 , 13:48   Re: [CSGO] Player Connect Log Fix
Reply With Quote #58

Quote:
Originally Posted by Reg1oxeN View Post
sm plugin version
Quote:
Originally Posted by psychonic View Post
That will generate extra player_connect events, but should be fine other than that. (player_connect only happens at time of first connect, whereas OnClientConnected happens at connect and at map change. Additionally, the address field in the player_connect event normally also contains client port, and does with this thread's extension, but does not with your plugin).

This works perfect for Windows at capturing the IP address. Apart from one thing....

In the first player_connect event, it actually uses someone elses steamid on the server, and then the ip address, the second event uses the correct steamID.


It should be like this:

Code:
player <STEAMIDCORRECT><>" connected, address "IP ADDRESS HERE"
player <STEAMIDCORRECT><> " STEAM USERID validated
But for some reason it appears like this:
Code:
player <STEAMIDOFSOMEONEELSEONSERVER><>" connected, address "IP ADDRESS HERE"
player <STEAMIDCORRECT><> " STEAM USERID validated
For some reason its taken someone elses steamid, and this is causing problems on my stats program, because it looks like someone is stealing names on the server.

Not using the mod, the connect events are:

Code:
player <STEAMIDCORRECT><>" connected, address ""
player <STEAMIDCORRECT><> " STEAM USERID validated
So something in your code is causing the incorrect steamid to be logged, because there is no steamid change when the mod is not used.

Last edited by Nolongerinthegame; 11-09-2015 at 16:30.
Nolongerinthegame is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-10-2015 , 09:19   Re: [CSGO] Player Connect Log Fix
Reply With Quote #59

Quote:
Originally Posted by nelioneil View Post
But for some reason it appears like this:
Code:
player <STEAMIDOFSOMEONEELSEONSERVER><>" connected, address "IP ADDRESS HERE"
player <STEAMIDCORRECT><> " STEAM USERID validated
Steam IDs are not available before that "STEAM USERID validated" log message is printing, so because the plugin is use decl for the buffer and not checking the return value of GetClientAuthString, it is getting whatever was in there last - in this case the steamid of the last client on the last map change.
__________________
asherkin is offline
Nolongerinthegame
AlliedModders Donor
Join Date: Sep 2005
Old 11-10-2015 , 09:21   Re: [CSGO] Player Connect Log Fix
Reply With Quote #60

Quote:
Originally Posted by asherkin View Post
Steam IDs are not available before that "STEAM USERID validated" log message is printing, so because the plugin is use decl for the buffer and not checking the return value of GetClientAuthString, it is getting whatever was in there last - in this case the steamid of the last client on the last map change.
So how should this get fixed then?
Nolongerinthegame 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 16:39.


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