mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Refactor cmd_urlopen
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
64eb11fbaf
commit
96c877de80
@ -8939,9 +8939,12 @@ cmd_slashguard(ProfWin *window, const char *const command, gchar **args)
|
|||||||
gboolean
|
gboolean
|
||||||
cmd_urlopen(ProfWin *window, const char *const command, gchar **args)
|
cmd_urlopen(ProfWin *window, const char *const command, gchar **args)
|
||||||
{
|
{
|
||||||
if (window->type == WIN_CHAT ||
|
if (window->type != WIN_CHAT &&
|
||||||
window->type == WIN_MUC ||
|
window->type != WIN_MUC &&
|
||||||
window->type == WIN_PRIVATE) {
|
window->type != WIN_PRIVATE) {
|
||||||
|
cons_show("urlopen not supported in this window");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (args[0] == NULL) {
|
if (args[0] == NULL) {
|
||||||
cons_bad_cmd_usage(command);
|
cons_bad_cmd_usage(command);
|
||||||
@ -8956,9 +8959,6 @@ cmd_urlopen(ProfWin *window, const char *const command, gchar **args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_free(cmd);
|
g_free(cmd);
|
||||||
} else {
|
|
||||||
cons_show("urlopen not supported in this window");
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user