From ea11a636b533e49af0fcb7d77f783dd16ac8a656 Mon Sep 17 00:00:00 2001 From: Ross Paffett Date: Wed, 1 Feb 2012 20:31:21 -0500 Subject: [PATCH] Include originating server name as first parameter in PONG responses, as per RFC 2812 --- lib/hector/commands/ping.rb | 2 +- test/integration/connection_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hector/commands/ping.rb b/lib/hector/commands/ping.rb index ccd5529..bbc5d52 100644 --- a/lib/hector/commands/ping.rb +++ b/lib/hector/commands/ping.rb @@ -2,7 +2,7 @@ module Hector module Commands module Ping def on_ping - respond_with(:pong, :source => Hector.server_name, :text => request.text) + respond_with(:pong, Hector.server_name, :source => Hector.server_name, :text => request.text) end end end diff --git a/test/integration/connection_test.rb b/test/integration/connection_test.rb index a8b69da..abaea71 100644 --- a/test/integration/connection_test.rb +++ b/test/integration/connection_test.rb @@ -132,7 +132,7 @@ class ConnectionTest < IntegrationTest test :"sending the ping command should respond with a pong" do authenticated_connection.tap do |c| c.receive_line "PING 12345" - assert_sent_to c, ":hector.irc PONG :12345" + assert_sent_to c, ":hector.irc PONG hector.irc :12345" end end