Additional checks on keyword matches to prevent errors when no part message is specified

This commit is contained in:
Mark Veidemanis 2018-03-14 20:20:53 +00:00
parent d168d69732
commit 369ddbe939
2 changed files with 4 additions and 7 deletions

View File

@ -1,7 +0,0 @@
{
"Keywords": [
"example",
"s"
],
"KeywordsExcept": {}
}

View File

@ -35,6 +35,8 @@ def sendMaster(data):
main.connections[i].send(data)
def isKeyword(msg):
if msg == None:
return
message = msg.lower()
messageDuplicate = message
toUndo = False
@ -67,6 +69,8 @@ def isKeyword(msg):
return [message, uniqueNum, totalNum]
def actKeyword(user, channel, message, nickname, actType, name):
if message == None:
return
toSend = isKeyword(message)
if name == main.config["Master"][0] and channel == main.config["Master"][1]:
pass