]> git.pond.sub.org Git - empserver/commitdiff
Permit sharebmap with yourself
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 30 Jan 2011 17:37:02 +0000 (18:37 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Feb 2011 15:41:35 +0000 (16:41 +0100)
Does nothing.  Before, it failed with a mildly bogus "does not have
friendly relations towards you" message.

src/lib/commands/shar.c

index 2e9ae72b459825bdc96af59438160527a8e8783a..4f2190181bf545ea6e934d3c0463057054bba999 100644 (file)
@@ -47,7 +47,7 @@ shar(void)
     if (to < 0)
        return RET_SYN;
 
     if (to < 0)
        return RET_SYN;
 
-    if (getrel(getnatp(to), player->cnum) < FRIENDLY) {
+    if (to != player->cnum && getrel(getnatp(to), player->cnum) < FRIENDLY) {
        pr("%s does not have friendly relations towards you\n", cname(to));
        return RET_FAIL;
     }
        pr("%s does not have friendly relations towards you\n", cname(to));
        return RET_FAIL;
     }