Comparison

plugins/mod_version.lua @ 9434:b502766a10d7

mod_version: Make 'origin' variable local for consistency Many event handlers start with local origin, stanza = event.origin, event.stanza;
author Kim Alvefur <zash@zash.se>
date Sat, 06 Oct 2018 16:29:42 +0200
parent 9433:13b8d47119ad
child 9435:33301038d3e4
comparison
equal deleted inserted replaced
9433:13b8d47119ad 9434:b502766a10d7
38 query:text_tag("os", version); 38 query:text_tag("os", version);
39 end 39 end
40 end 40 end
41 41
42 module:hook("iq-get/host/jabber:iq:version:query", function(event) 42 module:hook("iq-get/host/jabber:iq:version:query", function(event)
43 local stanza = event.stanza; 43 local origin, stanza = event.origin, event.stanza;
44 event.origin.send(st.reply(stanza):add_child(query)); 44 origin.send(st.reply(stanza):add_child(query));
45 return true; 45 return true;
46 end); 46 end);