]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Enlarge client user mode buffer, reduce client flags buffer
authorAlexander Barton <alex@barton.de>
Mon, 1 Aug 2011 19:21:01 +0000 (21:21 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 1 Aug 2011 19:28:55 +0000 (21:28 +0200)
We have to enlage our user mode buffer, so we can handle even unknown
user modes in the future; and reduce the client flags buffer, because
I can't imagine why we ever would need ~100 flags!?

Now we support up to 15 user modes (was: 8) and up to 15 flags (was: 99).

So in the end, we even save 99-15+8-15=77 bytes for each client structure!

src/ngircd/defines.h

index 688f2d3aed209294817ffe11fc9aa79d9ea24f85..8f62279df460b838d9315a5a58105c15148ac6e8 100644 (file)
                                           see RFC 2812, section 1.2.1 */
 #define CLIENT_NAME_LEN 32             /* Max. length of "real names" */
 #define CLIENT_HOST_LEN 64             /* Max. host name length */
-#define CLIENT_MODE_LEN              /* Max. lenth of all client modes */
+#define CLIENT_MODE_LEN 16             /* Max. lenth of all client modes */
 #define CLIENT_INFO_LEN 64             /* Max. length of server info texts */
 #define CLIENT_AWAY_LEN 128            /* Max. length of away messages */
-#define CLIENT_FLAGS_LEN 100           /* Max. length of client flags */
+#define CLIENT_FLAGS_LEN 1           /* Max. length of client flags */
 
 #define CHANNEL_NAME_LEN 51            /* Max. length of a channel name, see
                                           RFC 2812 section 1.3 */