Irssi core bugs

Notice: Undefined index: tasklist_type in /var/www/bugs.irssi.org/includes/class.tpl.php(128) : eval()'d code on line 85 Notice: Undefined index: tasklist_type in /var/www/bugs.irssi.org/includes/class.tpl.php(128) : eval()'d code on line 90
  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category core
  • Assigned To No-one
  • Operating System Linux
  • Severity Low
  • Priority Normal
  • Reported Version irssi 0.8.16-rc1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 0
  • Private No
Attached to Project: Irssi core bugs
Opened by Fabian Kurz (dj1yfk) - 2013-09-19

FS#902 - Empty lines in output of "exec" command cause "Not enough parameters given" errors

If a command is run by the exec function with output to the channel (i. e. /exec -o), empty lines in the process output will cause an error ("Not enough parameters given") because the "command msg" signal expects three parameters but only receives two.

In normal chat mode, an empty line is caught and ignored in the function "event_text":

irssi-0.8.16-rc1/src/fe-common/core/chat-completion.c (1065ff)
if (*data == '\0') {
/* empty line, forget it. */
signal_stop();
return;
}

For exec, there's no test for the length of the string (function sig_exec_input).
In some cases (no -o option used) empty lines are OK, but when the output is sent to the channel, it will fail.

It is not completely obvious to me what the correct behaviour should be.
Possible options:

- Ignore empty lines (like above, but it would have to be done within if (rec->target != NULL) { } to make sure it doesn't remove blank lines from local output).
- Send a line with just a space character instead of the empty line.

The latter would probably give the "expected" behaviour (at least visually).

Diff of proposed patch attached.

This task does not depend on any other tasks.

Loading...