MUDL:send msgs for whisper

From SlothMUD Wiki
Jump to: navigation, search


Summary

Function Name send_msgs_for_whisper
Settable No
Returns Boolean


This function sends the appropriate messages for the "whisper" command. It is most likely to be used inside the intercept_whisper function but could be used in other places. The function returns TRUE if all the parameters are valid and FALSE otherwise.


Parameters

Arguments
Character Actor performing the whisper command.
Character Second Actor receiving the whisper command.
String The text to be spoken by the first actor.
String The text to be heard by the second actor.


Output

Person Message Sent
Actor You whisper to <Second Actor> <message>.
Second Actor <Actor> whispers to you, <message>.
Others in the Room <Actor> whispers something to <Second Actor>.


Example

addproc <mobile> mudl
setproc <mobile> 0 intercept_whisper_ss

# Allow normal processing.
send_msgs_for_whisper(%a, %c, %1, %2),
cmd(%c, 'say Speak up!  I can~`t hear you!'),

# Stop future processing of this command
set(flag(%f, 'procedure-flags', 'overrode-command'), true),
return(true)
@

setproc <mobile> 0 PROC_ENABLED 1
compile