mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-08-04 15:26:21 +00:00
Refactor cmd_urlopen
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
committed by
Michael Vetter
parent
64eb11fbaf
commit
96c877de80
@@ -8939,9 +8939,12 @@ cmd_slashguard(ProfWin *window, const char *const command, gchar **args)
|
||||
gboolean
|
||||
cmd_urlopen(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
if (window->type == WIN_CHAT ||
|
||||
window->type == WIN_MUC ||
|
||||
window->type == WIN_PRIVATE) {
|
||||
if (window->type != WIN_CHAT &&
|
||||
window->type != WIN_MUC &&
|
||||
window->type != WIN_PRIVATE) {
|
||||
cons_show("urlopen not supported in this window");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (args[0] == NULL) {
|
||||
cons_bad_cmd_usage(command);
|
||||
@@ -8956,9 +8959,6 @@ cmd_urlopen(ProfWin *window, const char *const command, gchar **args)
|
||||
}
|
||||
|
||||
g_free(cmd);
|
||||
} else {
|
||||
cons_show("urlopen not supported in this window");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user