From: Dmitry Kim Date: Thu, 30 Aug 2007 18:31:24 +0000 (+0000) Subject: !!! (message.rb) dear tango_! i have no idea what r1073 is! -jsn. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=a1bd10b2fd194646b8fdd1151d490f61d59792d5;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git !!! (message.rb) dear tango_! i have no idea what r1073 is! -jsn. --- diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb index c671e00a..42042b88 100644 --- a/lib/rbot/message.rb +++ b/lib/rbot/message.rb @@ -150,24 +150,13 @@ module Irc # Access the nick of the source # def sourcenick - if @source.reply_to?(:nick) - @source.nick - else - @source.to_s - end + @source.nick end # Access the user@host of the source # def sourceaddress - str = String.new - if @source.reply_to?(:user) - str << @source.user.to_s - end - if @source.reply_to?(:host) - str << @source.host.to_s - end - str + "#{@source.user}@#{@source.host}" end # Was the message from an identified user?