X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fnickserv.rb;h=6f8b3a724977a75989863a886444c1fc08d53d97;hb=682e7f1708b9534385467b3d707433cb256b6405;hp=d0a38c746b438c8a27bf46b004e86bed8c533868;hpb=21947daae8f66141d3c53ce2f58eab60701d52bf;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/nickserv.rb b/data/rbot/plugins/nickserv.rb index d0a38c74..6f8b3a72 100644 --- a/data/rbot/plugins/nickserv.rb +++ b/data/rbot/plugins/nickserv.rb @@ -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)")) @@ -30,12 +30,12 @@ class NickServPlugin < Plugin :on_change => Proc.new { |bot, v| bot.plugins.delegate "set_ident_request", v }, :desc => _("String to look for to see if the nick server is asking us to identify")) Config.register Config::StringValue.new('nickserv.nick_avail', - :default => "not (currently )?online|killed|recovered|disconnesso|libero", + :default => "not (currently )?online|killed|ghosted|recovered|disconnesso|libero", :requires_restart => false, :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]}"