]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/core/auth.rb
Ruby 1.9 can intern empty strings
[user/henk/code/ruby/rbot.git] / lib / rbot / core / auth.rb
index c0234d50d2d3466c00c81467d0da7bfc2ee90ea7..ce21ccc91c8633996345d32357fb48f59b0a4e65 100644 (file)
@@ -729,7 +729,7 @@ class AuthModule < CoreBotModule
     buname = params[:name]
     return m.reply(_("You can't destroy %{user}") % {:user => buname}) if
            ["everyone", "owner"].include?(buname)
-    mod = params[:modifier].to_sym rescue nil
+    mod = params[:modifier].nil_or_empty? ? nil : params[:modifier].to_sym
 
     buser_array = @bot.auth.save_array
     buser_hash = buser_array.inject({}) { |h, u|