51 module:fire_event("iq/bare/"..stanza.attr.id, data); |
51 module:fire_event("iq/bare/"..stanza.attr.id, data); |
52 return true; |
52 return true; |
53 end |
53 end |
54 end); |
54 end); |
55 |
55 |
|
56 module:hook("iq/self", function(data) |
|
57 -- IQ to bare JID recieved |
|
58 local origin, stanza = data.origin, data.stanza; |
|
59 |
|
60 if stanza.attr.type == "get" or stanza.attr.type == "set" then |
|
61 return module:fire_event("iq/self/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data); |
|
62 else |
|
63 module:fire_event("iq/self/"..stanza.attr.id, data); |
|
64 return true; |
|
65 end |
|
66 end); |
|
67 |
56 module:hook("iq/host", function(data) |
68 module:hook("iq/host", function(data) |
57 -- IQ to a local host recieved |
69 -- IQ to a local host recieved |
58 local origin, stanza = data.origin, data.stanza; |
70 local origin, stanza = data.origin, data.stanza; |
59 |
71 |
60 if stanza.attr.type == "get" or stanza.attr.type == "set" then |
72 if stanza.attr.type == "get" or stanza.attr.type == "set" then |