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

[BUG] SM v1854 core player number bug?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 01-15-2008 , 14:42   [BUG] SM v1854 core player number bug?
Reply With Quote #1

I updated today to 1854.

Meanwhile, our server can not fill up with players:

status:
Code:
hostname:  [SG.HU][CSSURHE PUBLIC CSS][PEACE, SMOKE, WEED.]
version : 1.0.0.34/7 3224 secure
udp/ip  :  87.229.26.68:27015
map     :  cs_atafaris at: 0 x, 0 y, 0 z
players :  18 (21 max)

# userid name uniqueid connected ping loss state adr
# 696 "[SAZ]buuu2[HUN]" STEAM_0:1:5848387 13:49 35 0 active 80.98.206.183:27005
# 637 "[NegA]Bee" STEAM_0:1:104979 50:52 42 0 active 195.56.160.119:27005
# 668 "ΨξTξΣ â
                  ˘" STEAM_0:0:6144038 35:21 47 0 active 81.182.148.237:27005
# 699 "-=[V.M.]=- HITMAN 47â
                            ˘" STEAM_0:0:16890212 06:09 57 0 active 91.120.67.131:63419
# 689 "freak" STEAM_0:1:8955428 20:13 47 0 active 89.133.3.159:27005
# 690 "Chrees" STEAM_0:0:15197020 20:11 39 0 active 84.236.106.4:27005
# 693 "uNknoWN '.'" STEAM_0:0:14192565 15:20 50 0 active 84.2.190.6:27005
# 686 "[WaTa]M4nHunt-" STEAM_0:1:10339742 24:32 50 0 active 78.92.65.130:27005
# 691 "[TaCtiC][CsOki!.]" STEAM_0:0:8498977 19:41 56 0 active 84.236.88.203:61263
# 307 "Gyilkos Molylepke[HUN]" STEAM_0:0:13837748  3:06:48 70 0 active 89.134.12.117:27005
# 700 "Byakuya[HUN]" STEAM_0:1:15301239 06:05 55 0 active 89.186.124.43:27005
# 482 "[SG] Dodo55" STEAM_0:1:12143140  2:01:16 55 0 active 89.133.225.26:27005
# 626 " Fredikrujger" STEAM_0:1:7176952 54:03 36 0 active 89.133.2.134:23935
# 701 "HypEr noA" STEAM_0:1:12298896 01:59 56 1 active 87.229.6.72:27005
# 673 "IRAQ-KILLER" STEAM_0:0:15363528 31:24 41 0 active 87.97.56.131:27005
# 684 "Fapuma MOST VEGETEK" STEAM_0:0:116287 27:21 49 0 active 78.92.47.37:27005
# 606 "VĂĄjett Ărpâ
                   ˘" STEAM_0:0:5444855  1:07:30 47 0 active 80.98.147.99:27005
# 433 "[SG] x3g. Team |D$L" STEAM_0:1:7290002  2:16:23 35 0 active 84.3.204.137:27005
sm_who
Code:
sm_who
    Nev                      Admin hozzafer
 1. [SAZ]buuu2[HUN]          Nem
 2. [NegA]Bee                Nem
 3. ΨξTξΣ â
               ˘            Nem
 4. -=[V.M.]=- HITMAN 47â
                         ˘  Nem
 5. freak                    Nem
 6. Chrees                   Nem
 7. uNknoWN '.'              Nem
 8. [WaTa]M4nHunt-           Nem
 9. [TaCtiC][CsOki!.]        Nem
10. Gyilkos Molylepke[HUN]   Nem
11. Byakuya[HUN]             Nem
12. [SG] Dodo55              Igen
13.  Fredikrujger            Nem
14. HypEr noA                Nem
15. IRAQ-KILLER              Nem
16. Fapuma MOST VEGETEK      Nem
19. VĂĄjett Ărpâ
                ˘          Nem
20. [SG] x3g. Team |D$L      Igen
Anyone notices the difference?

sm_who reports 20 players, because Nr 17 and 18 are skipped. Therefore, h-reserved slots plugin thinks, that the server is full, and does not let anyone join, because he thinks that 20 players are in, and the 21st is the reserved slot for admins, that cannot be filled...


I think this is a bug in SM core, or not?
__________________
LocutusH is offline
BAILOPAN
Join Date: Jan 2004
Old 01-15-2008 , 18:24   Re: [BUG] SM v1854 core player number bug?
Reply With Quote #2

It is reporting 18 players, not 20. The number is the client's slot number, not a total count.

h-reservedslots has a bug in it:
Code:
    new currentClientCount = GetClientCount(true)+1; // +1 for the freshly connected player which is not counted yet

The documentation for GetClientCount/OnClientPostAdminCheck says not to do this (see clients.inc). It's counting an extra player where there is none.
__________________
egg
BAILOPAN is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 01-16-2008 , 01:12   Re: [BUG] SM v1854 core player number bug?
Reply With Quote #3

Oh. Ok, then its a bug of hreserved slots plugin.

But why has it worked so far, with pre-1845 versions?
__________________
LocutusH is offline
KMFrog
Senior Member
Join Date: Oct 2007
Old 01-16-2008 , 03:28   Re: [BUG] SM v1854 core player number bug?
Reply With Quote #4

There was a bug on some mods, thats why the plugin has +1.
I guess the plugin author must have been writing it for one of the bugged mods (tf2?)
__________________
Was I helpful or not? Rate Me!
KMFrog is offline
BAILOPAN
Join Date: Jan 2004
Old 01-16-2008 , 07:21   Re: [BUG] SM v1854 core player number bug?
Reply With Quote #5

There was a bug a few weeks ago where SourceMod was firing OnClientPostAdminCheck() at the wrong time, against what was intended and written in the documentation. We fixed it to follow the documentation correctly. Anyone who had been adding +1 to GetClientCount() was expecting the bug to happen, but in reality the bug wouldn't always happen. For example, if you had been running admin_sql_threaded, that reserved slots plugin would likely not work as well.

There was no backwards compatibility in this scenario because misuse of this function meant you had a bug anyway. We'd also posted in the forums a few times that GetClientCount() shouldn't be incremented in those callbacks (which is logical, since even before the bug was found, OnClientPostAdminCheck's docs always said "the player is fully in-game").

Oh well, it's a very simple fix for that plugin so you should be able to have it working again quickly.
__________________
egg

Last edited by BAILOPAN; 01-16-2008 at 07:29.
BAILOPAN is offline
red!
Senior Member
Join Date: Sep 2007
Location: Germany
Old 01-16-2008 , 16:51   Re: [BUG] SM v1854 core player number bug?
Reply With Quote #6

Quote:
Originally Posted by BAILOPAN View Post
Oh well, it's a very simple fix for that plugin so you should be able to have it working again quickly.
Yes, done that.

But the term "a few weeks ago" does not hit the spot. This problem occured since I wrote the first version of hreserved_slots which was in september 2007.
red! is offline
pRED*
Join Date: Dec 2006
Old 01-16-2008 , 17:14   Re: [BUG] SM v1854 core player number bug?
Reply With Quote #7

By 'a few weeks ago', I believe he means that was when it was actually reported properly and a fix was made.
pRED* 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 00:44.


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