aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/root_commands.c b/root_commands.c
index cdddf7f2..69aa3e98 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -379,7 +379,13 @@ static void cmd_account( irc_t *irc, char **cmd )
irc_usermsg( irc, "Unknown protocol" );
return;
}
-
+
+ for( a = irc->b->accounts; a; a = a->next )
+ if( a->prpl == prpl && prpl->handle_cmp( a->user, cmd[3] ) == 0 )
+ irc_usermsg( irc, "Warning: You already have an account with "
+ "protocol `%s' and username `%s'. Are you accidentally "
+ "trying to add it twice?", prpl->name, cmd[3] );
+
a = account_add( irc->b, prpl, cmd[3], cmd[4] );
if( cmd[5] )
{