Skip to content

Commit

Permalink
fixed bug preventing streamer from admin access
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonp committed Jul 24, 2014
1 parent d89143b commit 5e89f7c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions botspade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@

# Set initial uptime
@stream_start_time = "none"

# Calculate the streamer's name, for initial admin
@streamer = @botchan.to_s
@streamer[0] = ''

end

Expand Down Expand Up @@ -163,11 +167,9 @@ def pretty_uptime
end

def user_is_an_admin?(user)
streamer = @botchan.to_s
streamer[0] = ''
puts "checking admin for: #{streamer}"
puts "checking admin for: #{@streamer}"
check_this_user = get_user(user)
if (check_this_user[6] == 1) || check_this_user == "watchspade"
if (check_this_user[6] == 1) || check_this_user == @streamer
return true
else
return false
Expand Down

0 comments on commit 5e89f7c

Please sign in to comment.