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) |