Additional checks on keyword matches to prevent errors when no part message is specified
This commit is contained in:
parent
d168d69732
commit
369ddbe939
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"Keywords": [
|
|
||||||
"example",
|
|
||||||
"s"
|
|
||||||
],
|
|
||||||
"KeywordsExcept": {}
|
|
||||||
}
|
|
|
@ -35,6 +35,8 @@ def sendMaster(data):
|
||||||
main.connections[i].send(data)
|
main.connections[i].send(data)
|
||||||
|
|
||||||
def isKeyword(msg):
|
def isKeyword(msg):
|
||||||
|
if msg == None:
|
||||||
|
return
|
||||||
message = msg.lower()
|
message = msg.lower()
|
||||||
messageDuplicate = message
|
messageDuplicate = message
|
||||||
toUndo = False
|
toUndo = False
|
||||||
|
@ -67,6 +69,8 @@ def isKeyword(msg):
|
||||||
return [message, uniqueNum, totalNum]
|
return [message, uniqueNum, totalNum]
|
||||||
|
|
||||||
def actKeyword(user, channel, message, nickname, actType, name):
|
def actKeyword(user, channel, message, nickname, actType, name):
|
||||||
|
if message == None:
|
||||||
|
return
|
||||||
toSend = isKeyword(message)
|
toSend = isKeyword(message)
|
||||||
if name == main.config["Master"][0] and channel == main.config["Master"][1]:
|
if name == main.config["Master"][0] and channel == main.config["Master"][1]:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue