mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Tidy execute alias code
This commit is contained in:
parent
88739d5c59
commit
1c47b57e19
@ -137,18 +137,18 @@ cmd_execute_alias(const char * const inp, gboolean *ran)
|
||||
if (inp[0] != '/') {
|
||||
ran = FALSE;
|
||||
return TRUE;
|
||||
} else {
|
||||
char *alias = strdup(inp+1);
|
||||
char *value = prefs_get_alias(alias);
|
||||
free(alias);
|
||||
if (value != NULL) {
|
||||
*ran = TRUE;
|
||||
return cmd_process_input(value);
|
||||
} else {
|
||||
*ran = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
char *alias = strdup(inp+1);
|
||||
char *value = prefs_get_alias(alias);
|
||||
free(alias);
|
||||
if (value) {
|
||||
*ran = TRUE;
|
||||
return cmd_process_input(value);
|
||||
}
|
||||
|
||||
*ran = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user