X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/cf33840c9fe630c06e72b176eda260a95f756733..964a842d8f29eb5767e64d2028a36cc40ccec911:/src/mod-memoserv.c diff --git a/src/mod-memoserv.c b/src/mod-memoserv.c index 2c6e638..62c99d7 100644 --- a/src/mod-memoserv.c +++ b/src/mod-memoserv.c @@ -6,7 +6,7 @@ * * x3 is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -547,11 +547,6 @@ static MODCMD_FUNC(cmd_read) char posted[24]; struct tm tm; - if (!(ma = memoserv_get_account(user->handle_info))) - return 0; - if (!(memo = find_memo(user, cmd, ma, argv[1], &memoid))) - return 0; - if (argc > 2) { char *argtwo = argv[2]; while (*argtwo) { @@ -578,6 +573,12 @@ static MODCMD_FUNC(cmd_read) } } + if (!(ma = memoserv_get_account(user->handle_info))) + return 0; + + if (!(memo = find_memo(user, cmd, ma, argv[1], &memoid))) + return 0; + localtime_r(&memo->sent, &tm); strftime(posted, sizeof(posted), "%I:%M %p, %m/%d/%Y", &tm);