extern unsigned int nuf_size, nuf_used;
extern del_user_func_t *duf_list;
extern unsigned int duf_size, duf_used;
-extern time_t boot_time;
+extern unsigned long boot_time;
void received_ping(void);
replay_read_line(void)
{
struct tm timestamp;
- time_t new_time;
+ unsigned long new_time;
if (replay_line[0]) return;
read_line:
timestamp.tm_year = strtoul(replay_line+16, NULL, 10) - 1900;
timestamp.tm_isdst = 0;
new_time = mktime(×tamp);
- if (new_time == -1) {
+ if (new_time == (unsigned long)-1) {
log_module(MAIN_LOG, LOG_ERROR, "Unable to parse time struct tm_sec=%d tm_min=%d tm_hour=%d tm_mday=%d tm_mon=%d tm_year=%d", timestamp.tm_sec, timestamp.tm_min, timestamp.tm_hour, timestamp.tm_mday, timestamp.tm_mon, timestamp.tm_year);
} else {
now = new_time;
return 0;
switch (argv[1][0]) {
case 'u': {
- unsigned int uptime = now - boot_time;
+ unsigned long uptime;
+ uptime = now - boot_time;
irc_numeric(un, RPL_STATSUPTIME, ":Server Up %d days %d:%02d:%02d",
uptime/(24*60*60), (uptime/(60*60))%24, (uptime/60)%60, uptime%60);
irc_numeric(un, RPL_MAXCONNECTIONS, ":Highest connection count: %d (%d clients)",
{
struct privmsg_desc *pd = data;
struct modeNode *mn;
- struct chanmsg_func *cf = &chanmsg_funcs[(unsigned char)pd->text[0]];
+ struct chanmsg_func *cf;
int x;
/* Don't complain if it can't find the modeNode because the channel might
mn->idle_since = now;
/* Never send a NOTICE to a channel to one of the services */
- if (!pd->is_notice && cf->func
- && ((cn->modes & MODE_REGISTERED) || GetUserMode(cn, cf->service)))
+ cf = &chanmsg_funcs[(unsigned char)pd->text[0]];
+ if (cf->func && !pd->is_notice
+ && GetUserMode(cn, cf->service) && !IsDeaf(cf->service))
+ cf->func(pd->user, cn, pd->text+1, cf->service, pd->is_notice);
/* This catches *all* text sent to the channel that the services server sees */
for (x = 0; x < ALLCHANMSG_FUNCS_MAX; x++) {
if (!cf->func)
break; /* end of list */
else
- cf->func(pd->user, cn, pd->text, cf->service);
+ cf->func(pd->user, cn, pd->text, cf->service, pd->is_notice);
}
}