From 2eea66796ccd8bd53d483a652fd9cbc5de219f25 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 2 Sep 2013 00:10:37 +0100 Subject: [PATCH] ChatStart.rb check account exists --- ChatStart.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ChatStart.rb b/ChatStart.rb index d3e4baa..eae9402 100644 --- a/ChatStart.rb +++ b/ChatStart.rb @@ -6,9 +6,11 @@ module ChatStart } def self.prof_on_connect(account_name, fulljid) - @@starts[account_name].each { | contact | - Prof::send_line("/msg " + contact) - } - Prof::send_line("/win 1") + if @@starts[account_name] + @@starts[account_name].each { | contact | + Prof::send_line("/msg " + contact) + } + Prof::send_line("/win 1") + end end end