Software /
code /
verse
Diff
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 |
line wrap: on
line diff
--- a/plugins/disco.lua Fri Dec 16 22:00:41 2011 +0100 +++ b/plugins/disco.lua Fri Dec 16 22:01:29 2011 +0100 @@ -119,6 +119,17 @@ end }) + function stream:set_identity(identity, node) + self.disco.info[node or false].identities = { identity }; + stream:resend_presence(); + end + + function stream:add_identity(identity, node) + local identities = self.disco.info[node or false].identities; + identities[#identities + 1] = identity; + stream:resend_presence(); + end + function stream:add_disco_feature(feature, node) local feature = feature.var or feature; self.disco.info[node or false].features[feature] = true;