Software /
code /
verse
Changeset
267:d30897e4f5c2
plugins.disco: Add set_ and add_identity()
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 16 Dec 2011 22:01:29 +0100 |
parents | 266:ad8a918fa6e6 |
children | 268:06e6c6de6438 |
files | plugins/disco.lua |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
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;