Tuesday, March 20, 2018
grimoire@muc.metronome.im
March
Mon Tue Wed Thu Fri Sat Sun
      1 2 3 4
5
6 7 8
9
10 11
12
13
14
15
16
17 18
19
20
21
22 23 24 25
26
27
28
29 30 31  
             
Metronome IM "cook" book room | Support and Dev talk about the Metronome XMPP server.

Latest stable version build is: 4.0.3

For more information you can visit: https://metronome.im

Room logs can be found here: https://muc.metronome.im/logs/grimoire/

* Links *
<==========================================================>
- Building & Installation:
https://metronome.im/building
- Documentation:
https://metronome.im/documentation
- Issues Tracker:
https://github.com/maranda/metronome/issues
<==========================================================>

[18:07:28] <Maranda> local rooms = hosts[module.host].muc.rooms;
local bare, fire_event, st = require "util.jid".bare, require "util.events".fire_event, require "util.stanza";

module:hook("presence/bare", function(event)
local stanza = event.stanza;
if not stanza.attr.type then
local room = rooms[bare(stanza.attr.to)];
if not room then return; end

local x = stanza:get_child("x", "http://jabber.org/protocol/muc");
local nick = room._jid_nick[stanza.attr.from];

if not current_nick and not x then
module:log("info", "GC1 Join: %s", stanza:top_tag());
fire_event(
"route/post", hosts[module.host],
st.iq({ from = module.host, to = stanza.attr.from, id = "mucver" })
:tag("query", { xmlns = "jabber:iq:version" });
);
end
end
end);

module:hook("iq-result/host/jabber:iq:version:query", function(event)
local stanza = event.stanza;
local version = stanza.tag[1];
local name, version = version:child_with_name("name"), version:child_with_name("version");
module:log("info", "%s client is %s version %s", stanza.attr.from, tostring(name), tostring(version));
return true;
end);
[18:14:09] <Maranda> woops typo
[18:14:12] <Maranda> local rooms = hosts[module.host].muc.rooms;
local bare, fire_event, st = require "util.jid".bare, require "util.events".fire_event, require "util.stanza";

module:hook("presence/bare", function(event)
local stanza = event.stanza;
if not stanza.attr.type then
local room = rooms[bare(stanza.attr.to)];
if not room then return; end

local x = stanza:get_child("x", "http://jabber.org/protocol/muc");
local nick = room._jid_nick[stanza.attr.from];

if not nick and not x then
module:log("info", "GC1 Join: %s", stanza:top_tag());
fire_event(
"route/post", hosts[module.host],
st.iq({ from = module.host, to = stanza.attr.from, id = "mucver" })
:tag("query", { xmlns = "jabber:iq:version" });
);
end
end
end);

module:hook("iq-result/host/jabber:iq:version:query", function(event)
local stanza = event.stanza;
local version = stanza.tag[1];
local name, version = version:child_with_name("name"), version:child_with_name("version");
module:log("info", "%s client is %s version %s", stanza.attr.from, tostring(name), tostring(version));
return true;
end);
[18:18:21] <Maranda> local bare, fire_event, st = require "util.jid".bare, require "util.events".fire_event, require "util.stanza";

module:hook("presence/bare", function(event)
local stanza = event.stanza;
if not stanza.attr.type then
local room = rooms[bare(stanza.attr.to)];
if not room then return; end

local x = stanza:get_child("x", "http://jabber.org/protocol/muc");
local nick = room._jid_nick[stanza.attr.from];

if not nick and not x then
module:log("info", "GC1 Join: %s", stanza:top_tag());
fire_event(
"route/post", hosts[module.host],
st.iq({ from = module.host, to = stanza.attr.from, id = "mucver" })
:tag("query", { xmlns = "jabber:iq:version" })
);
end
end
end);

module:hook("iq-result/host/jabber:iq:version:query", function(event)
local stanza = event.stanza;
local version = stanza.tag[1];
local name, version = version:child_with_name("name"), version:child_with_name("version");
module:log("info", "%s client is %s version %s", stanza.attr.from, tostring(name), tostring(version));
return true;
end);
[18:18:34] <Maranda> and another
[18:18:36] <Maranda> local rooms = hosts[module.host].muc.rooms;
local bare, fire_event, st = require "util.jid".bare, require "util.events".fire_event, require "util.stanza";

module:hook("presence/bare", function(event)
local stanza = event.stanza;
if not stanza.attr.type then
local room = rooms[bare(stanza.attr.to)];
if not room then return; end

local x = stanza:get_child("x", "http://jabber.org/protocol/muc");
local nick = room._jid_nick[stanza.attr.from];

if not nick and not x then
module:log("info", "GC1 Join: %s", stanza:top_tag());
fire_event(
"route/post", hosts[module.host],
st.iq({ from = module.host, to = stanza.attr.from, id = "mucver" })
:tag("query", { xmlns = "jabber:iq:version" })
);
end
end
end);

module:hook("iq-result/host/jabber:iq:version:query", function(event)
local stanza = event.stanza;
local version = stanza.tag[1];
local name, version = version:child_with_name("name"), version:child_with_name("version");
module:log("info", "%s client is %s version %s", stanza.attr.from, tostring(name), tostring(version));
return true;
end);
[18:18:44] <Maranda> ah well :P
[20:20:03] <Maranda> @version stuff.cash
[20:20:04] <Echo1> Maranda: stuff.cash is running ejabberd version 15.07 on unix/freebsd 10.3.0
[20:22:22] <Maranda> @compute list_entries(_G)
[20:22:22] <Echo1> Maranda: pidgin c_to_f HAL rolldice bridge Arcainite roll factorial jackattack count_objects romulan Lua Risa pong trekradio ding yellow borg JackAttack kestra covariance mrolldice bork Max850 xrolldice LUA risa Max f_to_c adium green Lilith gtalk Kestra towback sausage kgs_to_lbs max850 overload press Ang trFacebook red assimilate Bazag Timelord prototype inject hypnokittysleeps waqas list_entries ugt finger trTwitter perc_of help smalltables max Deyvid dong klingon about smalltable lua timelord Voxeyn lbs_to_kgs hypnokitty xmpp bcoefficent mcoefficent bonniekin hick void social lojban Hick