Skip to content
Snippets Groups Projects
Commit 91e57d4c authored by Renne Nissinen's avatar Renne Nissinen
Browse files

Guard against sending more than one IRC command at a time

parent 9edfbe2e
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ module Cinch
def process_one
queue = @queues_to_process.pop
message = queue.pop.to_s.chomp
message = queue.pop.to_s.each_line.first.chomp
if queue.empty?
@mutex.synchronize do
......
......@@ -43,5 +43,10 @@ class WireTest < TestCase
assert_equal "PRIVMSG cinch :\001ACTION evil\001\r\n", sent
end
test "should not be able to send more than one IRC command at a time" do
@bot.irc.send("first\r\nsecond")
assert_equal "first\r\n", sent
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment