Mercurial > ~mikael > mcabber > hg
diff mcabber/src/events.c @ 820:80bd7f49075f
Allow '*' in /event command
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 22 Apr 2006 22:41:06 +0200 |
parents | 46304b773a44 |
children | 2de8f8ba1f34 |
line wrap: on
line diff
--- a/mcabber/src/events.c Sat Apr 22 10:50:54 2006 +0200 +++ b/mcabber/src/events.c Sat Apr 22 22:41:06 2006 +0200 @@ -149,10 +149,11 @@ scr_LogPrint(LPRINT_LOGNORM, "End of events list."); } -// evs_geteventscomplist() +// evs_geteventslist(bool comp) // Return a singly-linked-list of events ids, for the completion system. +// If comp is true, the string "list" is added (it's a completion argument). // Note: the caller should free the list (and data) after use. -GSList *evs_geteventscomplist(void) +GSList *evs_geteventslist(int compl) { GSList *evidlist = NULL, *p; eviqs *i; @@ -162,8 +163,10 @@ evidlist = g_slist_append(evidlist, g_strdup(i->id)); } - // Last item is the "list" subcommand. - evidlist = g_slist_append(evidlist, g_strdup("list")); + if (compl) { + // Last item is the "list" subcommand. + evidlist = g_slist_append(evidlist, g_strdup("list")); + } return evidlist; }