User Counter - A ButterMud Production ButterMud - Telnet://betterbox.net:4000 They had one on Copper ][ ages ago, but haven't seen many Muds with it since then. If you have any questions/comments/suggestions, feel free to drop an email, or stop by the mud. -Jac jacobin@bellatlantic.net ButterMud - Telnet://betterbox.net:4000 Add the following to interpreter.c __interpreter.c__ _First add the following function void user_cntr(struct descriptor_data *d) { /* User counter - Muerte - A ButterMud Production Telnet://betterbox.net:4000 */ FILE *uc_fp; long u_cnt = 0; uc_fp = fopen("USRCNT", "r+b"); if (uc_fp != NULL) { fread(&u_cnt, sizeof (long), 1, uc_fp); u_cnt ++; rewind(uc_fp); fwrite(&u_cnt, sizeof (long), 1, uc_fp); fclose(uc_fp); sprintf(buf, "You are player #%ld to logon since xx/xx/xx", u_cnt); SEND_TO_Q(buf, d); } } _Now insert calls to the function, I placed it in the following places. SEND_TO_Q(motd, d); user_cntr(d); /* User Counter - Muerte 10/7/97 */ sprintf(buf, "%s [%s] has connected.", GET_NAME(d->character),d->host); mudlog(buf, BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)),TRUE); and for new players... sprintf(buf, "%s [%s] new player.", GET_NAME(d->character), d->host); mudlog(buf, NRM, LVL_IMMORT, TRUE); user_cntr(d); break; __ You might need to 'touch' the file first time round, but that's about it. Compile, reboot and enjoy.