]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/nickserv.rb
remove whitespace
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / nickserv.rb
index d0a38c746b438c8a27bf46b004e86bed8c533868..768840d38522b13ce73fd986816c5ae0966e7a88 100644 (file)
@@ -20,7 +20,7 @@
 #         previously identified successfully
 
 class NickServPlugin < Plugin
-  
+
   Config.register Config::StringValue.new('nickserv.name',
     :default => "nickserv", :requires_restart => false,
     :desc => _("Name of the nick server (all lowercase)"))
@@ -35,7 +35,7 @@ class NickServPlugin < Plugin
     :on_change => Proc.new { |bot, v| bot.plugins.delegate "set_nick_avail", v },
     :desc => _("String to look for to see if the nick server is informing us that our nick is now available"))
   Config.register Config::StringValue.new('nickserv.identified_string',
-    :default => "(Password|Contrase|Mot de passe).+(acce[pt]t|r[ie]cog?n).+(identif|r[ie]cog?n)",
+    :default => "((Password|Contrase|Mot de passe).+(acce[pt]t|r[ie]cog?n).+)?(you|tu|vous).+(identif|r[ie]cog?n)",
     :requires_restart => false,
     :on_change => Proc.new { |bot, v| bot.plugins.delegate "set_identified_string", v },
     :desc => _("String to look for to see if the nick server is informing us that we have identified successfully"))
@@ -62,21 +62,21 @@ class NickServPlugin < Plugin
       return _("nickserv listnicks: lists nicknames and associated password the bot knows about - you will need config level auth access to do this one and it will reply by privmsg only")
     end
   end
-  
+
   def genpasswd
     return Irc::Bot::Auth.random_password
   end
 
   def set_ident_request(val)
-    @ident_request = Regexp.new(val)
+    @ident_request = Regexp.new(val, true)
   end
 
   def set_nick_avail(val)
-    @nick_avail = Regexp.new(val)
+    @nick_avail = Regexp.new(val, true)
   end
 
   def set_identified_string(val)
-    @identified_string = Regexp.new(val)
+    @identified_string = Regexp.new(val, true)
   end
 
   def initialize
@@ -167,12 +167,12 @@ class NickServPlugin < Plugin
       m.reply _("uh ... something went wrong ...")
     end
   end
-  
+
   def connect
     @identified = false
     do_identify
   end
-  
+
   def nicktaken(nick)
     if @registry.has_key?(nick)
       ns_say "GHOST #{nick} #{@registry[nick]}"