Don't allow /alias to overwrite standard command
This commit is contained in:
@@ -132,6 +132,21 @@ autocomplete_get_list(Autocomplete ac)
|
||||
return copy;
|
||||
}
|
||||
|
||||
gboolean
|
||||
autocomplete_contains(Autocomplete ac, char *value)
|
||||
{
|
||||
GSList *curr = ac->items;
|
||||
|
||||
while(curr) {
|
||||
if (strcmp(curr->data, value) == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
curr = g_slist_next(curr);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gchar *
|
||||
autocomplete_complete(Autocomplete ac, gchar *search_str)
|
||||
{
|
||||
|
||||
@@ -56,4 +56,6 @@ char * autocomplete_param_no_with_func(char *input, int *size, char *command,
|
||||
int arg_number, autocomplete_func func);
|
||||
|
||||
void autocomplete_reset(Autocomplete ac);
|
||||
|
||||
gboolean autocomplete_contains(Autocomplete ac, char *value);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user