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

Function TrackBadCommand

internal/badinputtracker/badinputtracker.go:10–20  ·  view source on GitHub ↗
(cmd string, rest string)

Source from the content-addressed store, hash-verified

8)
9
10func TrackBadCommand(cmd string, rest string) {
11
12 lock.Lock()
13 defer lock.Unlock()
14
15 if _, ok := badCommands[cmd]; !ok {
16 badCommands[cmd] = map[string]int{}
17 }
18
19 badCommands[cmd][rest] = badCommands[cmd][rest] + 1
20}
21
22func GetBadCommands() map[string]int {
23

Callers 4

processInputMethod · 0.92
TestTrackBadCommandFunction · 0.85
TestGetBadCommandsFunction · 0.85
TestClearFunction · 0.85

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by 3

TestTrackBadCommandFunction · 0.68
TestGetBadCommandsFunction · 0.68
TestClearFunction · 0.68