[srvx-commits] CVS: services/src proto-p10.c,1.34,1.35
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-09-24 02:17:38
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv24487/src
Modified Files:
proto-p10.c
Log Message:
add better support for NN2K support and configurability
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** proto-p10.c 15 Sep 2002 07:21:16 -0000 1.34
--- proto-p10.c 24 Sep 2002 02:17:35 -0000 1.35
***************
*** 1322,1326 ****
{
const char *str, *desc;
! int numnick;
char numer[COMBO_NUMERIC_LEN+1];
--- 1322,1326 ----
{
const char *str, *desc;
! int numnick, usermask;
char numer[COMBO_NUMERIC_LEN+1];
***************
*** 1338,1353 ****
}
numnick = atoi(str);
! if ((numnick < 64) && !force_n2k) {
! /* Use a three-digit numeric if we can, else use five. */
! inttobase64(numer, numnick, 1);
! numer[1] = ']';
! numer[2] = ']';
! numer[3] = 0;
} else {
! inttobase64(numer, numnick, 2);
! numer[2] = ']';
! numer[3] = ']';
! numer[4] = ']';
! numer[5] = 0;
}
str = conf_get_data("server/hostname", RECDB_QSTRING);
--- 1338,1347 ----
}
numnick = atoi(str);
! str = conf_get_data("server/max_users", RECDB_QSTRING);
! usermask = (str ? atoi(str) : 4096) - 1;
! if ((numnick < 64) && (usermask < 4096) && !force_n2k) {
! inttobase64(numer, (numnick << 12) + (usermask & 0x00fff), 5);
} else {
! inttobase64(numer, (numnick << 18) + (usermask & 0x3ffff), 3);
}
str = conf_get_data("server/hostname", RECDB_QSTRING);
|