diff --git a/Changes b/Changes index 08c568fe2..e3cbc77da 100644 --- a/Changes +++ b/Changes @@ -581,4 +581,9 @@ - Fixed the G:line bugs, i hope - moved tkl_sweep into a loopstruct - Removed the ERR_NOTONCHANNEL message =P - Made some memory cleanups on the command list (saved 268 bytes) -- More memory cleanups +- More memory cleanups, changed aClient->refcnt to a signed char, + aClient->hopcount to unsigned char +- Changed aChannel->mode.msgs & .per to unsigned short, and changed + .kmode to unsigned char +- Changed aChannel->users to unsigned short (max 65536 users per channel) + and FloodOpt->nmsg to an unsigned short diff --git a/include/struct.h b/include/struct.h index 901f077a1..0ed6728db 100644 --- a/include/struct.h +++ b/include/struct.h @@ -690,7 +690,7 @@ struct User { char *away; /* pointer to away message */ TS last; u_int32_t servicestamp; /* Services' time stamp variable */ - int refcnt; /* Number of times this block is referenced */ + signed char refcnt; /* Number of times this block is referenced */ unsigned short joined; /* number of channels joined */ char username[USERLEN + 1]; char realhost[HOSTLEN + 1]; @@ -810,7 +810,7 @@ struct Client { long umodes; /* client usermodes */ aClient *from; /* == self, if Local Client, *NEVER* NULL! */ int fd; /* >= 0, for local clients */ - int hopcount; /* number of servers to this 0 = local */ + unsigned char hopcount; /* number of servers to this 0 = local */ short status; /* Client type */ char name[HOSTLEN + 1]; /* Unique name of the client, nick or host */ char username[USERLEN + 1]; /* username here now for auth stuff */ @@ -932,9 +932,9 @@ struct SMode { char key[KEYLEN + 1]; char link[LINKLEN + 1]; /* x:y */ - int msgs; /* x */ - int per; /* y */ - unsigned short kmode; /* mode 0 = kick 1 = ban */ + unsigned short msgs; /* x */ + unsigned short per; /* y */ + unsigned char kmode; /* mode 0 = kick 1 = ban */ }; /* Message table structure */ @@ -1011,7 +1011,7 @@ struct Channel { char *topic; char *topic_nick; TS topic_time; - int users; + unsigned short users; Link *members; Link *invites; Ban *banlist; @@ -1103,7 +1103,7 @@ struct Channel { find_channel_link((blah->user)->channel, chan)) ? 1 : 0) struct FloodOpt { - int nmsg; + unsigned short nmsg; TS lastmsg; };