aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-03-14 16:42:22 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-03-14 16:42:22 +0000
commite9cf291a52097d5b9428b8d1650cc691d5cc5dc8 (patch)
tree00777f36f0b2e6947ee89a8a19d92ce5674e60b3
parentcaceb0672b29fa49958d5f8b5338ff8e6ecb74d3 (diff)
Allow the identify command only once. (Bug #509)
-rw-r--r--root_commands.c6
1 files changed, 6 insertions, 0 deletions
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" );