# # Patch name: multiquits # Patch version: 1 # Author's name: Flame # Author's email: flame@access.kuwait.net # Version of PennMUSH: 1.7.0-p03 # Date patch made: 18-09-1997 # Author is willing to support (yes/no): no # Patch format: diff -c # # # This is a contributed PennMUSH patch. Its use is subject to the # same restrictions found in PennMUSH's hdrs/copyrite.h file. # # No warranty is given for this patch. It is not necessarily going # to work on your system, with any version of PennMUSH other than # the one above, etc. # # If the author given above was willing to support the patch, you # should write to the author if you have any questions or problems. Do # *NOT* send email messages to Javelin or any PennMUSH mailing list about # this patch! # # Below this line is the author's description of the patch, # followed by the patch itself. If the patch is in context diff # format, you'll probably apply it by typing: patch < patchfile # in your top-level MUSH directory, unless instructed otherwise # below. # This patch will make it possible to have more than one quit screen. Suppose you want 4 different quit.txt to be used, each shown with every QUIT then you have to do the following first: 1- rename quit.txt to 0quit.txt 2- create other quit files under the names of 1quit.txt, 2quit.txt and 3quit.txt so you will end up with 4 files 0 to 3. 3- put in these diffrenet quit.txt files diffrent screen, ascii ..etc 4- add the following to options.h file located in the parent directory (if you have applied MULTI_SCREEN patch then add this below it) #define MULTI_QUITS 3 Ofcourse if you need more you change this numner and create more quit files prefixed by the appropriate numner. e.g. if you want 10 quits you @define MULTI_QUITS 9 and create 0quit.txt ...... 9quit.txt NOTE: if you haven't applied multi_screen patch you might get bsd.c.rej file. All you have to do then is to go to bsd.c at line 1154 and add the following line static int counter1 =0; *** src/conf.orig Thu Sep 18 22:56:50 1997 --- src/conf.c Thu Sep 18 21:47:38 1997 *************** *** 345,351 **** strcpy(options.wizmotd_file, "txt/wizmotd.txt"); strcpy(options.newuser_file, "txt/newuser.txt"); strcpy(options.register_file, "txt/register.txt"); ! strcpy(options.quit_file, "txt/quit.txt"); strcpy(options.down_file, "txt/down.txt"); strcpy(options.full_file, "txt/full.txt"); strcpy(options.guest_file, "txt/guest.txt"); --- 345,351 ---- strcpy(options.wizmotd_file, "txt/wizmotd.txt"); strcpy(options.newuser_file, "txt/newuser.txt"); strcpy(options.register_file, "txt/register.txt"); ! /* strcpy(options.quit_file, "txt/quit.txt"); */ strcpy(options.down_file, "txt/down.txt"); strcpy(options.full_file, "txt/full.txt"); strcpy(options.guest_file, "txt/guest.txt"); *** src/bsd.org Thu Sep 18 22:55:31 1997 --- src/bsd.c Thu Sep 18 22:19:24 1997 *************** *** 1152,1157 **** int conn, motd, wiz, new, reg, quit, down, full; int guest; static int counter = 0; counter++; if(counter>(MULTI_SCREENS)){ counter = 0;} --- 1152,1158 ---- int conn, motd, wiz, new, reg, quit, down, full; int guest; static int counter = 0; + static int counter1 =0; counter++; if(counter>(MULTI_SCREENS)){ counter = 0;} *************** *** 1161,1166 **** wiz = fcache_read(&options.wizmotd_fcache, options.wizmotd_file); new = fcache_read(&options.newuser_fcache, options.newuser_file); reg = fcache_read(&options.register_fcache, options.register_file); quit = fcache_read(&options.quit_fcache, options.quit_file); down = fcache_read(&options.down_fcache, options.down_file); full = fcache_read(&options.full_fcache, options.full_file); --- 1162,1171 ---- wiz = fcache_read(&options.wizmotd_fcache, options.wizmotd_file); new = fcache_read(&options.newuser_fcache, options.newuser_file); reg = fcache_read(&options.register_fcache, options.register_file); + counter1++; + if(counter1>(MULTI_QUITS)){ + counter1 =0;} + sprintf(options.quit_file, "txt/%dquit.txt", counter1); quit = fcache_read(&options.quit_fcache, options.quit_file); down = fcache_read(&options.down_fcache, options.down_file); full = fcache_read(&options.full_fcache, options.full_file); *************** *** 1193,1198 **** struct descriptor_data *d; { if (d->connected) { fcache_dump(d, options.quit_fcache); do_log(LT_CONN, 0, 0, "[%d/%s] Logout by %s(#%d) ", d->descriptor, d->addr, Name(d->player), d->player); --- 1198,1204 ---- struct descriptor_data *d; { if (d->connected) { + fcache_init(); fcache_dump(d, options.quit_fcache); do_log(LT_CONN, 0, 0, "[%d/%s] Logout by %s(#%d) ", d->descriptor, d->addr, Name(d->player), d->player);