Skip to content

Commit

Permalink
fixed bug in raffle command
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonp committed Oct 21, 2014
1 parent 8dddbdd commit f50c87f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions botspade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ def pretty_uptime
def user_is_an_admin?(user)
puts "checking admin for: #{@streamer}"
check_this_user = get_user(user)
if (check_this_user[6] == 1) || user == @streamer
return true
else
return false
if (check_this_user)
if (check_this_user[6] == 1) || user == @streamer
return true
else
return false
end
end
end

Expand Down Expand Up @@ -220,8 +222,10 @@ def check_for_raffle_entry(message, nick)
if (raffle)
if raffle[2] == "live"
if message == raffle[1]
@current_raffle_users << nick
db_set_raffle_users(@current_raffle_users, raffle[0])
if !@current_raffle_users.include(nick)
@current_raffle_users << nick
db_set_raffle_users(@current_raffle_users, raffle[0])
end
elsif message == "!pass"
if raffle[3] == nick
potential_winners = @current_raffle_users
Expand Down

0 comments on commit f50c87f

Please sign in to comment.