]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/botuser.rb
Better flood control
[user/henk/code/ruby/rbot.git] / lib / rbot / botuser.rb
index 7daaf66e9cf7d3baf3cb8d003618e67d71ccf6d1..41fca6cf9847316cd0d071826a0a5f36b2ee08eb 100644 (file)
@@ -160,6 +160,12 @@ module Irc
     end\r
 \r
 \r
+    # This is the error that gets raised when an invalid password is met\r
+    #\r
+    class InvalidPassword < RuntimeError\r
+    end\r
+\r
+\r
     # This is the basic class for bot users: they have a username, a password,\r
     # a list of netmasks to match against, and a list of permissions.\r
     #\r
@@ -589,7 +595,7 @@ module Irc
         k = n.to_sym\r
         raise "No such BotUser #{n}" unless include?(k)\r
         if @botusers.has_key?(ircuser)\r
-          return true if @botusers[ircuser].username = n\r
+          return true if @botusers[ircuser].username == n\r
           # TODO\r
           # @botusers[ircuser].logout(ircuser)\r
         end\r