1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

ox: implement /ox end

We also need to be able to stop an ox conversation :-)
This commit is contained in:
Michael Vetter 2022-05-03 18:54:20 +02:00
parent c8daee8c88
commit e5998fb63e

View File

@ -7671,6 +7671,18 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args)
chatwin->is_ox = TRUE;
win_println(window, THEME_DEFAULT, "!", "OX encryption enabled.");
return TRUE;
} else if (g_strcmp0(args[0], "end") == 0) {
if (window->type != WIN_CHAT && args[1] == NULL) {
cons_show("You must be in a regular chat window to stop OX encrpytion.");
return TRUE;
}
ProfChatWin* chatwin = (ProfChatWin*)window;
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
chatwin->is_ox = FALSE;
win_println(window, THEME_DEFAULT, "!", "OX encryption disabled.");
return TRUE;
} else if (g_strcmp0(args[0], "announce") == 0) {
if (args[1]) {
gchar* filename = get_expanded_path(args[1]);