Skip to content

Commit 7030b08

Browse files
authored
Ignore empty strings in yelling.py (CloudBotIRC#228)
1 parent 8fc4ba1 commit 7030b08

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

plugins/yelling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ def YELL_CHECK(event, conn):
1515
return
1616
TESTY = URL_RE.sub('', event.content)
1717
TESTY = YELL_RE.sub('', TESTY)
18+
if not TESTY:
19+
# Ignore empty strings
20+
return
21+
1822
CAPS_COUNT = sum(1 for c in TESTY if c.isupper())
1923
if CAPS_COUNT / len(TESTY) < .75:
2024
KICK_THEM = "KICK {} {} :USE MOAR CAPS YOU TROGLODYTE!".format(event.chan, event.nick)

0 commit comments

Comments
 (0)