Skip to content

Commit

Permalink
[admin]: Check if user input is valid
Browse files Browse the repository at this point in the history
* Check if user input in .me and .msg is valid
  • Loading branch information
Erethon committed Mar 1, 2014
1 parent 2ac5ac4 commit 73976df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def msg(bot, trigger):
return
if not trigger.admin:
return
if trigger.group(2) is None:
return

channel, _sep, message = trigger.group(2).partition(' ')
message = message.strip()
Expand All @@ -109,6 +111,8 @@ def me(bot, trigger):
return
if not trigger.admin:
return
if trigger.group(2) is None:
return

channel, _sep, action = trigger.group(2).partition(' ')
action = action.strip()
Expand Down

0 comments on commit 73976df

Please sign in to comment.