Commit 4fd56700 authored by intrigeri's avatar intrigeri
Browse files

Merge remote-tracking branch 'origin/test/10219-escape-nick-for-ctcp-responses' into stable

Fix-committed: #10219
parents 1e7c0d42 87822647
......@@ -46,6 +46,7 @@ class CtcpChecker < Net::IRC::Client
ctcp_cmds_not_sent = @ctcp_cmds - @sent_ctcp_cmds.to_a
expected_ctcp_replies_not_received =
@expected_ctcp_replies.keys - @received_ctcp_replies.to_a
if !ctcp_cmds_not_sent.empty? || !expected_ctcp_replies_not_received.empty?
raise "Failed to spam all CTCP commands and receive the expected " +
"replies within #{timeout} seconds.\n" +
......@@ -101,7 +102,7 @@ class CtcpChecker < Net::IRC::Client
return
end
if m.ctcp? and /^:#{@spam_target}!/.match(m)
if m.ctcp? and /^:#{Regexp.escape(@spam_target)}!/.match(m)
m.ctcps.each do |ctcp_reply|
reply_type, _, reply_data = ctcp_reply.partition(" ")
if @expected_ctcp_replies.has_key?(reply_type)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment