From: Chris Porter Date: Sun, 16 Feb 2014 20:42:38 +0000 (+0000) Subject: CHANSERV: relay setemail now always return true if email is the same. X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/commitdiff_plain/46a359b543213ded23b2b3a862fdae0bd8bf0f5c CHANSERV: relay setemail now always return true if email is the same. --HG-- branch : chanserv-live --- diff --git a/chanserv/chanserv_relay.c b/chanserv/chanserv_relay.c index 14e1b2ba..ccf43c86 100644 --- a/chanserv/chanserv_relay.c +++ b/chanserv/chanserv_relay.c @@ -262,7 +262,8 @@ int csa_docreateaccount(void *source, int cargc, char **cargv) { csdb_createuser(rup); snprintf(account_info, sizeof(account_info), " %u %lu", rup->ID, (unsigned long)rup->lastpasschange); - sendemail(rup); + if(!activate) + sendemail(rup); } else { account_info[0] = '\0'; do_create = 0; @@ -353,6 +354,13 @@ int csa_dosetemail(void *source, int cargc, char **cargv) { } email = cargv[2]; + + if(!strcmp(email, rup->email->content)) { + /* setting to the same thing? fine! */ + controlreply(sender, "SETEMAIL TRUE"); + return CMD_OK; + } + error = email_to_error(email); if(error) { controlreply(sender, "SETEMAIL FALSE %s", error);