]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/proto-p10.c
Minor typo in previous commit where returning 0 when it should have been 1 from opser...
[irc/evilnet/x3.git] / src / proto-p10.c
index 4108790dc4db85e4cb6051100ae469e2828b75a2..3074fadcdb3a31c607a3a9199d2ed09905efb7b3 100644 (file)
@@ -520,7 +520,7 @@ irc_p10_pton(irc_in_addr_t *ip, const char *input)
         do {
             if (*input == '_') {
                 unsigned int left;
-                for (left = (25 - strlen(input)) / 3; left; left--)
+                for (left = (25 - strlen(input)) / 3 - pos; left; left--)
                     ip->in6[pos++] = 0;
                 input++;
             } else {
@@ -1253,7 +1253,7 @@ static CMD_FUNC(cmd_whois)
     else
         irc_numeric(from, RPL_WHOISUSER, "%s %s %s * :%s", who->nick, who->ident, who->hostname, who->info);
 
-    if (IsService(who) || (from == who)) {
+    if (!IsService(who) || (from == who)) {
         struct modeNode *mn;
         mlen = strlen(self->name) + strlen(from->nick) + 12 + strlen(who->nick);
         len = 0;