]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
auth: force no-nick reply when meeting someone
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 7 Feb 2011 10:35:30 +0000 (11:35 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 7 Feb 2011 10:35:30 +0000 (11:35 +0100)
This prevents things such as "nickA: hi, nickB" where nickA is e.g. the
owner and nickB is the newly met user.

lib/rbot/core/auth.rb

index 465f8f5d870658214bc4b82fad6fada4d2ae0e7c..c0234d50d2d3466c00c81467d0da7bfc2ee90ea7 100644 (file)
@@ -649,7 +649,7 @@ class AuthModule < CoreBotModule
     if !nick
       # we are actually responding to a 'hello' command
       unless m.botuser.transient?
     if !nick
       # we are actually responding to a 'hello' command
       unless m.botuser.transient?
-        m.reply @bot.lang.get('hello_X') % m.botuser
+        m.reply @bot.lang.get('hello_X') % m.botuser, :nick => false
         return
       end
       nick = m.sourcenick
         return
       end
       nick = m.sourcenick
@@ -668,7 +668,7 @@ class AuthModule < CoreBotModule
       met = @bot.auth.make_permanent(irc_user, buname)
       @bot.auth.set_changed
       call_event(:botuser,:post_perm, {:irc_user => irc_user, :bot_user => buname})
       met = @bot.auth.make_permanent(irc_user, buname)
       @bot.auth.set_changed
       call_event(:botuser,:post_perm, {:irc_user => irc_user, :bot_user => buname})
-      m.reply @bot.lang.get('hello_X') % met
+      m.reply @bot.lang.get('hello_X') % met, :nick => false
       @bot.say nick, _("you are now registered as %{buname}. I created a random password for you : %{pass} and you can change it at any time by telling me 'user set password <password>' in private" % {
         :buname => buname,
         :pass => met.password
       @bot.say nick, _("you are now registered as %{buname}. I created a random password for you : %{pass} and you can change it at any time by telling me 'user set password <password>' in private" % {
         :buname => buname,
         :pass => met.password