Skip to content

Commit

Permalink
bug fixes only
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonp committed Aug 24, 2014
1 parent 73b0654 commit 1ecf282
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions botspade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,12 @@ def respond_to_commands(message)
end
end

############################################################################
#
# Questions feature
#


############################################################################
#
# Basic Call & Response presets, toggles
Expand All @@ -386,12 +392,14 @@ def respond_to_commands(message)
end

on :channel, /^!makeadmin (.*)/i do |first|
user_to_make_admin = first.downcase
user = get_user(user_to_make_admin)
admin_value = 1
if (user)
if set_user_admin_value(admin_value, user[0])
msg channel, "success"
if user_is_an_admin?(nick)
user_to_make_admin = first.downcase
user = get_user(user_to_make_admin)
admin_value = 1
if (user)
if set_user_admin_value(admin_value, user[0])
msg channel, "success"
end
end
end
end
Expand All @@ -412,12 +420,14 @@ def respond_to_commands(message)
end

on :channel, /^!removeadmin (.*)/i do |first|
user_to_make_admin = first.downcase
user = get_user(user_to_make_admin)
admin_value = 0
if (user)
if set_user_admin_value(admin_value, user[0])
msg channel, "success"
if user_is_an_admin?(nick)
user_to_make_admin = first.downcase
user = get_user(user_to_make_admin)
admin_value = 0
if (user)
if set_user_admin_value(admin_value, user[0])
msg channel, "success"
end
end
end
end
Expand Down

0 comments on commit 1ecf282

Please sign in to comment.