Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Keller committed Mar 23, 2017
2 parents 949c6e5 + 643e8ad commit 70fde7c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Sources/SwiftChatSE/ChatListener.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
// Copyright © 2016 NobodyNada. All rights reserved.
//

//TODO:
// 1. Make a proper fix for recongnising '@bots alive' and replying in SOBotics

import Foundation
import Dispatch

Expand Down Expand Up @@ -88,7 +91,7 @@ open class ChatListener {
}

var args = [String]()
var commandScores = [String:Int]()

for command in commands {
Expand Down Expand Up @@ -207,6 +210,14 @@ open class ChatListener {

///Process a ChatMessage in the specified room.
open func processMessage(_ room: ChatRoom, message: ChatMessage, isEdit: Bool) {

//A hack till I can get a proper fix
if (message.content.lowercased() == "@bots alive" || message.content.lowercased() == "🚆" || message.content.lowercased() == "🚅" || message.content.lowercased() == "🚂" || message.content.lowercased() == "🚊") && room.roomID == 111347
{
room.postMessage("[🚃](https://www.youtube.com/watch?v=dQw4w9WgXcQ)")
return
}

let lowercase = message.content.lowercased()

let shortName = String(name.characters[
Expand Down

0 comments on commit 70fde7c

Please sign in to comment.