@program staff-wall.muf 1 99999 d i ( staff-wall.muf version 1.0 by Wog Program to allow staff members {identified by a prop changeable below being set} to make @wall messages. This program also allows @wall messages to be poses post-fixed with the text $define'able below as POSE_POSTPEND To setup create an action called @wall linked to this program. --- Change History -------------------------------------- v 1.0 27 Jan 2001 Intial revision. 23 Feb 2001 Minor updates for release on webpage. --- Distribution Information ---------------------------- Copyright {C} Charles "Wog" Reiss This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or {at your option} any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. For a copy of the GPL: a> see: http://www.gnu.org/copyleft/gpl.html b> write to: the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ) $def STAFFPROP "@/helpstaff?" $def POSE_POSTPEND " (Public Message)" : helpstaff? STAFFPROP getpropstr .yes? ; : authorized? dup "W" flag? swap helpstaff? or ; : broadcast ( mesg omesg -- ) me @ rot notify 1 condescr begin ( omesg descr ) dup 0 = not while dup descrcon dup condbref me @ dbcmp if pop nextdescr continue then ( omesg descr con ) 3 pick connotify nextdescr repeat ( omesg 0 ) pop pop ; : do-help "cmd-staff-wall by Wog" .tell "USAGE: " command @ strcat " " strcat .tell ; : make-messages ( s -- mesg omesg ) dup ":" 1 strncmp not if 1 strcut swap pop dup 1 strcut pop "':;!+-=?. " swap instr not if " " swap strcat then me @ name swap strcat POST_POSTPEND strcat dup else "You shout, \"" over strcat "\"" strcat me @ name " shouts, \"" strcat rot strcat "\"" strcat then ; : main "me" match me ! me @ authorized? not if "Premission denied." .tell exit then dup not over "#h" 1 strncmp not or if do-help exit then make-messages broadcast ; . c q @set staff-wall.muf=VIEWABLE