Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
gosimple status check
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Aug 18, 2017
1 parent 5fb3941 commit c498be6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions meowkov.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func loadConfig(file string) (bool, bool) {

// detect when own nick is mentioned or when message is directed to other person
ownMention = regexp.MustCompile("(?i)_*" + regexp.QuoteMeta(config.BotName) + "_*[:,]*\\s*")
otherMention = regexp.MustCompile("(?i)^\\S+[:,]+\\s+")
otherMention = regexp.MustCompile(`(?i)^\S+[:,]+\s+`)
// detect HTTP(s) URLs
httpLink = regexp.MustCompile("^http(s)?://[^/]")
// remove single and double quotes, parentheses and ?!, leave semicolons and commas
Expand Down Expand Up @@ -375,7 +375,7 @@ func getRedisServer() string {
if host != "" {
redisHost = host
if config.Debug {
log.Println("Using Dockerized Redis: " + env + "=" + fmt.Sprint(host))
log.Println("Using Dockerized Redis: " + env + "=" + host)
}
}

Expand All @@ -391,7 +391,7 @@ func isChainEmpty(texts []string) bool {
}

func typingDelay(text string, start time.Time) {
durationSoFar := time.Now().Sub(start)
durationSoFar := time.Since(start)
// https://en.wikipedia.org/wiki/Words_per_minute
typing := time.Duration((float64(len(text))/5)/float64(config.WordsPerMinute)*60)*time.Second - durationSoFar
if config.Debug {
Expand Down

0 comments on commit c498be6

Please sign in to comment.