Merge with tip.

Tue, 01 Dec 2009 23:05:32 +0100

author
Tobias Markmann <tm@ayena.de>
date
Tue, 01 Dec 2009 23:05:32 +0100
changeset 2295
0d954d52062f
parent 2291
abd28ed5d8b0 (current diff)
parent 2273
b98b29f614ae (diff)
child 2296
23e84604fb00

Merge with tip.

--- a/core/modulemanager.lua	Tue Dec 01 21:17:13 2009 +0100
+++ b/core/modulemanager.lua	Tue Dec 01 23:05:32 2009 +0100
@@ -158,6 +158,7 @@
 		log("error", "Error initializing module '%s' on '%s': %s", module_name, host, err or "nil");
 	end
 	if success then
+		hosts[host].events.fire_event("module-loaded", { module = module_name, host = host });
 		return true;
 	else -- load failed, unloading
 		unload(api_instance.host, module_name);
@@ -200,6 +201,7 @@
 	end
 	hooks:remove(host, name);
 	modulemap[host][name] = nil;
+	hosts[host].events.fire_event("module-unloaded", { module = name, host = host });
 	return true;
 end
 
--- a/plugins/mod_proxy65.lua	Tue Dec 01 21:17:13 2009 +0100
+++ b/plugins/mod_proxy65.lua	Tue Dec 01 23:05:32 2009 +0100
@@ -67,7 +67,7 @@
 			data:sub(4):byte() == 0x03 and -- ATYP must be 3
 			data:sub(5):byte() == 40 and -- SHA1 HASH length must be 40 (0x28)
 			data:sub(-2):byte() == 0x00 and -- PORT must be 0, size 2 byte
-			data:sub(-1):byte() == 0x00 		
+			data:sub(-1):byte() == 0x00
 		then
 			local sha = data:sub(6, 45); -- second param is not count! it's the ending index (included!)
 			if transfers[sha] == nil then
@@ -83,7 +83,7 @@
 			end
 			conn:write(string.char(5, 0, 0, 3, sha:len()) .. sha .. string.char(0, 0)); -- VER, REP, RSV, ATYP, BND.ADDR (sha), BND.PORT (2 Byte)
 		else
-			log:module("warn", "Neither data transfer nor initial connect of a participator of a transfer.")
+			module:log("warn", "Neither data transfer nor initial connect of a participator of a transfer.")
 			conn.close();
 		end
 	else

mercurial