Changeset

62:f455dad33efd

clix.roster: Use rest of line as last parameter for nick and group sub-commands.
author Kim Alvefur <zash@zash.se>
date Mon, 04 Jul 2011 10:43:43 +0200
parents 61:7d62bff46601
children 63:bbbef9f4a798
files clix/roster.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/clix/roster.lua	Tue May 17 20:50:46 2011 +0200
+++ b/clix/roster.lua	Mon Jul 04 10:43:43 2011 +0200
@@ -38,20 +38,20 @@
 			unauth = function(param) conn:send(verse.presence{to=param, type="unsubscribed"}); end;
 			del = function(param) conn.roster:delete_contact(param) end;
 			setnick = function(param)
-				local jid, nick = param:match("^(%S+)%s+(%S+)");
+				local jid, nick = param:match("^(%S+)%s+(.+)");
 				local item = conn.roster.items[jid];
 				if not item then print("no jid "..jid); return; end
 				conn.roster:add_contact(jid, nick, item.groups or {}, printor("saved"));
 			end;
 			addgroup = function(param)
-				local jid, group = param:match("^(%S+)%s+(%S+)");
+				local jid, group = param:match("^(%S+)%s+(.+)");
 				local item = conn.roster.items[jid];
 				local groups = item.groups or {};
 				table.insert(groups, group);
 				conn.roster:add_contact(jid, item.name, groups, printor("saved"));
 			end;
 			delgroup = function(param)
-				local jid, group = param:match("^(%S+)%s+(%S+)");
+				local jid, group = param:match("^(%S+)%s+(.+)");
 				local item = conn.roster.items[jid];
 				local groups = item.groups;
 				if not groups then return end;