Name : OS_Patch Version: PennMUSH 1.7.7p12 Credits: Pelle Haukali Files : src/cmdlocal.c Syntax : patch -p0 < OS_Patch This patchfile includes the +OS command included on many MUSHes. I am unaware where the command was first used, though I think it was ElendorMUSH. This is simply another way of posing, speaking and semiposing OOCly. It currently runs on my own MUSH, Arador. *** cmdlocal.c.old Wed Mar 26 08:10:04 2003 --- cmdlocal.c Thu Mar 20 13:14:13 2003 *************** *** 18,23 **** --- 18,34 ---- #include "confmagic.h" #include "ansi.h" #include "dbdefs.h" + void fcut(char *alpha,char *beta) + { + int i, x; + + for(i = 1, x = 0;i <= strlen(alpha);i++) + { + beta[x] = alpha[i]; + x++; + } + } + extern HASHTAB htab_reserved_aliases; *************** *** 55,60 **** --- 66,94 ---- } #endif + COMMAND (cmd_local_os) + { + char temp[50]; + dbref loc = Location(player); + + fcut(arg_left,temp); + switch(arg_left[0]) + { + case ':' : + notify_anything(player, na_loc, &loc, ns_esnotify, 0, + tprintf("%s%s %s %s",ANSI_HILITE, ANSI_NORMAL, Name(player), temp)); + break; + case ';' : + notify_anything(player, na_loc, &loc, ns_esnotify, 0, + tprintf("%s%s %s%s",ANSI_HILITE, ANSI_NORMAL, Name(player), temp)); + break; + default: + notify_format(player, T("%s%s You say, \"%s\""),ANSI_HILITE, ANSI_NORMAL, arg_left); + notify_except(Contents(loc), player, tprintf(T("%s%s %s says, \"%s\""),ANSI_HILITE, + ANSI_NORMAL, Name(player), arg_left)); + } + } + /* Called during the command init sequence. * This is where you'd put calls to command_add to insert a local * command into the command hash table. Any command you add here *************** *** 76,79 **** --- 110,115 ---- command_add("@SILLY", CMD_T_ANY, "WIZARD ROYALTY", SEE_ALL, "NOISY NOEVAL", cmd_local_silly); #endif + command_add("+OS", CMD_T_ANY, NULL, 0, "NOISY NOEVAL", + cmd_local_os); }