summaryrefslogtreecommitdiff
path: root/lib/rbot/irc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/irc.rb')
-rw-r--r--lib/rbot/irc.rb5
1 files changed, 4 insertions, 1 deletions
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? ? "<no hostname>" : 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.