1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Prevent the user from calling "/capsicum enter" twice.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
This commit is contained in:
Edward Tomasz Napierala 2017-07-28 18:10:45 +01:00
parent 509eca76f0
commit 1f57ceec4c

View File

@ -252,8 +252,15 @@ static void cmd_capsicum(const char *data, SERVER_REC *server, void *item)
static void cmd_capsicum_enter(void)
{
u_int mode;
int error;
error = cap_getmode(&mode);
if (error == 0 && mode != 0) {
g_warning("Already in capability mode");
return;
}
error = start_symbiont();
if (error != 0) {
signal_emit("capability mode failed", 1, strerror(errno));