Commits (1)
  • Rob Swindell's avatar
    Update U_* variables (pseudo consts) to use v3.20 user.tab field numbers · 81d86b89
    Rob Swindell authored
    The first argument to system.matchuserdata() in v3.20 is the user.tab field
    number, not the user.dat byte-offset that was used in versions of SBBS prior
    to v3.20.
    
    These values are synchronized with userfields.h, but I keept the U_ prefix
    here (instead of USER_) to maintain compatibility with existing JS scripts.
    
    This is a fix for issue #501 - thanks for the report Eric!
    81d86b89
......@@ -634,70 +634,65 @@ var LEN_CHATACTOUT =65; /* Chat action output string */
/********************************************/
/* field values for system.matchuserdata() */
/* synchronized with userfields.h */
/********************************************/
var U_ALIAS =0;
var U_NAME =U_ALIAS+LEN_ALIAS;
var U_HANDLE =U_NAME+LEN_NAME;
var U_NOTE =U_HANDLE+LEN_HANDLE+2;
var U_COMP =U_NOTE+LEN_NOTE;
var U_COMMENT =U_COMP+LEN_COMP+2;
var U_NETMAIL =U_COMMENT+LEN_COMMENT+2;
var U_ADDRESS =U_NETMAIL+LEN_NETMAIL+2;
var U_LOCATION =U_ADDRESS+LEN_ADDRESS;
var U_ZIPCODE =U_LOCATION+LEN_LOCATION;
var U_OLDPASS =U_ZIPCODE+LEN_ZIPCODE+2;
var U_PHONE =U_OLDPASS+LEN_OLDPASS;
var U_BIRTH =U_PHONE+12;
var U_MODEM =U_BIRTH+8;
var U_LASTON =U_MODEM+8;
var U_FIRSTON =U_LASTON+8;
var U_EXPIRE =U_FIRSTON+8;
var U_PWMOD =U_EXPIRE+8;
var U_LOGONS =U_PWMOD+8+2;
var U_LTODAY =U_LOGONS+5;
var U_TIMEON =U_LTODAY+5;
var U_TEXTRA =U_TIMEON+5;
var U_TTODAY =U_TEXTRA+5;
var U_TLAST =U_TTODAY+5;
var U_POSTS =U_TLAST+5;
var U_EMAILS =U_POSTS+5;
var U_FBACKS =U_EMAILS+5;
var U_ETODAY =U_FBACKS+5;
var U_PTODAY =U_ETODAY+5;
var U_ULB =U_PTODAY+5+2;
var U_ULS =U_ULB+10;
var U_DLB =U_ULS+5;
var U_DLS =U_DLB+10;
var U_CDT =U_DLS+5;
var U_MIN =U_CDT+10;
var U_LEVEL =U_MIN+10+2; /* Offset to Security Level */
var U_FLAGS1 =U_LEVEL+2; /* Offset to Flags */
var U_TL =U_FLAGS1+8; /* Offset to unused field */
var U_FLAGS2 =U_TL+2;
var U_EXEMPT =U_FLAGS2+8;
var U_REST =U_EXEMPT+8;
var U_ROWS =U_REST+8+2; /* Number of Rows on user's monitor */
var U_SEX =U_ROWS+2; /* Sex, Del, ANSI, color etc. */
var U_MISC =U_SEX+1; /* Miscellaneous flags in 8byte hex */
var U_OLDXEDIT =U_MISC+8; /* External editor (Version 1 method */
var U_LEECH =U_OLDXEDIT+2; /* two hex digits - leech attempt count */
var U_CURSUB =U_LEECH+2; /* Current sub (internal code) */
var U_CURXTRN =U_CURSUB+16; /* Current xtrn (internal code) */
var U_MAIN_CMD =U_CURXTRN+8+2; /* unused */
var U_PASS =U_MAIN_CMD+LEN_MAIN_CMD; /* unused */
var U_SCAN_CMD =U_PASS+LEN_PASS+2; /* unused */
var U_IPADDR =U_SCAN_CMD+LEN_SCAN_CMD; /* unused */
var U_FREECDT =U_IPADDR+LEN_IPADDR+2;
var U_FLAGS3 =U_FREECDT+10; /* Flag set #3 */
var U_FLAGS4 =U_FLAGS3+8; /* Flag set #4 */
var U_XEDIT =U_FLAGS4+8; /* External editor (code */
var U_SHELL =U_XEDIT+8; /* Command shell (code */
var U_QWK =U_SHELL+8; /* QWK settings */
var U_TMPEXT =U_QWK+8; /* QWK extension */
var U_CHAT =U_TMPEXT+3; /* Chat settings */
var U_NS_TIME =U_CHAT+8; /* New-file scan date/time */
var U_PROT =U_NS_TIME+8; /* Default transfer protocol */
var U_LOGONTIME =U_PROT+1;
var U_CURDIR =U_LOGONTIME+8; /* Current dir (internal code */
var U_UNUSED =U_CURDIR+16;
var U_LEN =(U_UNUSED+4+2);
var U_ALIAS =1;
var U_NAME =2;
var U_HANDLE =3;
var U_NOTE =4;
var U_IPADDR =5;
var U_HOST =6;
var U_NETMAIL =7;
var U_ADDRESS =8;
var U_LOCATION =9;
var U_ZIPCODE =10;
var U_PHONE =11;
var U_BIRTH =12;
var U_GENDER =13;
var U_COMMENT =14;
var U_CONNECTION =15;
var U_MISC =16;
var U_QWK =17;
var U_CHAT =18;
var U_ROWS =19;
var U_COLS =20;
var U_XEDIT =21;
var U_SHELL =22;
var U_TMPEXT =23;
var U_PROT =24;
var U_CURSUB =25;
var U_CURDIR =26;
var U_CURXTRN =27;
var U_LOGONTIME =28;
var U_NS_TIME =29;
var U_LASTON =30;
var U_FIRSTON =31;
var U_LOGONS =32;
var U_LTODAY =33;
var U_TIMEON =34;
var U_TTODAY =35;
var U_TLAST =36;
var U_POSTS =37;
var U_EMAILS =38;
var U_FBACKS =39;
var U_ETODAY =40;
var U_PTODAY =41;
var U_ULB =42;
var U_ULS =43;
var U_DLB =44;
var U_DLS =45;
var U_LEECH =46;
var U_PASS =47;
var U_PWMOD =48;
var U_LEVEL =49;
var U_FLAGS1 =50;
var U_FLAGS2 =51;
var U_FLAGS3 =52;
var U_FLAGS4 =53;
var U_EXEMPT =54;
var U_REST =55;
var U_CDT =56;
var U_FREECDT =57;
var U_MIN =58;
var U_TEXTRA =59;
var U_EXPIRE =60;