# # Patch name: no_chat # Patch version: 1 # Author's name: Javelin # Author's email: dunemush@pennmush.org # Version of PennMUSH: 1.7.2p24 # Date patch made: 7/9/99 # 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 adds a new player toggle called NO_CHAT that prevents the player from chatting or cemiting. It is settable by admin. *** 0.43/hdrs/dbdefs.h Fri, 02 Apr 1999 11:53:41 -0600 dunemush (pennmush/d/51_dbdefs.h 1.2.1.1.1.1.1.2 640) --- social.27(w)/hdrs/dbdefs.h Fri, 09 Jul 1999 11:54:31 -0500 dunemush (pennmush/d/51_dbdefs.h 1.1.1.6 640) *************** *** 142,147 **** --- 142,149 ---- #define ShowAnsiColor(x) 0 #endif + #define No_Chat(x) (Toggles(Owner(x)) & PLAYER_NO_CHAT) + /******* Thing toggles */ #define DestOk(x) (IS(x, TYPE_THING, THING_DEST_OK)) #define Puppet(x) (IS(x, TYPE_THING, THING_PUPPET)) *** 0.43/hdrs/extchat.h Tue, 30 Mar 1999 13:32:24 -0600 dunemush (pennmush/e/0_extchat.h 1.4.1.1 640) --- social.27(w)/hdrs/extchat.h Thu, 08 Jul 1999 17:22:58 -0500 dunemush (pennmush/e/0_extchat.h 1.4.2.2 640) *************** *** 139,146 **** ((IsPlayer(o) && Channel_Player(c)) || \ (IsThing(o) && Channel_Object(c))) #define Chan_Can(p,t) \ (!(t & CHANNEL_DISABLED) && (!(t & CHANNEL_WIZARD) || Wizard(p)) && \ ! (!(t & CHANNEL_ADMIN) || Hasprivs(p) || (Powers(p) & CHAT_PRIVS))) /* Who can change channel privileges to type t */ #define Chan_Can_Priv(p,t) (Wizard(p) || Chan_Can(p,t)) #define Chan_Can_Access(c,p) (Chan_Can(p,ChanType(c))) --- 139,147 ---- ((IsPlayer(o) && Channel_Player(c)) || \ (IsThing(o) && Channel_Object(c))) #define Chan_Can(p,t) \ + (!No_Chat(p) && \ (!(t & CHANNEL_DISABLED) && (!(t & CHANNEL_WIZARD) || Wizard(p)) && \ ! (!(t & CHANNEL_ADMIN) || Hasprivs(p) || (Powers(p) & CHAT_PRIVS)))) /* Who can change channel privileges to type t */ #define Chan_Can_Priv(p,t) (Wizard(p) || Chan_Can(p,t)) #define Chan_Can_Access(c,p) (Chan_Can(p,ChanType(c))) *** 0.43/hdrs/externs.h Wed, 03 Mar 1999 09:06:03 -0600 dunemush (pennmush/e/1_externs.h 1.3.1.2.1.1.2.1.2.1 640) --- social.27(w)/hdrs/externs.h Wed, 03 Mar 1999 09:14:01 -0600 dunemush (pennmush/e/1_externs.h 1.3.1.2.1.1.2.1.2.2 640) *** 0.43/hdrs/flags.h Fri, 13 Feb 1998 14:31:28 -0600 dunemush (pennmush/e/3_flags.h 1.1 640) --- social.27(w)/hdrs/flags.h Thu, 08 Jul 1999 16:11:27 -0500 dunemush (pennmush/e/3_flags.h 1.3 640) *************** *** 128,133 **** --- 128,134 ---- #define PLAYER_COLOR 0x80000 /* ANSI color ok */ #define PLAYER_FORCEWHITE 0x100000 /* Force ansi_white after output */ #endif + #define PLAYER_NO_CHAT 0x4000000 /*-------------------------------------------------------------------------- * Thing flags *** 0.43/src/extchat.c Fri, 09 Jul 1999 14:03:43 -0500 dunemush (pennmush/e/45_extchat.c 1.8.1.1.1.1.1.1.1.1.1.2.1.1 640) --- social.27(w)/src/extchat.c Fri, 09 Jul 1999 14:05:14 -0500 dunemush (pennmush/e/45_extchat.c 1.8.1.1.1.1.1.1.1.1.1.2.1.1 640) *************** *** 920,926 **** /* Send a message to a channel, no prefix. */ CHAN *chan = NULL; ! if (!Can_Cemit(player)) { notify(player, "You can't channel-surf that well."); return; } --- 920,926 ---- /* Send a message to a channel, no prefix. */ CHAN *chan = NULL; ! if (!Can_Cemit(player) || No_Chat(player)) { notify(player, "You can't channel-surf that well."); return; } *** 0.43/src/flags.c Fri, 09 Jul 1999 14:03:43 -0500 dunemush (pennmush/e/48_flags.c 1.4.2.1.2.1.2.1.2.1 640) --- social.27(w)/src/flags.c Fri, 09 Jul 1999 14:05:16 -0500 dunemush (pennmush/e/48_flags.c 1.4.2.1.2.1.2.1.2.1 640) *************** *** 149,154 **** --- 149,155 ---- #ifdef VACATION_FLAG {"ON-VACATION", 'o', TYPE_PLAYER, PLAYER_VACATION, F_ANY, F_ANY}, #endif + {"NO_CHAT", 'q', TYPE_PLAYER, PLAYER_NO_CHAT, F_ROYAL, F_ROYAL}, {"SUSPECT", 's', TYPE_PLAYER, PLAYER_SUSPECT, F_WIZARD | F_MDARK, F_WIZARD | F_MDARK}, *************** *** 380,385 **** --- 381,387 ---- {"VACA", "ON-VACATION"}, {"VAC", "ON-VACATION"}, #endif + {"NOCHAT", "NO_CHAT"}, {"SUSPEC", "SUSPECT"}, {"SUSPE", "SUSPECT"}, {"SUSP", "SUSPECT"}, *** 0.43/src/fundb.c Tue, 30 Mar 1999 13:32:24 -0600 dunemush (pennmush/e/51_fundb.c 1.5.1.1.2.1.2.1.2.1 640) --- social.27(w)/src/fundb.c Thu, 08 Jul 1999 16:14:25 -0500 dunemush (pennmush/e/51_fundb.c 1.5.1.1.2.1.2.1.2.3 640) *************** *** 1691,1696 **** --- 1691,1700 ---- { dbref it; + if (No_Chat(executor)) { + safe_str("#-1", buff, bp); + return; + } if (nargs == 1) { CHANLIST *c; /* Given an argument, return list of channels it's on */