From 8708aaa3e37cd9822faf52723f13958e349ac782 Mon Sep 17 00:00:00 2001 From: Jaiden Mispy <^_^@mispy.me> Date: Fri, 5 Dec 2014 16:35:57 +1100 Subject: [PATCH] Allow starting a single bot by name --- bin/ebooks | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ebooks b/bin/ebooks index a402cfe..7a144dc 100755 --- a/bin/ebooks +++ b/bin/ebooks @@ -254,7 +254,7 @@ STR if botname.nil? bots = Ebooks::Bot.all else - bots = bots.select { |bot| bot.username == botname } + bots = Ebooks::Bot.all.select { |bot| bot.username == botname } if bots.empty? log "Couldn't find a defined bot for @#{botname}!" exit 1 @@ -343,8 +343,8 @@ STR when "auth" then auth when "console" then console when "c" then console - when "start" then start - when "s" then start + when "start" then start(args[1]) + when "s" then start(args[1]) when "help" then help(args[1]) else log "No such command '#{args[0]}'"