Public feed #601476

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-07-03 15:10 UTC
rendered paste body
                    m_users = 0;
                    if (bytes > 21)
                    {
                        // Amended usercount checks, info from clef on iRC
                        // [16:01] <clef> BradStone: for the moment, take that byte[19] ... if it is 1, 8 or 9, the usercount is 0.
                        // [16:01] <clef> BradStone: if it is 4, the next 32bit are the usercount. 5 -> 16bit. 6 -> 8bit.
                        int usersBytes = response[19]-3;
                        if (usersBytes > 0 && usersBytes < 5)
                        {
                            int multiplyer = 1;
                            for (int i=0;i<usersBytes;i++)
                            {
                                m_users = response[20+i] * multiplyer;
                                multiplyer *= 256;
                            }
                        }
                    }