Software / code / clix
Comparison
clix/send.lua @ 27:5b58c002d6ad
clix.*: Add --short-help and make sure they are working correctly
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 12 Jan 2010 02:17:38 +0000 |
| parent | 21:cdeb02d9546d |
| child | 36:0712fda16ab6 |
comparison
equal
deleted
inserted
replaced
| 26:028c5ffc6d7c | 27:5b58c002d6ad |
|---|---|
| 1 short_opts.i = "interactive"; | 1 short_opts.i = "interactive"; |
| 2 short_opts.e = "echo"; | 2 short_opts.e = "echo"; |
| 3 | 3 |
| 4 return function (opts, arg) | 4 return function (opts, arg) |
| 5 if opts.short_help then | |
| 6 print("Send messages"); | |
| 7 return; | |
| 8 end | |
| 5 if (#arg == 0 or opts.help) and not opts.interactive then | 9 if (#arg == 0 or opts.help) and not opts.interactive then |
| 6 return 0; | 10 return 0; |
| 7 end | 11 end |
| 8 local function on_connect(conn) | 12 local function on_connect(conn) |
| 9 local function send_message(text) | 13 local function send_message(text) |