]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/wu.c
Fix pending anno count for annos squashed together
[empserver] / src / lib / subs / wu.c
index f79a993f93905c93eb304ca14463a04e12e383dc..84549a0df459b7e416b209fb6d4f6dc1f86481b5 100644 (file)
@@ -28,6 +28,7 @@
  *
  *  Known contributors to this file:
  *     Steve McClure, 2000
+ *     Markus Armbruster, 2005-2011
  */
 
 #include <config.h>
@@ -145,6 +146,7 @@ typed_wu(natid from, natid to, char *message, int type)
     len = strlen(message);
     tel.tel_length = len;
     tel.tel_type = type;
+    tel.tel_cont = !telegram_is_new(to, &tel);
     iov[0].iov_base = &tel;
     iov[0].iov_len = sizeof(tel);
     iov[1].iov_base = message;
@@ -165,11 +167,13 @@ typed_wu(natid from, natid to, char *message, int type)
                continue;
            if (!player->god && (getrejects(from, np) & REJ_ANNO))
                continue;
-           np->nat_ann++;
-           putnat(np);
+           if (!np->nat_ann || !tel.tel_cont) {
+               np->nat_ann++;
+               putnat(np);
+           }
        }
     } else {
-       if (!np->nat_tgms || telegram_is_new(to, &tel)) {
+       if (!np->nat_tgms || !tel.tel_cont) {
            np->nat_tgms++;
            putnat(np);
            if (np->nat_flags & NF_INFORM) {