Software /
code /
verse
Comparison
plugins/disco.lua @ 267:d30897e4f5c2
plugins.disco: Add set_ and add_identity()
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 16 Dec 2011 22:01:29 +0100 |
parent | 266:ad8a918fa6e6 |
child | 380:0891b4e27766 |
comparison
equal
deleted
inserted
replaced
266:ad8a918fa6e6 | 267:d30897e4f5c2 |
---|---|
117 ver = hash | 117 ver = hash |
118 }) | 118 }) |
119 end | 119 end |
120 }) | 120 }) |
121 | 121 |
122 function stream:set_identity(identity, node) | |
123 self.disco.info[node or false].identities = { identity }; | |
124 stream:resend_presence(); | |
125 end | |
126 | |
127 function stream:add_identity(identity, node) | |
128 local identities = self.disco.info[node or false].identities; | |
129 identities[#identities + 1] = identity; | |
130 stream:resend_presence(); | |
131 end | |
132 | |
122 function stream:add_disco_feature(feature, node) | 133 function stream:add_disco_feature(feature, node) |
123 local feature = feature.var or feature; | 134 local feature = feature.var or feature; |
124 self.disco.info[node or false].features[feature] = true; | 135 self.disco.info[node or false].features[feature] = true; |
125 stream:resend_presence(); | 136 stream:resend_presence(); |
126 end | 137 end |