Compare commits
No commits in common. "140f9ed5bcbdd6b68df14c869591c32097089fbb" and "426511785e63e393bc6c6e5c971601ef21bfd3a6" have entirely different histories.
140f9ed5bc
...
426511785e
|
@ -39,25 +39,6 @@ func init() {
|
|||
}
|
||||
|
||||
func markovHandleMessage(m *Message) {
|
||||
|
||||
tok := strings.Split(m.Text, " ")
|
||||
if tok[0] == "!talk" {
|
||||
if len(tok) < 2 {
|
||||
SayCh <- m.Channel + "\npfffrrz ... worüber denn?"
|
||||
} else {
|
||||
talk := tok[1]
|
||||
for {
|
||||
time.Sleep(time.Duration(rand.Intn(8)+2 * time.Second)
|
||||
talk = markovChain.Generate(*markovAnswerLen, talk)
|
||||
SayCh <- m.Channel + "\n" + talk
|
||||
if rand.Intn(100) < 10 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
text := m.Text
|
||||
if text == "" {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue