fix up some of the compile warnings... needs some testing though
This commit is contained in:
parent
fa24c13e6e
commit
1b30a76684
9 changed files with 35 additions and 35 deletions
12
Ultimate.c
12
Ultimate.c
|
@ -457,7 +457,7 @@ sjoin_cmd (const char *who, const char *chan, unsigned long chflag)
|
|||
}
|
||||
|
||||
/* NO TS SUPPORT. BAAAAAAD. need to port the Bahumat TS stuff to all IRCd's and test */
|
||||
sts (":%s %s %d %s + :%c%s", me.name, MSG_SJOIN, time(NULL), chan, flag, who);
|
||||
sts (":%s %s %ld %s + :%c%s", me.name, MSG_SJOIN, (long)time(NULL), chan, flag, who);
|
||||
join_chan (finduser (who), (char *) chan);
|
||||
ircsnprintf (ircd_buf, BUFSIZE, "%s +%c %s", chan, mode, who);
|
||||
ac = split_buf (ircd_buf, &av, 0);
|
||||
|
@ -566,7 +566,7 @@ spong_cmd (const char *reply)
|
|||
int
|
||||
snetinfo_cmd ()
|
||||
{
|
||||
sts (":%s %s 0 %d %d %s 0 0 0 :%s", me.name, MSG_SNETINFO, me.now, ircd_srv.uprot, ircd_srv.cloak, me.netname);
|
||||
sts (":%s %s 0 %ld %d %s 0 0 0 :%s", me.name, MSG_SNETINFO, (long)me.now, ircd_srv.uprot, ircd_srv.cloak, me.netname);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -614,7 +614,7 @@ int
|
|||
snick_cmd (const char *oldnick, const char *newnick)
|
||||
{
|
||||
Change_User (finduser (oldnick), newnick);
|
||||
sts (":%s %s %s %d", oldnick, (me.token ? TOK_NICK : MSG_NICK), newnick, me.now);
|
||||
sts (":%s %s %s %ld", oldnick, (me.token ? TOK_NICK : MSG_NICK), newnick, (long)me.now);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -629,7 +629,7 @@ sswhois_cmd (const char *target, const char *swhois)
|
|||
int
|
||||
ssvsnick_cmd (const char *target, const char *newnick)
|
||||
{
|
||||
sts ("%s %s %s :%d", (me.token ? TOK_SVSNICK : MSG_SVSNICK), target, newnick, me.now);
|
||||
sts ("%s %s %s :%ld", (me.token ? TOK_SVSNICK : MSG_SVSNICK), target, newnick, (long)me.now);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -703,7 +703,7 @@ sakill_cmd (const char *host, const char *ident, const char *setby, const int le
|
|||
ircvsnprintf (ircd_buf, BUFSIZE, reason, ap);
|
||||
va_end (ap);
|
||||
#ifdef ULTIMATE3
|
||||
sts (":%s %s %s %s %d %s %d :%s", me.name, (me.token ? TOK_AKILL : MSG_AKILL), host, ident, length, setby, me.now, ircd_buf);
|
||||
sts (":%s %s %s %s %d %s %ld :%s", me.name, (me.token ? TOK_AKILL : MSG_AKILL), host, ident, length, setby, (long)me.now, ircd_buf);
|
||||
#elif ULTIMATE
|
||||
sts (":%s %s %s@%s %d %d %s :%s", me.name, MSG_GLINE, ident, host, me.now + length, me.now, setby, ircd_buf);
|
||||
#endif
|
||||
|
@ -726,7 +726,7 @@ srakill_cmd (const char *host, const char *ident)
|
|||
int
|
||||
ssvinfo_cmd ()
|
||||
{
|
||||
sts ("SVINFO 5 3 0 :%d", me.now);
|
||||
sts ("SVINFO 5 3 0 :%ld", (long)me.now);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
20
chans.c
20
chans.c
|
@ -475,7 +475,7 @@ kick_chan (User * u, char *chan, User * k)
|
|||
} else {
|
||||
lnode_destroy (list_delete (u->chans, un));
|
||||
}
|
||||
nlog (LOG_DEBUG3, LOG_CORE, "Cur Users %s %d (list %d)", c->name, c->cur_users, list_count (c->chanmembers));
|
||||
nlog (LOG_DEBUG3, LOG_CORE, "Cur Users %s %ld (list %d)", c->name, c->cur_users, (int)list_count (c->chanmembers));
|
||||
if (c->cur_users <= 0) {
|
||||
AddStringToList (&av, c->name, &ac);
|
||||
ModuleEvent (EVENT_DELCHAN, av, ac);
|
||||
|
@ -563,7 +563,7 @@ part_chan (User * u, char *chan)
|
|||
} else {
|
||||
lnode_destroy (list_delete (u->chans, un));
|
||||
}
|
||||
nlog (LOG_DEBUG3, LOG_CORE, "Cur Users %s %d (list %d)", c->name, c->cur_users, list_count (c->chanmembers));
|
||||
nlog (LOG_DEBUG3, LOG_CORE, "Cur Users %s %ld (list %d)", c->name, c->cur_users, (int)list_count (c->chanmembers));
|
||||
if (c->cur_users <= 0) {
|
||||
AddStringToList (&av, c->name, &ac);
|
||||
ModuleEvent (EVENT_DELCHAN, av, ac);
|
||||
|
@ -694,7 +694,7 @@ join_chan (User * u, char *chan)
|
|||
AddStringToList (&av, u->nick, &ac);
|
||||
ModuleEvent (EVENT_JOINCHAN, av, ac);
|
||||
free (av);
|
||||
nlog (LOG_DEBUG3, LOG_CORE, "Cur Users %s %d (list %d)", c->name, c->cur_users, list_count (c->chanmembers));
|
||||
nlog (LOG_DEBUG3, LOG_CORE, "Cur Users %s %ld (list %d)", c->name, c->cur_users, (int)list_count (c->chanmembers));
|
||||
if (findbot (u->nick)) {
|
||||
nlog(LOG_DEBUG3, LOG_CORE, "Joining bot %s to Channel %s", u->nick, c->name);
|
||||
add_bot_to_chan (u->nick, c->name);
|
||||
|
@ -728,7 +728,7 @@ ChanDump (char *chan)
|
|||
|
||||
SET_SEGV_LOCATION();
|
||||
if (!chan) {
|
||||
debugtochannel("Channels %d", hash_count (ch));
|
||||
debugtochannel("Channels %d", (int)hash_count (ch));
|
||||
hash_scan_begin (&sc, ch);
|
||||
while ((cn = hash_scan_next (&sc)) != NULL) {
|
||||
c = hnode_get (cn);
|
||||
|
@ -740,8 +740,8 @@ ChanDump (char *chan)
|
|||
mode[++j] = cFlagTab[i].flag;
|
||||
}
|
||||
}
|
||||
debugtochannel("Channel: %s Members: %d (List %d) Flags %s tstime %d", c->name, c->cur_users, list_count (c->chanmembers), mode, c->tstime);
|
||||
debugtochannel(" Topic Owner %s, TopicTime: %d, Topic %s", c->topicowner, c->topictime, c->topic);
|
||||
debugtochannel("Channel: %s Members: %ld (List %d) Flags %s tstime %ld", c->name, c->cur_users, (int)list_count (c->chanmembers), mode, (long)c->tstime);
|
||||
debugtochannel(" Topic Owner %s, TopicTime: %ld, Topic %s", c->topicowner, (long)c->topictime, c->topic);
|
||||
debugtochannel("PubChan?: %d", is_pub_chan (c));
|
||||
cmn = list_first (c->modeparms);
|
||||
while (cmn) {
|
||||
|
@ -765,7 +765,7 @@ ChanDump (char *chan)
|
|||
mode[++j] = cFlagTab[i].flag;
|
||||
}
|
||||
}
|
||||
debugtochannel("Members: %s Modes %s Joined %d", cm->nick, mode, cm->joint);
|
||||
debugtochannel("Members: %s Modes %s Joined %ld", cm->nick, mode, (long)cm->joint);
|
||||
cmn = list_next (c->chanmembers, cmn);
|
||||
}
|
||||
}
|
||||
|
@ -782,8 +782,8 @@ ChanDump (char *chan)
|
|||
mode[++j] = cFlagTab[i].flag;
|
||||
}
|
||||
}
|
||||
debugtochannel("Channel: %s Members: %d (List %d) Flags %s tstime %d", c->name, c->cur_users, list_count (c->chanmembers), mode, c->tstime);
|
||||
debugtochannel(" Topic Owner %s, TopicTime: %d Topic %s", c->topicowner, c->topictime, c->topic);
|
||||
debugtochannel("Channel: %s Members: %ld (List %d) Flags %s tstime %ld", c->name, c->cur_users, (int)list_count (c->chanmembers), mode, (long)c->tstime);
|
||||
debugtochannel(" Topic Owner %s, TopicTime: %ld Topic %s", c->topicowner, (long)c->topictime, c->topic);
|
||||
debugtochannel("PubChan?: %d", is_pub_chan (c));
|
||||
cmn = list_first (c->modeparms);
|
||||
while (cmn) {
|
||||
|
@ -806,7 +806,7 @@ ChanDump (char *chan)
|
|||
mode[++j] = cFlagTab[i].flag;
|
||||
}
|
||||
}
|
||||
debugtochannel("Members: %s Modes %s Joined: %d", cm->nick, mode, cm->joint);
|
||||
debugtochannel("Members: %s Modes %s Joined: %ld", cm->nick, mode, (long)cm->joint);
|
||||
cmn = list_next (c->chanmembers, cmn);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ add_bot_cmd(hash_t* cmd_hash, bot_cmd* cmd_ptr)
|
|||
* For now we verify help during processing since it is not critical. */
|
||||
/* No command, we cannot recover from this */
|
||||
if(!cmd_ptr->cmd) {
|
||||
nlog (LOG_ERROR, LOG_MOD, "Missing command, command %s not added");
|
||||
nlog (LOG_ERROR, LOG_MOD, "Missing command, command (unknown) not added");
|
||||
return NS_FAILURE;
|
||||
}
|
||||
/* No handler, we cannot recover from this */
|
||||
|
@ -538,7 +538,7 @@ bot_cmd_set (ModUser* bot_ptr, User * u, char **av, int ac)
|
|||
case SET_TYPE_RNAME:
|
||||
case SET_TYPE_CUSTOM:
|
||||
prefmsg(u->nick, bot_ptr->nick, "%s: %s",
|
||||
set_ptr->option, *(char*)set_ptr->varptr);
|
||||
set_ptr->option, (char*)set_ptr->varptr);
|
||||
break;
|
||||
}
|
||||
set_ptr++;
|
||||
|
|
8
conf.c
8
conf.c
|
@ -130,7 +130,7 @@ cb_Module (char *arg, int configtype)
|
|||
}
|
||||
}
|
||||
load_mods[i] = sstrdup (arg);
|
||||
nlog (LOG_DEBUG1, LOG_CORE, "Added Module %d :%s", i, load_mods[i]);
|
||||
nlog (LOG_DEBUG1, LOG_CORE, "Added Module %d :%s", i, (char *)load_mods[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,12 +151,12 @@ ConfLoadModules ()
|
|||
SET_SEGV_LOCATION();
|
||||
nlog (LOG_NORMAL, LOG_CORE, "Loading configured modules");
|
||||
for (i = 1; (i < NUM_MODULES) && (load_mods[i] != 0); i++) {
|
||||
nlog (LOG_DEBUG1, LOG_CORE, "Loading Module %s", load_mods[i]);
|
||||
nlog (LOG_DEBUG1, LOG_CORE, "Loading Module %s", (char *)load_mods[i]);
|
||||
rval = load_module (load_mods[i], NULL);
|
||||
if (rval == NS_SUCCESS) {
|
||||
nlog (LOG_NORMAL, LOG_CORE, "Successfully Loaded Module %s", load_mods[i]);
|
||||
nlog (LOG_NORMAL, LOG_CORE, "Successfully Loaded Module %s", (char *)load_mods[i]);
|
||||
} else {
|
||||
nlog (LOG_WARNING, LOG_CORE, "Could Not Load Module %s, Please check above error Messages", load_mods[i]);
|
||||
nlog (LOG_WARNING, LOG_CORE, "Could Not Load Module %s, Please check above error Messages", (char *)load_mods[i]);
|
||||
}
|
||||
}
|
||||
nlog (LOG_NORMAL, LOG_CORE, "Completed loading configured modules");
|
||||
|
|
8
dl.c
8
dl.c
|
@ -259,7 +259,7 @@ list_timers (User * u, char **av, int ac)
|
|||
prefmsg (u->nick, s_Services, "%s:--------------------------------", mod_tmr->modname);
|
||||
prefmsg (u->nick, s_Services, "Module Timer Name: %s", mod_tmr->timername);
|
||||
prefmsg (u->nick, s_Services, "Module Interval: %d", mod_tmr->interval);
|
||||
prefmsg (u->nick, s_Services, "Time till next Run: %d", mod_tmr->interval - (me.now - mod_tmr->lastrun));
|
||||
prefmsg (u->nick, s_Services, "Time till next Run: %ld", mod_tmr->interval - (me.now - mod_tmr->lastrun));
|
||||
}
|
||||
prefmsg (u->nick, s_Services, "End of Module timer List");
|
||||
return 0;
|
||||
|
@ -320,7 +320,7 @@ new_sock (char *sock_name)
|
|||
hnode_t *sn;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
nlog (LOG_DEBUG2, LOG_CORE, "New Socket: %mod_sock", sock_name);
|
||||
nlog (LOG_DEBUG2, LOG_CORE, "New Socket: %s", sock_name);
|
||||
mod_sock = smalloc (sizeof (ModSock));
|
||||
strlcpy (mod_sock->sockname, sock_name, MAX_MOD_NAME);
|
||||
sn = hnode_create (mod_sock);
|
||||
|
@ -482,7 +482,7 @@ list_sockets (User * u, char **av, int ac)
|
|||
hnode_t *sn;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
prefmsg (u->nick, s_Services, "Sockets List: (%d)", hash_count (sockh));
|
||||
prefmsg (u->nick, s_Services, "Sockets List: (%d)", (int)hash_count (sockh));
|
||||
hash_scan_begin (&ss, sockh);
|
||||
while ((sn = hash_scan_next (&ss)) != NULL) {
|
||||
mod_sock = hnode_get (sn);
|
||||
|
@ -631,7 +631,7 @@ list_bot_chans (User * u, char **av, int ac)
|
|||
prefmsg (u->nick, s_Services, "%s:--------------------------------", mod_chan_bot->chan);
|
||||
ln = list_first (mod_chan_bot->bots);
|
||||
while (ln) {
|
||||
prefmsg (u->nick, s_Services, "Bot Name: %s", lnode_get (ln));
|
||||
prefmsg (u->nick, s_Services, "Bot Name: %s", (char *)lnode_get (ln));
|
||||
ln = list_next (mod_chan_bot->bots, ln);
|
||||
}
|
||||
}
|
||||
|
|
2
dns.c
2
dns.c
|
@ -179,7 +179,7 @@ do_dns ()
|
|||
status = adns_check (ads, &dnsdata->q, &dnsdata->a, NULL);
|
||||
/* if status == eagain, the lookup hasn't completed yet */
|
||||
if (status == EAGAIN) {
|
||||
nlog (LOG_DEBUG2, LOG_CORE, "DNS: Lookup hasn't completed for %s", &dnsdata->data);
|
||||
nlog (LOG_DEBUG2, LOG_CORE, "DNS: Lookup hasn't completed for %s",(char *) &dnsdata->data);
|
||||
dnsnode = list_next (dnslist, dnsnode);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -327,13 +327,13 @@ ns_info (User * u, char **av, int ac)
|
|||
SET_SEGV_LOCATION();
|
||||
prefmsg (u->nick, s_Services, "%s Information:", s_Services);
|
||||
if (uptime > 86400) {
|
||||
prefmsg (u->nick, s_Services, "%s up \2%ld\2 day%s, \2%02ld:%02ld\2", s_Services, uptime / 86400, (uptime / 86400 == 1) ? "" : "s", (uptime / 3600) % 24, (uptime / 60) % 60);
|
||||
prefmsg (u->nick, s_Services, "%s up \2%d\2 day%s, \2%02d:%02d\2", s_Services, uptime / 86400, (uptime / 86400 == 1) ? "" : "s", (uptime / 3600) % 24, (uptime / 60) % 60);
|
||||
} else if (uptime > 3600) {
|
||||
prefmsg (u->nick, s_Services, "%s up \2%ld hour%s, %ld minute%s\2", s_Services, uptime / 3600, uptime / 3600 == 1 ? "" : "s", (uptime / 60) % 60, (uptime / 60) % 60 == 1 ? "" : "s");
|
||||
prefmsg (u->nick, s_Services, "%s up \2%d hour%s, %d minute%s\2", s_Services, uptime / 3600, uptime / 3600 == 1 ? "" : "s", (uptime / 60) % 60, (uptime / 60) % 60 == 1 ? "" : "s");
|
||||
} else if (uptime > 60) {
|
||||
prefmsg (u->nick, s_Services, "%s up \2%ld minute%s, %ld second%s\2", s_Services, uptime / 60, uptime / 60 == 1 ? "" : "s", uptime % 60, uptime % 60 == 1 ? "" : "s");
|
||||
prefmsg (u->nick, s_Services, "%s up \2%d minute%s, %d second%s\2", s_Services, uptime / 60, uptime / 60 == 1 ? "" : "s", uptime % 60, uptime % 60 == 1 ? "" : "s");
|
||||
} else {
|
||||
prefmsg (u->nick, s_Services, "%s up \2%ld second%s\2", s_Services, uptime, uptime == 1 ? "" : "s");
|
||||
prefmsg (u->nick, s_Services, "%s up \2%d second%s\2", s_Services, uptime, uptime == 1 ? "" : "s");
|
||||
}
|
||||
prefmsg (u->nick, s_Services, "Sent %ld Messages Totaling %ld Bytes", me.SendM, me.SendBytes);
|
||||
prefmsg (u->nick, s_Services, "Received %ld Messages, Totaling %ld Bytes", me.RcveM, me.RcveBytes);
|
||||
|
|
|
@ -38,4 +38,4 @@ int init_curl() {
|
|||
}
|
||||
nlog(LOG_DEBUG1, LOG_CORE, "LibCurl Initilized successfully");
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
6
users.c
6
users.c
|
@ -64,7 +64,7 @@ AddUser (const char *nick, const char *user, const char *host, const char *serve
|
|||
User *u;
|
||||
int i;
|
||||
|
||||
nlog (LOG_DEBUG2, LOG_CORE, "AddUser(): %s (%s@%s)(%lu) -> %s at %lu", nick, user, host, htonl (ipaddr), server, TS);
|
||||
nlog (LOG_DEBUG2, LOG_CORE, "AddUser(): %s (%s@%s)(%d) -> %s at %lu", nick, user, host, htonl (ipaddr), server, TS);
|
||||
SET_SEGV_LOCATION();
|
||||
u = finduser (nick);
|
||||
if (u) {
|
||||
|
@ -427,9 +427,9 @@ UserMode (const char *nick, const char *modes, int smode)
|
|||
tmpmode = *modes++;
|
||||
}
|
||||
if (smode > 0) {
|
||||
nlog (LOG_DEBUG1, LOG_CORE, "SMODE for %s is are now %p", u->nick, u->Smode);
|
||||
nlog (LOG_DEBUG1, LOG_CORE, "SMODE for %s is are now %p", u->nick, (int *)u->Smode);
|
||||
} else {
|
||||
nlog (LOG_DEBUG1, LOG_CORE, "Modes for %s are now %p", u->nick, u->Umode);
|
||||
nlog (LOG_DEBUG1, LOG_CORE, "Modes for %s are now %p", u->nick, (int *)u->Umode);
|
||||
}
|
||||
free (av);
|
||||
}
|
||||
|
|
Reference in a new issue