struct Client *target_p = NULL;
time_t newts;
time_t oldts;
- time_t tstosend;
struct Mode mode, oldmode;
int args = 0;
char keep_our_modes = 1;
}
if (isnew)
- chptr->channelts = tstosend = newts;
+ chptr->channelts = newts;
else if (newts == 0 || oldts == 0)
- chptr->channelts = tstosend = 0;
- else if (newts == oldts)
- tstosend = oldts;
+ chptr->channelts = 0;
else if (newts < oldts)
{
keep_our_modes = 0;
- chptr->channelts = tstosend = newts;
+ chptr->channelts = newts;
}
- else
+ else if (newts > oldts)
{
keep_new_modes = 0;
- tstosend = oldts;
}
if (!keep_new_modes)
}
buflen = snprintf(nick_buf, sizeof(nick_buf), ":%s SJOIN %lu %s %s %s:",
- source_p->name, (unsigned long)tstosend,
+ source_p->name, (unsigned long)chptr->channelts,
chptr->chname, modebuf, parabuf);
nick_ptr = nick_buf + buflen;
buflen = snprintf(uid_buf, sizeof(uid_buf), ":%s SJOIN %lu %s %s %s:",
- ID(source_p), (unsigned long)tstosend,
+ ID(source_p), (unsigned long)chptr->channelts,
chptr->chname, modebuf, parabuf);
uid_ptr = uid_buf + buflen;
sendto_server(client_p, 0, CAP_TS6, "%s", nick_buf);
buflen = snprintf(nick_buf, sizeof(nick_buf), ":%s SJOIN %lu %s %s %s:",
- source_p->name, (unsigned long)tstosend,
+ source_p->name, (unsigned long)chptr->channelts,
chptr->chname, modebuf, parabuf);
nick_ptr = nick_buf + buflen;
}
sendto_server(client_p, CAP_TS6, 0, "%s", uid_buf);
buflen = snprintf(uid_buf, sizeof(uid_buf), ":%s SJOIN %lu %s %s %s:",
- ID(source_p), (unsigned long)tstosend,
+ ID(source_p), (unsigned long)chptr->channelts,
chptr->chname, modebuf, parabuf);
uid_ptr = uid_buf + buflen;
}