From: Giuseppe Bilotta Date: Mon, 7 Feb 2011 10:35:30 +0000 (+0100) Subject: auth: force no-nick reply when meeting someone X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;ds=sidebyside;h=3cbc6c46764b6dab92ca6ac92adf9d3fe46eddff;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git auth: force no-nick reply when meeting someone This prevents things such as "nickA: hi, nickB" where nickA is e.g. the owner and nickB is the newly met user. --- diff --git a/lib/rbot/core/auth.rb b/lib/rbot/core/auth.rb index 465f8f5d..c0234d50 100644 --- a/lib/rbot/core/auth.rb +++ b/lib/rbot/core/auth.rb @@ -649,7 +649,7 @@ class AuthModule < CoreBotModule 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 @@ -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}) - 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 ' in private" % { :buname => buname, :pass => met.password