From 7c9f37ec7c3410d01ee7878bc1a55a173e14ffe5 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Fri, 19 Mar 2004 14:46:53 +0000 Subject: [PATCH] Fix language initialization bug; fix email change text * Initialize each new account's language when registering it. * Send the first half of the email change cookie to the old address, rather than sending the second half (which also goes to the new address). git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-30 --- src/modcmd.c | 4 ++++ src/nickserv.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modcmd.c b/src/modcmd.c index a61e097..27834d7 100644 --- a/src/modcmd.c +++ b/src/modcmd.c @@ -1786,6 +1786,10 @@ static MODCMD_FUNC(cmd_dump_messages) { } static MODCMD_FUNC(cmd_version) { + /* This function provides copyright management information to end + * users of srvx. You should not alter, disable or remove this + * command or its accessibility to normal IRC users. + */ reply("MCMSG_VERSION"); send_message_type(4, user, cmd->parent->bot, "Copyright 2000-2004 srvx Development Team.\nThe srvx Development Team includes Paul Chang, Adrian Dewhurst, Miles Peterson, Michael Poole and others.\nThe srvx Development Team can be reached at http://sf.net/projects/srvx/ or in #srvx on irc.gamesurge.net."); if ((argc > 1) && !irccasecmp(argv[1], "arch")) diff --git a/src/nickserv.c b/src/nickserv.c index 46b02b6..bb445d7 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -917,6 +917,7 @@ nickserv_register(struct userNode *user, struct userNode *settee, const char *ha hi = register_handle(handle, crypted, 0); hi->masks = alloc_string_list(1); hi->users = NULL; + hi->language = lang_C; hi->registered = now; hi->lastseen = now; hi->flags = HI_DEFAULT_FLAGS; @@ -997,7 +998,7 @@ nickserv_make_cookie(struct userNode *user, struct handle_info *hi, enum cookie_ snprintf(body, sizeof(body), fmt, netname, cookie->cookie+COOKIELEN/2, nickserv->nick, self->name, hi->handle, COOKIELEN/2); sendmail(nickserv, hi, subject, body, 1); fmt = user_find_message(user, "NSEMAIL_EMAIL_CHANGE_BODY_OLD"); - snprintf(body, sizeof(body), fmt, netname, cookie->cookie+COOKIELEN/2, nickserv->nick, self->name, hi->handle, COOKIELEN/2, hi->email_addr); + snprintf(body, sizeof(body), fmt, netname, cookie->cookie, nickserv->nick, self->name, hi->handle, COOKIELEN/2, hi->email_addr); } else { send_message(user, nickserv, "NSMSG_USE_COOKIE_EMAIL_1"); fmt = user_find_message(user, "NSEMAIL_EMAIL_VERIFY_SUBJECT"); -- 2.20.1