Skip to content

Commit

Permalink
fix #234
Browse files Browse the repository at this point in the history
  • Loading branch information
pefoley2 committed Aug 20, 2013
1 parent 19c7ec4 commit 2369e72
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions control.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,13 @@ def handle_accept(handler, cmd, send):
apikey = handler.config.get('api', 'githubapikey')
issue = handler.modules['issue'].create_issue(msg, source, repo, apikey)
handler.issues.pop(num)
send("Issue Created -- %s" % issue)
ctrlchan = handler.config.get('core', 'ctrlchan')
channel = handler.config.get('core', 'channel')
botnick = handler.config.get('core', 'nick')
nick = source.split('!')[0]
msg = "Issue Created -- %s -- %s" % (issue, msg)
handler.connection.privmsg_many([ctrlchan, channel, nick], msg)
handler.do_log('private', botnick, msg, 'privmsg')


def handle_reject(handler, cmd, send):
Expand All @@ -189,8 +195,14 @@ def handle_reject(handler, cmd, send):
elif not handler.issues or len(handler.issues) < int(cmd[1]):
send("Not a valid issue")
else:
issue = handler.issues.pop(int(cmd[1]))
send("Issue Rejected -- %s" % issue[0])
msg, source = handler.issues.pop(int(cmd[1]))
ctrlchan = handler.config.get('core', 'ctrlchan')
channel = handler.config.get('core', 'channel')
botnick = handler.config.get('core', 'nick')
nick = source.split('!')[0]
msg = "Issue Rejected -- %s" % msg
handler.connection.privmsg_many([ctrlchan, channel, nick], msg)
handler.do_log('private', botnick, msg, 'privmsg')


def handle_ctrlchan(handler, msg, c, send):
Expand Down

0 comments on commit 2369e72

Please sign in to comment.