@q
@program oocpose.muf
1 9999 d
i
( oocpose.muf v1.0 Jessy @ FurryMUCK 7/99
A simple pose program that inserts a configurable string to indicate
the gesture is made OOC. There is a companion program, oocsay.muf,
to handle OOC statements.
INSTALLATION:
Link a global action to the program. No macros or libraries are
required.
CONFIGURATION:
A wizard or the owner of the program may set either a prefix, insert,
or suffix that indicates a statement is OOC, by setting props
_prefix, _insert, or _suffix on the trigger. The default is a suffix
of [OOC].
EXAMPLES:
@set opose=_prefix:<<OOC>>
opose waves!
<<OOC>> Jessy waves!
@set opose=_insert:<<OOC>>
opose waves!
<<OOC>> Jessy waves!
@set opose=_suffix:<<OOC>>
opose waves!
Jessy waves! <<OOC>>
USAGE:
Type the command name followed by a pose string to make an OOC
gesture.
This program may be freely ported. Please comment any changes.
)
(2345678901234567890123456789012345678901234567890123456789012345678901)
$define tell me @ swap notify $enddef
lvar ourText (* str: original message string *)
lvar ourTell (* str: message formatted to display to user *)
lvar ourSet (* bool: true if a configured OOC string is set *)
: DoHelp ( -- ) (* display help screen *)
" " tell
"oocpose.muf (#" prog intostr strcat ")" strcat tell " " tell
"A simple pose program that inserts a string to indicate that "
"gestures are made Out Of Character." strcat tell " " tell
"SYNTAX: " command @ strcat " <pose>" strcat tell " " tell
"CONFIGURATION: Wizards or the owner of the trigger action may "
"set a prefix, insert, or suffix string that indicates gestures "
"are made OOC. Prefixes are put before the message string; inserts "
"appear immediately after the speaker's name; suffixes follow the "
"message string. Set prop _prefix, _insert, or _suffix, respectively, "
"on the trigger to configure these. The default is a suffix of [OOC]."
strcat strcat strcat strcat strcat tell
;
: main
"me" match me ! (* block identity spoofing *)
dup if
"#help" over stringpfx if
DoHelp exit
then
ourText !
else (* bail out for null messages *)
exit
then
trig "_prefix" getpropstr dup if (* insert prefix if configured *)
" " strcat ourTell !
1 ourSet !
else
pop "" ourTell !
then
ourTell @ me @ name strcat " " strcat ourTell ! (* insert name *)
trig "_insert" getpropstr dup if (* insert suffix if configured *)
ourTell @ swap strcat " " strcat ourTell !
1 ourSet !
else
pop
then
ourTell @
ourText @ ",*" smatch
ourText @ "'*" smatch or if
strip
then
ourText @ strcat ourTell !
trig "_suffix" getpropstr dup if (* insert suffix if configured *)
ourTell @ " " strcat swap strcat ourTell !
1 ourSet !
else
pop
then
(* insert default indicatore string if nothing was configured *)
ourSet @ not if
ourTell @ " [OOC]" strcat ourTell !
then
me @ location #-1 ourTell @ notify_except (* display *)
;
.
c
q