Kickme: fix error if no reason is given.

master
Valentin Lorentz 2012-11-30 14:40:14 +00:00
parent 1f662800b8
commit e1b6d142b7
2 changed files with 4 additions and 3 deletions

View File

@ -66,8 +66,9 @@ class GithubCallback(httpserver.SupyHTTPServerCallback):
index and try out other plugins (if any).""")
def doPost(self, handler, path, form):
if not handler.address_string().endswith('.rs.github.com') and \
not handler.address_string().endswith('.cloud-ips.com'):
log.warning("""'%s' tryed to act as a web hook for Github,
not handler.address_string().endswith('.cloud-ips.com') and \
not handler.address_string() == 'localhost':
log.warning("""'%s' tried to act as a web hook for Github,
but is not GitHub.""" % handler.address_string())
else:
self.plugin.announce.onPayload(json.loads(form['payload'].value))

View File

@ -46,7 +46,7 @@ class Kickme(callbacks.Plugin):
"""[<reason>]
Kick yourself."""
irc.queueMsg(ircmsgs.kick(msg.args[0], msg.nick, reason))
irc.queueMsg(ircmsgs.kick(msg.args[0], msg.nick, reason or ''))
kickme = wrap(kickme, [optional('text')])