MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / SendUserMessage

Function SendUserMessage

internal/scripting/messaging_func.go:15–28  ·  view source on GitHub ↗

# These functions get exported to the scripting engine

(userId int, message string)

Source from the content-addressed store, hash-verified

13// ////////////////////////////////////////////////////////
14
15func SendUserMessage(userId int, message string) {
16 if disableMessageQueue || userId == 0 {
17 return
18 }
19
20 u := users.GetByUserId(userId)
21 if u == nil {
22 return
23 }
24
25 message = userTextWrap.Wrap(message)
26
27 u.SendText(message)
28}
29
30func SendRoomMessage(roomId int, message string, excludeIds ...int) {
31 if disableMessageQueue {

Callers 15

onCommand_rollFunction · 0.85
onCommand_flipFunction · 0.85
onCommand_rollFunction · 0.85
onCommand_shakeFunction · 0.85
onCommand_spinFunction · 0.85
onCommand_shuffleFunction · 0.85
onCommand_drawFunction · 0.85
onCommand_shuffleFunction · 0.85
onCommand_drawFunction · 0.85
onCommand_dealFunction · 0.85
onCastFunction · 0.85
onWaitFunction · 0.85

Calls 3

GetByUserIdFunction · 0.92
WrapMethod · 0.80
SendTextMethod · 0.45

Tested by

no test coverage detected