@@ -290,36 +290,34 @@ func (u *UserRecord) GetConnectTime() time.Time {
290290 return u .connectionTime
291291}
292292
293- func (u * UserRecord ) GetCommandPrompt (fullRedraw bool , forcePromptType ... string ) string {
293+ func (u * UserRecord ) GetCommandPrompt (fullRedraw bool ) string {
294294
295295 promptOut := ``
296296
297- if len (forcePromptType ) == 0 || forcePromptType [0 ] != `mprompt` {
298- if u .activePrompt != nil {
297+ if u .activePrompt != nil {
299298
300- if activeQuestion := u .activePrompt .GetNextQuestion (); activeQuestion != nil {
301- promptOut = activeQuestion .String ()
302- }
299+ if activeQuestion := u .activePrompt .GetNextQuestion (); activeQuestion != nil {
300+ promptOut = activeQuestion .String ()
303301 }
304302 }
305303
304+ goAhead := ``
305+ if connections .GetClientSettings (u .ConnectionId ()).SendTelnetGoAhead {
306+ goAhead = term .TelnetGoAhead .String ()
307+ }
308+
306309 if len (promptOut ) == 0 {
307310
308311 var customPrompt any = nil
309312 var inCombat bool = u .Character .Aggro != nil
310313
311- if len (forcePromptType ) > 0 {
312- customPrompt = u .GetConfigOption (forcePromptType [0 ] + `-compiled` )
313- } else {
314-
315- if inCombat {
316- customPrompt = u .GetConfigOption (`fprompt-compiled` )
317- }
314+ if inCombat {
315+ customPrompt = u .GetConfigOption (`fprompt-compiled` )
316+ }
318317
319- // No other custom prompts? try the default setting
320- if customPrompt == nil {
321- customPrompt = u .GetConfigOption (`prompt-compiled` )
322- }
318+ // No other custom prompts? try the default setting
319+ if customPrompt == nil {
320+ customPrompt = u .GetConfigOption (`prompt-compiled` )
323321 }
324322
325323 var ok bool
@@ -339,10 +337,10 @@ func (u *UserRecord) GetCommandPrompt(fullRedraw bool, forcePromptType ...string
339337 if len (suggested ) > 0 {
340338 suggested = `<ansi fg="suggested-text">` + suggested + `</ansi>`
341339 }
342- return term .AnsiMoveCursorColumn .String () + term .AnsiEraseLine .String () + promptOut + unsent + suggested
340+ return term .AnsiMoveCursorColumn .String () + term .AnsiEraseLine .String () + promptOut + unsent + suggested + goAhead
343341 }
344342
345- return promptOut
343+ return promptOut + goAhead
346344}
347345
348346func (u * UserRecord ) ProcessPromptString (promptStr string ) string {
0 commit comments