]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
!!! (message.rb) dear tango_! i have no idea what r1073 is! -jsn.
authorDmitry Kim <dmitry point kim at gmail point com>
Thu, 30 Aug 2007 18:31:24 +0000 (18:31 +0000)
committerDmitry Kim <dmitry point kim at gmail point com>
Thu, 30 Aug 2007 18:31:24 +0000 (18:31 +0000)
lib/rbot/message.rb

index c671e00a672e7bdce7213a0baa86a4bf22f4cc73..42042b88a2884b2d367ba5a3292cfed5cc87baf0 100644 (file)
@@ -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?