Fix language initialization bug; fix email change text
authorMichael Poole <mdpoole@troilus.org>
Fri, 19 Mar 2004 14:46:53 +0000 (14:46 +0000)
committerMichael Poole <mdpoole@troilus.org>
Fri, 19 Mar 2004 14:46:53 +0000 (14:46 +0000)
* 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
src/nickserv.c

index a61e097793fe1efffa63b51fbe8c43d7f1fae928..27834d7d9edb91f38ac002971ee4abf050ed3d96 100644 (file)
@@ -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"))
index 46b02b6b1dbf058d64b74e5ed50a1c24b54925e0..bb445d739a7a70561f26b0837675e0ee3e8df232 100644 (file)
@@ -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");