examples/mcabberrc.lua
changeset 106 c60fe499f075
parent 99 ed4676536ed9
child 121 75a7d595817c
equal deleted inserted replaced
105:bc3201298e52 106:c60fe499f075
   133 		main.run ( 'say_to -f ' .. args .. ' .' )
   133 		main.run ( 'say_to -f ' .. args .. ' .' )
   134 	end, false, 'filename' )
   134 	end, false, 'filename' )
   135 main.command ( 'cmd',
   135 main.command ( 'cmd',
   136 	function ( args )
   136 	function ( args )
   137 		local to = main.current_buddy ()
   137 		local to = main.current_buddy ()
   138 		main.run ( ('send_to -q %q $ %s'):format ( to, args ) )
   138 		main.run ( ('say_to -q %q $ %s'):format ( to, args ) )
   139 		main.bgread ( args,
   139 		main.bgread ( args,
   140 			function ( data )
   140 			function ( data )
   141 				if data then
   141 				if data then
   142 					main.run ( ('send_to -q %q %s'):format ( to, data ) )
   142 					main.run ( ('say_to -q %q %s'):format ( to, data ) )
   143 					return true
   143 					return true
   144 				else
   144 				else
   145 					return false
   145 					return false
   146 				end
   146 				end
   147 			end )
   147 			end )