equal
deleted
inserted
replaced
19 }, |
19 }, |
20 }, |
20 }, |
21 function ( conn, mess ) |
21 function ( conn, mess ) |
22 if mess:child ( 'command' ) and mess:child( 'command' ):attribute ( 'status' ) == 'completed' then |
22 if mess:child ( 'command' ) and mess:child( 'command' ):attribute ( 'status' ) == 'completed' then |
23 main.print_info ( who, 'Now you can run /form del ' .. id .. ' to delete form from list' ) |
23 main.print_info ( who, 'Now you can run /form del ' .. id .. ' to delete form from list' ) |
24 forms[id].status = 'acquired' |
24 forms.status = 'acquired' |
25 else |
25 else |
26 main.print_info ( who, 'Got non-successful response to form:\n' .. mess:xml () ) |
26 main.print_info ( who, 'Got non-successful response to form:\n' .. mess:xml () ) |
27 forms[id].status = 'rejected' |
27 forms.status = 'rejected' |
28 end |
28 end |
29 return true |
29 return true |
30 end ) |
30 end ) |
|
31 form.status = 'sent' |
31 end |
32 end |
32 forms[id].status = 'filling' |
33 forms[id].status = 'filling' |
33 main.print_info ( who, 'You have new form. To fill it, use /form ' .. id .. ' fieldname value' ) |
34 main.print_info ( who, 'You have new form. To fill it, use /form ' .. id .. ' fieldname value' ) |
34 else |
35 else |
35 main.print_info ( who, 'Got response to command request:\n' .. mess:xml () ) |
36 main.print_info ( who, 'Got response to command request:\n' .. mess:xml () ) |