Skip to content

Commit

Permalink
Merge pull request #208 from Red-M/patch-9
Browse files Browse the repository at this point in the history
Update irc.py
  • Loading branch information
dmptrluke committed Nov 5, 2015
2 parents b014461 + 43207c4 commit c8ceede
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cloudbot/clients/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,17 @@ def data_received(self, data):
# Parse the command and params

# Content
if command_params and command_params[-1].startswith(":"):
if command_params:
if command_params[-1].startswith(":"):
# If the last param is in the format of `:content` remove the `:` from it, and set content from it
content_raw = command_params[-1][1:]
content = irc_clean(content_raw)
else:
content_raw = None
content = None
content_raw = command_params[-1][1:]
content = irc_clean(content_raw)
else:
content_raw = None
content = None
if not command_params[-1]=="" and isinstance("string", type(command_params[-1])):
content = command_params[-1]
content_raw = command_params[-1]

# Event type
if command in irc_command_to_event_type:
Expand Down

0 comments on commit c8ceede

Please sign in to comment.