diff options
Diffstat (limited to 'news')
-rwxr-xr-x | news/controller.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/news/controller.py b/news/controller.py index cf032e65..4a8fd3bc 100755 --- a/news/controller.py +++ b/news/controller.py @@ -55,10 +55,13 @@ class NewsBot(irc.bot.SingleServerIRCBot): class commands(): def add(args): - bot = rssbot.RssBot(args[2], args[1], url_shortener=url_shortener) - bots[args[1]] = bot - bot.start() - return "bot " + args[1] + " added" + if args[1] not in bots: + bot = rssbot.RssBot(args[2], args[1], url_shortener=url_shortener) + bots[args[1]] = bot + bot.start() + return "bot " + args[1] + " added" + else: + return args[1] + ' does already exist' def delete(args): bots[args[1]].stop() |