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:
parent
509eca76f0
commit
1f57ceec4c
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user