]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/mod-memoserv.c
svsnick and 1 param auth
[irc/evilnet/x3.git] / src / mod-memoserv.c
index 2c6e638bb34aa06470a7681bbca9ac72b6343204..62c99d77d452c726534db3e0a10c8165e3c3ab6e 100644 (file)
@@ -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);