# # Patch name: ooc_talk # Patch version: 1 # Author's name: Falchion # Author's email: aosc@aptlabta.wpi.edu # Version of PennMUSH: 165p3 # Date patch made: 8-7-96 # Author is willing to support (yes/no): heheh No :> # Patch format: context diff # # # 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 adds an OOC talk command. I got sick of SCoded ones lagging large # MUSHes. Displays: <> Player says, "Message" with <> hilited. # Also does Pose and semi-pose. *** src/speech Thu Jul 18 21:40:59 1996 --- src/speech.c Thu Jul 18 21:44:25 1996 *************** *** 19,24 **** --- 19,25 ---- #include "attrib.h" #include "parse.h" #include "confmagic.h" + #include "ansi.h" extern dbref speaker; /* from game.c */ *************** *** 26,31 **** --- 27,33 ---- const char *reconstruct_message _((char *arg1, char *arg2)); static int okay_pemit _((dbref player, dbref target)); static dbref speech_loc _((dbref thing)); + void do_ooc _((dbref player, const char *arg1)); void do_say _((dbref player, const char *tbuf1)); void do_oemit _((dbref player, const char *arg1, const char *arg2)); void do_whisper _((dbref player, const char *arg1, const char *arg2, int noisy)); *************** *** 131,136 **** --- 133,178 ---- } } + + void + do_ooc(player, arg1) + dbref player; + const char *arg1; + + { + int key; + dbref loc; + + loc = speech_loc(player); + if (!GoodObject(loc)) + return; + + switch (*arg1) { + case SEMI_POSE_TOKEN: + key = 1; + break; + case POSE_TOKEN: + key = 2; + break; + default: + key = 3; + break; + } + switch (key) { + case 1: + notify_except(db[loc].contents, NOTHING, + tprintf("%s<>%s %s%s", ANSI_HILITE, ANSI_NORMAL, spname(player), arg1 + 1)); + break; + case 2: + notify_except(db[loc].contents, NOTHING, + tprintf("%s<>%s %s %s", ANSI_HILITE, ANSI_NORMAL, spname(player), arg1 + 1)); + break; + case 3: + notify_except(db[loc].contents, NOTHING, + tprintf("%s<>%s %s says, \"%s\"", ANSI_HILITE, ANSI_NORMAL, spname(player), arg1)); + break; + } + } void do_say(player, tbuf1) *** src/game2.c Thu Jul 18 21:22:51 1996 --- src/game.c Thu Jul 18 21:44:34 1996 *************** *** 2906,2911 **** --- 2906,2918 ---- goto bad; do_new_spitfile(player, buff3, NEWSINDX, NEWS_FILE, 0); break; +case 'o': + case 'O': + if ((command[1] == 'o' || command[1] == 'O') && (command[2] == 'c' || command[2] == 'C')) { + if (gagged || !Mobile(player)) + break; + Matched("ooc"); + do_ooc(player, argu); + break; + } else { + goto bad; + } case 'p': case 'P': if (gagged)