diff options
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/bot/bot-users.c | 3 | ||||
-rw-r--r-- | src/irc/bot/botnet.c | 4 | ||||
-rw-r--r-- | src/irc/bot/botnet.h | 4 | ||||
-rw-r--r-- | src/irc/dcc/dcc-files.c | 4 | ||||
-rw-r--r-- | src/irc/dcc/dcc.c | 6 |
5 files changed, 12 insertions, 9 deletions
diff --git a/src/irc/bot/bot-users.c b/src/irc/bot/bot-users.c index b38a514b..2a012b66 100644 --- a/src/irc/bot/bot-users.c +++ b/src/irc/bot/bot-users.c @@ -18,7 +18,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE /* for crypt() */ +#endif + #include "module.h" #include "signals.h" #include "misc.h" diff --git a/src/irc/bot/botnet.c b/src/irc/bot/botnet.c index 190481d1..e1f00bb7 100644 --- a/src/irc/bot/botnet.c +++ b/src/irc/bot/botnet.c @@ -37,7 +37,7 @@ void botnet_users_init(void); GSList *botnets; -void bot_send_cmd(BOT_REC *bot, char *data) +void bot_send_cmd(BOT_REC *bot, const char *data) { g_return_if_fail(bot != NULL); g_return_if_fail(data != NULL); @@ -46,7 +46,7 @@ void bot_send_cmd(BOT_REC *bot, char *data) net_transmit(bot->handle, "\n", 1); } -void bot_send_cmdv(BOT_REC *bot, char *format, ...) +void bot_send_cmdv(BOT_REC *bot, const char *format, ...) { va_list args; char *str; diff --git a/src/irc/bot/botnet.h b/src/irc/bot/botnet.h index da022b22..e8b436d5 100644 --- a/src/irc/bot/botnet.h +++ b/src/irc/bot/botnet.h @@ -95,8 +95,8 @@ struct _botnet_rec { extern GSList *botnets; -void bot_send_cmd(BOT_REC *bot, char *data); -void bot_send_cmdv(BOT_REC *bot, char *format, ...); +void bot_send_cmd(BOT_REC *bot, const char *data); +void bot_send_cmdv(BOT_REC *bot, const char *format, ...); /* broadcast a message to everyone in bot network, except for `except_bot' if it's not NULL. If botnet is NULL, the message is sent to all botnets. */ diff --git a/src/irc/dcc/dcc-files.c b/src/irc/dcc/dcc-files.c index 9a68813f..3d17af01 100644 --- a/src/irc/dcc/dcc-files.c +++ b/src/irc/dcc/dcc-files.c @@ -268,7 +268,7 @@ static void dcc_ctcp_msg(const char *data, IRC_SERVER_REC *server, { char *type, *arg, *portstr, *sizestr; void *free_arg; - unsigned long size; + long size; int port; DCC_REC *dcc; @@ -426,7 +426,7 @@ static void dcc_send_read_size(DCC_REC *dcc) memcpy(&bytes, dcc->count_buf, 4); bytes = (guint32) ntohl(bytes); - dcc->gotalldata = bytes == dcc->transfd; + dcc->gotalldata = (long) bytes == dcc->transfd; dcc->count_pos = 0; if (!dcc->fastsend) { diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c index 75dc5459..8986a6fb 100644 --- a/src/irc/dcc/dcc.c +++ b/src/irc/dcc/dcc.c @@ -38,7 +38,7 @@ void dcc_files_deinit(void); #define DCC_TYPES 5 -static char *dcc_types[] = { +static const char *dcc_types[] = { "CHAT", "SEND", "GET", @@ -282,7 +282,7 @@ static void dcc_ctcp_msg(char *data, IRC_SERVER_REC *server, char *sender, char void *free_arg; const char *cstr; DCC_REC *dcc; - gulong size; + long size; int port; g_return_if_fail(data != NULL); @@ -293,7 +293,7 @@ static void dcc_ctcp_msg(char *data, IRC_SERVER_REC *server, char *sender, char return; if (sscanf(portstr, "%d", &port) != 1) port = 0; - if (sscanf(sizestr, "%lu", &size) != 1) size = 0; + if (sscanf(sizestr, "%ld", &size) != 1) size = 0; dcc = dcc_create(SWAP_SENDGET(dcc_str2type(type)), -1, sender, arg, server, chat); dcc_get_address(addrstr, &dcc->addr); |