Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcleanspleen committed Dec 13, 2017
1 parent 5e8fa21 commit be243c8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,21 @@ func main() {
Data = readandparsesettings(settingslocation)
ottomessage := false
if len(message) >= 4 {
if strings.ToLower(message[:4]) == "dead chat"
if strings.ToLower(message[:4]) == "dead chat" {
ottomessage = true
person := Data.Chat.Lastperson
time := time.Now().Format(time.RFC850))
time := time.Now().Format(time.RFC850)
allowedtorun := checkandwriteallowed(from, chatid)
ticker := time.NewTicker(time.Milliseconds * 1800000)
go func() {
for t := range ticker.C {
if len(message) >= 4 && strings.ToLower(message[:4] == "dead chat" && Data.Chat.Lastperson != person {
testsend(Data.Chat.Lastperson + "has won dead chat!")


winner := (Data.Chat.Lastperson,"has won dead chat!")
send
}
}
}
}
else if strings.ToLower(message[:4]) == "otto" {
ottomessage = true
//check if allowed
Expand Down

0 comments on commit be243c8

Please sign in to comment.