mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 08:16:20 +00:00
Setting: only write in console upon muc mention
`/console muc mention` additionally to `first|none|all`. Fix https://github.com/profanity-im/profanity/issues/1371
This commit is contained in:
@@ -5153,15 +5153,19 @@ cmd_beep(ProfWin* window, const char* const command, gchar** args)
|
||||
gboolean
|
||||
cmd_console(ProfWin* window, const char* const command, gchar** args)
|
||||
{
|
||||
if ((g_strcmp0(args[0], "chat") != 0) && (g_strcmp0(args[0], "muc") != 0) && (g_strcmp0(args[0], "private") != 0)) {
|
||||
gboolean isMuc = (g_strcmp0(args[0], "muc") == 0) ;
|
||||
|
||||
if ((g_strcmp0(args[0], "chat") != 0) && !isMuc && (g_strcmp0(args[0], "private") != 0)) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
char* setting = args[1];
|
||||
gchar* setting = args[1];
|
||||
if ((g_strcmp0(setting, "all") != 0) && (g_strcmp0(setting, "first") != 0) && (g_strcmp0(setting, "none") != 0)) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
if ( !(isMuc && (g_strcmp0(setting, "mention") == 0))) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "chat") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user