From e9cf291a52097d5b9428b8d1650cc691d5cc5dc8 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 14 Mar 2010 16:42:22 +0000 Subject: Allow the identify command only once. (Bug #509) --- root_commands.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index c79ff325..b3432b9b 100644 --- a/root_commands.c +++ b/root_commands.c @@ -143,6 +143,12 @@ static void cmd_identify( irc_t *irc, char **cmd ) storage_status_t status = storage_load( irc, cmd[1] ); char *account_on[] = { "account", "on", NULL }; + if( strchr( irc->umode, 'R' ) != NULL ) + { + irc_usermsg( irc, "You're already logged in." ); + return; + } + switch (status) { case STORAGE_INVALID_PASSWORD: irc_usermsg( irc, "Incorrect password" ); -- cgit v1.2.3