examples/xep0077.lua
changeset 9 c2517f8bf647
parent 8 fc9060b9b7cc
child 10 73f4c12b6ffb
equal deleted inserted replaced
8:fc9060b9b7cc 9:c2517f8bf647
   149 			who = args
   149 			who = args
   150 		else
   150 		else
   151 			who = full_current_jid ()
   151 			who = full_current_jid ()
   152 		end
   152 		end
   153 		register_to ( who )
   153 		register_to ( who )
   154 	end, 0x2 )
   154 	end, 'jid' )
   155 
   155 
   156 main.command ( 'cancel',
   156 main.command ( 'cancel',
   157 	function ( args )
   157 	function ( args )
   158 		local who
   158 		local who
   159 		if args and args ~= '' then
   159 		if args and args ~= '' then
   160 			who = args
   160 			who = args
   161 		else
   161 		else
   162 			who = full_current_jid ()
   162 			who = full_current_jid ()
   163 		end
   163 		end
   164 		unregister_from ( who )
   164 		unregister_from ( who )
   165 	end, 0x2 )
   165 	end, 'jid' )
   166 
   166 
   167 commands_help['register'] = "[jid]\n\nSends registration request to jid (or current buddy). You, probably, then will need to fill and send some form."
   167 commands_help['register'] = "[jid]\n\nSends registration request to jid (or current buddy). You, probably, then will need to fill and send some form."
   168 commands_help['cancel'] = "[jid]\n\nSends registration cancellation request to jid (or current buddy). May require a form filling."
   168 commands_help['cancel'] = "[jid]\n\nSends registration cancellation request to jid (or current buddy). May require a form filling."
   169 
   169 
   170 -- vim: se ts=4: --
   170 -- vim: se ts=4: --