Automatic command completion and a few other fixes.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@387 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-06-28 17:15:37 +00:00 committed by cras
commit 7e531cec7a
11 changed files with 195 additions and 119 deletions

View file

@ -90,16 +90,8 @@ CODE:
char *signal;
GSList *tmp;
/* Don't add the command twice */
if (*category == '\0') category = "Perl scripts' commands";
for (tmp = commands; tmp != NULL; tmp = tmp->next) {
COMMAND_REC *rec = tmp->data;
if (g_strcasecmp(rec->cmd, cmd) == 0 &&
g_strcasecmp(rec->category, category) == 0)
break;
}
if (tmp == NULL) command_bind(cmd, category, NULL);
command_bind(cmd, category, NULL);
signal = g_strconcat("command ", cmd, NULL);
perl_signal_add(signal, func);
g_free(signal);