]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Truncate idle time in /who to 32 bits.
authorJilles Tjoelker <redacted>
Sat, 15 Nov 2008 20:15:38 +0000 (21:15 +0100)
committerJilles Tjoelker <redacted>
Sat, 15 Nov 2008 20:15:38 +0000 (21:15 +0100)
Pointed out by dwr (but solved differently).

modules/m_who.c

index f05beca5b7c2e96ea4735eee496422db7e2006ad..65304c2781f5c32dd17d5542c59b1b3be4f61888 100644 (file)
@@ -480,7 +480,7 @@ do_who(struct Client *source_p, struct Client *target_p, struct membership *mspt
                if (fmt->fields & FIELD_HOP)
                        p += rb_snprintf(p, end - p, " %d", ConfigServerHide.flatten_links ? 0 : target_p->hopcount);
                if (fmt->fields & FIELD_IDLE)
-                       p += rb_snprintf(p, end - p, " %d", MyClient(target_p) ? rb_current_time() - target_p->localClient->last : 0);
+                       p += rb_snprintf(p, end - p, " %d", (int)(MyClient(target_p) ? rb_current_time() - target_p->localClient->last : 0));
                if (fmt->fields & FIELD_ACCOUNT)
                {
                        /* display as in whois */