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

Method StartPrompt

internal/users/userrecord.go:601–614  ·  view source on GitHub ↗

Prompt related functionality

(command string, rest string)

Source from the content-addressed store, hash-verified

599
600// Prompt related functionality
601func (u *UserRecord) StartPrompt(command string, rest string) (*prompt.Prompt, bool) {
602
603 if u.activePrompt != nil {
604 // If it's the same prompt, return the existing one
605 if u.activePrompt.Command == command && u.activePrompt.Rest == rest {
606 return u.activePrompt, false
607 }
608 }
609
610 // If no prompt found or it seems like a new prompt, create a new one and replace the old
611 u.activePrompt = prompt.New(command, rest)
612
613 return u.activePrompt, true
614}
615
616func (u *UserRecord) GetPrompt() *prompt.Prompt {
617

Callers 15

characterCommandMethod · 0.80
mudmailCommandMethod · 0.80
auctionCommandMethod · 0.80
server_ConfigFunction · 0.80
spell_CreateFunction · 0.80
StartFunction · 0.80
PicklockFunction · 0.80
StatusFunction · 0.80
item_CreateFunction · 0.80
zone_EditFunction · 0.80
PasswordFunction · 0.80
room_Edit_ContainersFunction · 0.80

Calls 1

NewFunction · 0.92

Tested by

no test coverage detected