aboutsummaryrefslogtreecommitdiffstats
path: root/plugin.py
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2014-04-28 00:16:14 +0300
committerkongr45gpen <electrovesta@gmail.com>2014-04-28 00:16:14 +0300
commitb4c587246e389b72019f76515dc04e0e13b92eb6 (patch)
tree62d777f222b7925b66ec10635385b92560973f5e /plugin.py
parent8afc8e3105c89115c4327f83041bb96796c894ef (diff)
downloadsupybot_github-b4c587246e389b72019f76515dc04e0e13b92eb6.tar.gz
supybot_github-b4c587246e389b72019f76515dc04e0e13b92eb6.tar.bz2
supybot_github-b4c587246e389b72019f76515dc04e0e13b92eb6.zip
Add tests
Diffstat (limited to 'plugin.py')
-rw-r--r--plugin.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugin.py b/plugin.py
index 6985213..5052c06 100644
--- a/plugin.py
+++ b/plugin.py
@@ -52,6 +52,8 @@ import local.globals as globals
import local.handler.GithubHandler as RequestHandler
import local.utility as Utility
+globals.init()
+
class Github(callbacks.Plugin):
"""Add the help for \"@plugin help Github\" here
This should describe how to use this plugin."""
@@ -109,8 +111,10 @@ class Github(callbacks.Plugin):
if order == 'last' or type == 'last':
requestedNum = len(globals.messageList) - requestedNum + 1
- print globals.messageList
- irc.reply(globals.messageList[requestedNum-1])
+ try:
+ irc.reply(globals.messageList[requestedNum-1])
+ except IndexError:
+ irc.error('No such message')
# Debug function
get = wrap(get, ['lowered', optional('lowered'), optional('text')]) if world.testing else False

© 2014-2024 Faster IT GmbH | imprint | privacy policy