# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1273616341 -3600
# Node ID 8154b72591d50d30baa8b67c8b0185bc119a7bb5
# Parent  cd66229bdd7fa2827d8980a414e32cf23fc186f7
verse.plugins.tls: self -> stream

diff -r cd66229bdd7f -r 8154b72591d5 plugins/tls.lua
--- a/plugins/tls.lua	Tue May 11 23:18:11 2010 +0100
+++ b/plugins/tls.lua	Tue May 11 23:19:01 2010 +0100
@@ -8,9 +8,9 @@
 			stream:debug("Negotiating TLS...");
 			stream:send(st.stanza("starttls", { xmlns = xmlns_tls }));
 			return true;
-		elseif not stream.conn.starttls and not self.secure then
+		elseif not stream.conn.starttls and not stream.secure then
 			stream:warn("SSL libary (LuaSec) not loaded, so TLS not available");
-		elseif not self.secure then
+		elseif not stream.secure then
 			stream:debug("Server doesn't offer TLS :(");
 		end
 	end
@@ -22,7 +22,7 @@
 	end
 	local function handle_status(new_status)
 		if new_status == "ssl-handshake-complete" then
-			self.secure = true;
+			stream.secure = true;
 			stream:debug("Re-opening stream...");
 			stream:reopen();
 		end