forked from an/flokati
markov: dont learn own messages
This commit is contained in:
parent
520f62eaa2
commit
ede74c275f
3 changed files with 6 additions and 1 deletions
|
@ -55,7 +55,10 @@ func markovHandleMessage(m *Message) {
|
|||
}
|
||||
}
|
||||
|
||||
markovChain.Write(text)
|
||||
fmt.Println(m.From, BotName)
|
||||
if m.From != BotName {
|
||||
markovChain.Write(text)
|
||||
}
|
||||
}
|
||||
|
||||
func markovRun() {
|
||||
|
|
|
@ -16,6 +16,7 @@ var (
|
|||
MsgFuncs = make(map[string]func(*Message))
|
||||
RunFuncs = make(map[string]func())
|
||||
BotNick string
|
||||
BotName string
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue