# HG changeset patch # User Matthew Wild # Date 1331999665 0 # Node ID 55a9d3c2f73b86bc4e880099c095fa5339f007c4 # Parent c1f3958695ea27070122a1ba0f270f6c2436ce42 mod_smacks: Import connlisteners properly diff -r c1f3958695ea -r 55a9d3c2f73b mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Sat Mar 17 15:53:45 2012 +0000 +++ b/mod_smacks/mod_smacks.lua Sat Mar 17 15:54:25 2012 +0000 @@ -8,6 +8,7 @@ local add_filter = require "util.filters".add_filter; local timer = require "util.timer"; local datetime = require "util.datetime"; +local connlisteners = require "net.connlisteners"; local xmlns_sm = "urn:xmpp:sm:2"; local xmlns_errors = "urn:ietf:params:xml:ns:xmpp-stanzas"; @@ -255,7 +256,7 @@ if original_session.conn then session.log("debug", "mod_smacks closing an old connection for this session"); local conn = original_session.conn; - require "net.connlisteners".get("xmppclient").associate_session(conn, nil); + connlisteners.get("xmppclient").associate_session(conn, nil); conn:close(); end original_session.ip = session.ip; @@ -280,7 +281,7 @@ -- Inform xmppstream of the new session (passed to its callbacks) stream:set_session(original_session); -- Similar for connlisteners - require "net.connlisteners".get("xmppclient").associate_session(session.conn, original_session); + connlisteners.get("xmppclient").associate_session(session.conn, original_session); session.send(st.stanza("resumed", { xmlns = xmlns_sm, h = original_session.handled_stanza_count, previd = id }));