diff options
author | lassulus <lassulus@googlemail.com> | 2014-01-04 15:05:23 +0100 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2014-01-04 15:05:23 +0100 |
commit | 79ea1e311ae6d1015c8cffe7855b23bdabf5ea6a (patch) | |
tree | 9628f5e02efd53d9d67f14ba78ef7da6bb8bd9f6 /ircbot/contoller.py | |
parent | 366f912a3771a1c5b92441ef7efed52541b33827 (diff) |
ircbot: del now working
Diffstat (limited to 'ircbot/contoller.py')
-rwxr-xr-x | ircbot/contoller.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ircbot/contoller.py b/ircbot/contoller.py index 5750551f..fcd839b5 100755 --- a/ircbot/contoller.py +++ b/ircbot/contoller.py @@ -1,10 +1,6 @@ import irc.bot import _thread import rssbot -# -#def startall(): -# for bot in botarray: -# bot.start() class NewsBot(irc.bot.SingleServerIRCBot): def __init__(self, name, server='ire', port=6667, chan='#news', timeout=60): @@ -53,10 +49,12 @@ class NewsBot(irc.bot.SingleServerIRCBot): bots[args[1]] = bot bot.start() return "bot " + args[1] + " added" + elif args[0] == 'del': - bots[args[1]].die() - del bots[args1] + bots[args[1]].stop() + del bots[args[1]] return "bot " + args[1] + " deleted" + elif args[0] == 'save': output_buffer = '' for bot in bots: @@ -67,7 +65,8 @@ class NewsBot(irc.bot.SingleServerIRCBot): F.close() return "bots saved to " + feedfile - + elif args[0] == 'caps': + return "add del save caps" else: return "unknown command" @@ -86,6 +85,7 @@ lines = F.readlines() F.close() for line in lines: + line = line.strip('\n') linear = line.split('|') bot = rssbot.RssBot(linear[1], linear[0]) bot.start() |