X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=lib%2Frbot%2Firc.rb;h=c57b252f58973801f7f5b8a6e234a56903c1185e;hb=2a3bc07d139593f1f57e23cfbd08602d29a8b26c;hp=326e25ef2f1d624884c6d181c11da4002e9700c2;hpb=9ab64fe6dfd71647bbfcf87e4839cc15d30436db;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb index 326e25ef..c57b252f 100644 --- a/lib/rbot/irc.rb +++ b/lib/rbot/irc.rb @@ -1525,7 +1525,6 @@ module Irc class Server attr_reader :hostname, :version, :usermodes, :chanmodes - alias :to_s :hostname attr_reader :supports, :capabilities attr_reader :channels, :users @@ -1556,6 +1555,10 @@ module Irc str << ">" end + def to_s + hostname.nil? ? "" : hostname + end + # Create a new Server, with all instance variables reset to nil (for # scalar variables), empty channel and user lists and @supports # initialized to the default values for all known supported features.