util.muc: Made internal methods local

Sat, 16 May 2009 03:55:53 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sat, 16 May 2009 03:55:53 +0500
changeset 1170
4845372a2c03
parent 1169
fdc68aec1d49
child 1171
be11dc0610d5

util.muc: Made internal methods local

util/muc.lua file | annotate | diff | comparison | revisions
--- a/util/muc.lua	Sat May 16 02:19:16 2009 +0500
+++ b/util/muc.lua	Sat May 16 03:55:53 2009 +0500
@@ -118,7 +118,7 @@
 		end
 	end
 end
-function room_broadcast_message(room, stanza, historic)
+local function room_broadcast_message(room, stanza, historic)
 	for occupant, o_data in pairs(room._participants) do
 		for jid in pairs(o_data.sessions) do
 			stanza.attr.to = jid;
@@ -149,7 +149,7 @@
 		end
 	end
 end
-function send_history(room, to)
+local function room_send_history(room, to)
 	local history = room._data['history']; -- send discussion history
 	if history then
 		for _, msg in ipairs(history) do
@@ -356,7 +356,7 @@
 		jid = jid;
 		handle_stanza = room_handle_stanza;
 		set_subject = room_set_subject;
-		route_stanza = function(room, stanza) end -- Replace with a routing function, e.g., function(room, stanza) core_route_stanza(origin, stanza); end
+		route_stanza = function(room, stanza) end; -- Replace with a routing function, e.g., function(room, stanza) core_route_stanza(origin, stanza); end
 		_jid_nick = {};
 		_participants = {};
 		_data = {};

mercurial