diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-05 21:12:52 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-05 21:12:52 +0000 |
commit | 9f2f1dc70a7ed6495cf511249f3b9095fb40c38a (patch) | |
tree | b54494da367fdeb1c4f3e90b559da6615b58e370 /src/fe-common | |
parent | 346808789cfd3556b8caf263bdd81982d6081296 (diff) | |
download | irssi-9f2f1dc70a7ed6495cf511249f3b9095fb40c38a.zip |
Server events: switched order of data and server parameters. it's now
SERVER_REC *server, const char *data, .. hope this doesn't cause too
many problems :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@967 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/irc/fe-ctcp.c | 18 | ||||
-rw-r--r-- | src/fe-common/irc/fe-events-numeric.c | 165 | ||||
-rw-r--r-- | src/fe-common/irc/fe-events.c | 43 |
3 files changed, 116 insertions, 110 deletions
diff --git a/src/fe-common/irc/fe-ctcp.c b/src/fe-common/irc/fe-ctcp.c index 2ed0feb4..d0fc66b3 100644 --- a/src/fe-common/irc/fe-ctcp.c +++ b/src/fe-common/irc/fe-ctcp.c @@ -34,7 +34,9 @@ #include "window-items.h" #include "printtext.h" -static void ctcp_print(const char *pre, const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target) +static void ctcp_print(const char *pre, const char *data, + IRC_SERVER_REC *server, const char *nick, + const char *addr, const char *target) { char *str; @@ -46,27 +48,27 @@ static void ctcp_print(const char *pre, const char *data, IRC_SERVER_REC *server g_free(str); } -static void ctcp_default_msg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target) +static void ctcp_default_msg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target) { ctcp_print("unknown CTCP", data, server, nick, addr, target); } -static void ctcp_ping_msg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target) +static void ctcp_ping_msg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target) { ctcp_print("CTCP PING", data, server, nick, addr, target); } -static void ctcp_version_msg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target) +static void ctcp_version_msg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target) { ctcp_print("CTCP VERSION", data, server, nick, addr, target); } -static void ctcp_time_msg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target) +static void ctcp_time_msg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target) { ctcp_print("CTCP TIME", data, server, nick, addr, target); } -static void ctcp_default_reply(const char *data, IRC_SERVER_REC *server, +static void ctcp_default_reply(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target) { @@ -89,7 +91,7 @@ static void ctcp_default_reply(const char *data, IRC_SERVER_REC *server, g_free(ctcp); } -static void ctcp_ping_reply(const char *data, IRC_SERVER_REC *server, +static void ctcp_ping_reply(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target) { @@ -100,7 +102,7 @@ static void ctcp_ping_reply(const char *data, IRC_SERVER_REC *server, if (sscanf(data, "%ld %ld", &tv2.tv_sec, &tv2.tv_usec) != 2) { char *tmp = g_strconcat("PING ", data, NULL); - ctcp_default_reply(tmp, server, nick, addr, target); + ctcp_default_reply(server, tmp, nick, addr, target); g_free(tmp); return; } diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c index e52453f0..c9ab96ec 100644 --- a/src/fe-common/irc/fe-events-numeric.c +++ b/src/fe-common/irc/fe-events-numeric.c @@ -32,12 +32,12 @@ #include "printtext.h" -static void event_received(const char *data, IRC_SERVER_REC *server); +static void event_received(IRC_SERVER_REC *server, const char *data); static char *last_away_nick = NULL; static char *last_away_msg = NULL; -static void event_user_mode(const char *data, IRC_SERVER_REC *server) +static void event_user_mode(IRC_SERVER_REC *server, const char *data) { char *params, *mode; @@ -50,7 +50,7 @@ static void event_user_mode(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_ison(const char *data, IRC_SERVER_REC *server) +static void event_ison(IRC_SERVER_REC *server, const char *data) { char *params, *online; @@ -62,7 +62,7 @@ static void event_ison(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_names_list(const char *data, IRC_SERVER_REC *server) +static void event_names_list(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *names; @@ -162,7 +162,7 @@ static void display_nicks(CHANNEL_REC *channel) channel->name, nicks, ops, voices, normal); } -static void event_end_of_names(const char *data, IRC_SERVER_REC *server) +static void event_end_of_names(IRC_SERVER_REC *server, const char *data) { char *params, *channel; IRC_CHANNEL_REC *chanrec; @@ -179,7 +179,7 @@ static void event_end_of_names(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_who(const char *data, IRC_SERVER_REC *server) +static void event_who(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *channel, *user, *host, *stat, *realname, *hops; @@ -199,7 +199,7 @@ static void event_who(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_end_of_who(const char *data, IRC_SERVER_REC *server) +static void event_end_of_who(IRC_SERVER_REC *server, const char *data) { char *params, *channel; @@ -210,7 +210,7 @@ static void event_end_of_who(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_ban_list(const char *data, IRC_SERVER_REC *server) +static void event_ban_list(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *ban, *setby, *tims; long secs; @@ -228,7 +228,7 @@ static void event_ban_list(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_eban_list(const char *data, IRC_SERVER_REC *server) +static void event_eban_list(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *ban, *setby, *tims; long secs; @@ -246,7 +246,7 @@ static void event_eban_list(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_silence_list(const char *data, IRC_SERVER_REC *server) +static void event_silence_list(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *mask; @@ -258,7 +258,7 @@ static void event_silence_list(const char *data, IRC_SERVER_REC *server) } -static void event_invite_list(const char *data, IRC_SERVER_REC *server) +static void event_invite_list(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *invite; @@ -269,7 +269,7 @@ static void event_invite_list(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_nick_in_use(const char *data, IRC_SERVER_REC *server) +static void event_nick_in_use(IRC_SERVER_REC *server, const char *data) { char *params, *nick; @@ -282,7 +282,7 @@ static void event_nick_in_use(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_topic_get(const char *data, IRC_SERVER_REC *server) +static void event_topic_get(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *topic; @@ -293,29 +293,31 @@ static void event_topic_get(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_topic_info(gchar *data, IRC_SERVER_REC *server) +static void event_topic_info(IRC_SERVER_REC *server, const char *data) { - gchar *params, *timestr, *channel, *topicby, *topictime; - glong ltime; - time_t t; - struct tm *tim; + char *params, *timestr, *channel, *topicby, *topictime; + struct tm *tm; + time_t t; - g_return_if_fail(data != NULL); + g_return_if_fail(data != NULL); + + params = event_get_params(data, 4, NULL, &channel, + &topicby, &topictime); - params = event_get_params(data, 4, NULL, &channel, &topicby, &topictime); + t = (time_t) atol(topictime); + tm = localtime(&t); - if (sscanf(topictime, "%lu", <ime) != 1) ltime = 0; /* topic set date */ - t = (time_t) ltime; - tim = localtime(&t); - timestr = g_strdup(asctime(tim)); - if (timestr[strlen(timestr)-1] == '\n') timestr[strlen(timestr)-1] = '\0'; + timestr = g_strdup(asctime(tm)); + if (timestr[strlen(timestr)-1] == '\n') + timestr[strlen(timestr)-1] = '\0'; - printformat(server, channel, MSGLEVEL_CRAP, IRCTXT_TOPIC_INFO, topicby, timestr); - g_free(timestr); - g_free(params); + printformat(server, channel, MSGLEVEL_CRAP, + IRCTXT_TOPIC_INFO, topicby, timestr); + g_free(timestr); + g_free(params); } -static void event_channel_mode(const char *data, IRC_SERVER_REC *server) +static void event_channel_mode(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *mode; @@ -327,39 +329,40 @@ static void event_channel_mode(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_channel_created(gchar *data, IRC_SERVER_REC *server) +static void event_channel_created(IRC_SERVER_REC *server, const char *data) { - gchar *params, *channel, *times, *timestr; - glong timeval; - time_t t; - struct tm *tim; + char *params, *channel, *createtime, *timestr; + time_t t; + struct tm *tm; - g_return_if_fail(data != NULL); + g_return_if_fail(data != NULL); + + params = event_get_params(data, 3, NULL, &channel, &createtime); - params = event_get_params(data, 3, NULL, &channel, ×); + t = (time_t) atol(createtime); + tm = localtime(&t); - if (sscanf(times, "%ld", &timeval) != 1) timeval = 0; - t = (time_t) timeval; - tim = localtime(&t); - timestr = g_strdup(asctime(tim)); - if (timestr[strlen(timestr)-1] == '\n') timestr[strlen(timestr)-1] = '\0'; + timestr = g_strdup(asctime(tm)); + if (timestr[strlen(timestr)-1] == '\n') + timestr[strlen(timestr)-1] = '\0'; - printformat(server, channel, MSGLEVEL_CRAP, IRCTXT_CHANNEL_CREATED, channel, timestr); - g_free(timestr); - g_free(params); + printformat(server, channel, MSGLEVEL_CRAP, + IRCTXT_CHANNEL_CREATED, channel, timestr); + g_free(timestr); + g_free(params); } -static void event_away(const char *data, IRC_SERVER_REC *server) +static void event_away(IRC_SERVER_REC *server, const char *data) { printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_AWAY); } -static void event_unaway(const char *data, IRC_SERVER_REC *server) +static void event_unaway(IRC_SERVER_REC *server, const char *data) { printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_UNAWAY); } -static void event_userhost(const char *data, IRC_SERVER_REC *server) +static void event_userhost(IRC_SERVER_REC *server, const char *data) { char *params, *hosts; @@ -370,7 +373,7 @@ static void event_userhost(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_sent_invite(const char *data, IRC_SERVER_REC *server) +static void event_sent_invite(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *channel; @@ -381,7 +384,7 @@ static void event_sent_invite(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_whois(const char *data, IRC_SERVER_REC *server) +static void event_whois(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *user, *host, *realname; @@ -392,7 +395,7 @@ static void event_whois(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_whois_idle(const char *data, IRC_SERVER_REC *server) +static void event_whois_idle(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *secstr, *signonstr, *rest; long days, hours, mins, secs; @@ -430,7 +433,7 @@ static void event_whois_idle(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_whois_server(const char *data, IRC_SERVER_REC *server) +static void event_whois_server(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *whoserver, *desc; @@ -441,7 +444,7 @@ static void event_whois_server(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_whois_oper(const char *data, IRC_SERVER_REC *server) +static void event_whois_oper(IRC_SERVER_REC *server, const char *data) { char *params, *nick; @@ -452,7 +455,7 @@ static void event_whois_oper(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_whois_registered(const char *data, IRC_SERVER_REC *server) +static void event_whois_registered(IRC_SERVER_REC *server, const char *data) { char *params, *nick; @@ -463,7 +466,7 @@ static void event_whois_registered(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_whowas(const char *data, IRC_SERVER_REC *server) +static void event_whowas(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *user, *host, *realname; @@ -474,7 +477,7 @@ static void event_whowas(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_whois_channels(const char *data, IRC_SERVER_REC *server) +static void event_whois_channels(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *chans; @@ -493,7 +496,7 @@ static void event_whois_channels(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_whois_away(const char *data, IRC_SERVER_REC *server) +static void event_whois_away(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *awaymsg; @@ -515,7 +518,7 @@ static void event_whois_away(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_end_of_whois(const char *data, IRC_SERVER_REC *server) +static void event_end_of_whois(IRC_SERVER_REC *server, const char *data) { char *params, *nick; @@ -526,7 +529,7 @@ static void event_end_of_whois(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_chanserv_url(const char *data, IRC_SERVER_REC *server) +static void event_chanserv_url(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *url; @@ -537,7 +540,7 @@ static void event_chanserv_url(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_end_of_whowas(const char *data, IRC_SERVER_REC *server) +static void event_end_of_whowas(IRC_SERVER_REC *server, const char *data) { char *params, *nick; @@ -548,7 +551,7 @@ static void event_end_of_whowas(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_target_unavailable(const char *data, IRC_SERVER_REC *server) +static void event_target_unavailable(IRC_SERVER_REC *server, const char *data) { char *params, *channel; IRC_CHANNEL_REC *chanrec; @@ -564,7 +567,7 @@ static void event_target_unavailable(const char *data, IRC_SERVER_REC *server) chanrec = irc_channel_find(server, channel); if (chanrec != NULL && chanrec->joined) { /* dalnet - can't change nick while being banned */ - event_received(data, server); + event_received(server, data); } else { /* channel is unavailable. */ printformat(server, NULL, MSGLEVEL_CRAP, @@ -575,7 +578,7 @@ static void event_target_unavailable(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_no_such_nick(const char *data, IRC_SERVER_REC *server) +static void event_no_such_nick(IRC_SERVER_REC *server, const char *data) { char *params, *nick; @@ -586,7 +589,7 @@ static void event_no_such_nick(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_no_such_channel(const char *data, IRC_SERVER_REC *server) +static void event_no_such_channel(IRC_SERVER_REC *server, const char *data) { char *params, *channel; @@ -597,7 +600,7 @@ static void event_no_such_channel(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void cannot_join(const char *data, IRC_SERVER_REC *server, int format) +static void cannot_join(IRC_SERVER_REC *server, const char *data, int format) { char *params, *channel; @@ -608,12 +611,12 @@ static void cannot_join(const char *data, IRC_SERVER_REC *server, int format) g_free(params); } -static void event_too_many_channels(const char *data, IRC_SERVER_REC *server) +static void event_too_many_channels(IRC_SERVER_REC *server, const char *data) { - cannot_join(data, server, IRCTXT_JOINERROR_TOOMANY); + cannot_join(server, data, IRCTXT_JOINERROR_TOOMANY); } -static void event_duplicate_channel(const char *data, IRC_SERVER_REC *server) +static void event_duplicate_channel(IRC_SERVER_REC *server, const char *data) { char *params, *channel, *p; @@ -633,32 +636,32 @@ static void event_duplicate_channel(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_channel_is_full(const char *data, IRC_SERVER_REC *server) +static void event_channel_is_full(IRC_SERVER_REC *server, const char *data) { - cannot_join(data, server, IRCTXT_JOINERROR_FULL); + cannot_join(server, data, IRCTXT_JOINERROR_FULL); } -static void event_invite_only(const char *data, IRC_SERVER_REC *server) +static void event_invite_only(IRC_SERVER_REC *server, const char *data) { - cannot_join(data, server, IRCTXT_JOINERROR_INVITE); + cannot_join(server, data, IRCTXT_JOINERROR_INVITE); } -static void event_banned(const char *data, IRC_SERVER_REC *server) +static void event_banned(IRC_SERVER_REC *server, const char *data) { - cannot_join(data, server, IRCTXT_JOINERROR_BANNED); + cannot_join(server, data, IRCTXT_JOINERROR_BANNED); } -static void event_bad_channel_key(const char *data, IRC_SERVER_REC *server) +static void event_bad_channel_key(IRC_SERVER_REC *server, const char *data) { - cannot_join(data, server, IRCTXT_JOINERROR_BAD_KEY); + cannot_join(server, data, IRCTXT_JOINERROR_BAD_KEY); } -static void event_bad_channel_mask(const char *data, IRC_SERVER_REC *server) +static void event_bad_channel_mask(IRC_SERVER_REC *server, const char *data) { - cannot_join(data, server, IRCTXT_JOINERROR_BAD_MASK); + cannot_join(server, data, IRCTXT_JOINERROR_BAD_MASK); } -static void event_unknown_mode(const char *data, IRC_SERVER_REC *server) +static void event_unknown_mode(IRC_SERVER_REC *server, const char *data) { char *params, *mode; @@ -669,7 +672,7 @@ static void event_unknown_mode(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_not_chanop(const char *data, IRC_SERVER_REC *server) +static void event_not_chanop(IRC_SERVER_REC *server, const char *data) { char *params, *channel; @@ -680,7 +683,7 @@ static void event_not_chanop(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_received(const char *data, IRC_SERVER_REC *server) +static void event_received(IRC_SERVER_REC *server, const char *data) { char *params, *args, *ptr; @@ -693,7 +696,7 @@ static void event_received(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void event_motd(const char *data, IRC_SERVER_REC *server) +static void event_motd(IRC_SERVER_REC *server, const char *data) { /* numeric event. */ char *params, *args, *ptr; diff --git a/src/fe-common/irc/fe-events.c b/src/fe-common/irc/fe-events.c index 140d5a2f..4ebc40b5 100644 --- a/src/fe-common/irc/fe-events.c +++ b/src/fe-common/irc/fe-events.c @@ -40,7 +40,7 @@ #include "completion.h" -static void event_privmsg(const char *data, IRC_SERVER_REC *server, +static void event_privmsg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { char *params, *target, *msg; @@ -60,7 +60,7 @@ static void event_privmsg(const char *data, IRC_SERVER_REC *server, /* we use "ctcp msg" here because "ctcp msg action" can be ignored with /IGNORE * CTCPS, and we don't want that.. */ -static void ctcp_msg_check_action(const char *data, IRC_SERVER_REC *server, +static void ctcp_msg_check_action(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target) { @@ -100,7 +100,7 @@ static void ctcp_msg_check_action(const char *data, IRC_SERVER_REC *server, } } -static void event_notice(const char *data, IRC_SERVER_REC *server, +static void event_notice(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { char *params, *target, *msg; @@ -142,7 +142,7 @@ static void event_notice(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_join(const char *data, IRC_SERVER_REC *server, +static void event_join(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { char *params, *channel, *tmp; @@ -157,7 +157,7 @@ static void event_join(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_part(const char *data, IRC_SERVER_REC *server, +static void event_part(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { char *params, *channel, *reason; @@ -170,7 +170,7 @@ static void event_part(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_quit(const char *data, IRC_SERVER_REC *server, +static void event_quit(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { g_return_if_fail(data != NULL); @@ -179,7 +179,7 @@ static void event_quit(const char *data, IRC_SERVER_REC *server, signal_emit("message quit", 4, server, nick, addr, data); } -static void event_kick(const char *data, IRC_SERVER_REC *server, +static void event_kick(IRC_SERVER_REC *server, const char *data, const char *kicker, const char *addr) { char *params, *channel, *nick, *reason; @@ -193,7 +193,7 @@ static void event_kick(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_kill(const char *data, IRC_SERVER_REC *server, +static void event_kill(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { char *params, *path, *reason; @@ -225,7 +225,7 @@ static void event_kill(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_nick(const char *data, IRC_SERVER_REC *server, +static void event_nick(IRC_SERVER_REC *server, const char *data, const char *sender, const char *addr) { char *params, *newnick; @@ -241,7 +241,7 @@ static void event_nick(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_mode(const char *data, IRC_SERVER_REC *server, +static void event_mode(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { char *params, *channel, *mode; @@ -256,7 +256,7 @@ static void event_mode(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_pong(const char *data, IRC_SERVER_REC *server, const char *nick) +static void event_pong(IRC_SERVER_REC *server, const char *data, const char *nick) { char *params, *host, *reply; @@ -268,7 +268,7 @@ static void event_pong(const char *data, IRC_SERVER_REC *server, const char *nic g_free(params); } -static void event_invite(const char *data, IRC_SERVER_REC *server, +static void event_invite(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { char *params, *channel; @@ -280,7 +280,7 @@ static void event_invite(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_topic(const char *data, IRC_SERVER_REC *server, +static void event_topic(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { char *params, *channel, *topic; @@ -293,7 +293,7 @@ static void event_topic(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_error(const char *data, IRC_SERVER_REC *server) +static void event_error(IRC_SERVER_REC *server, const char *data) { g_return_if_fail(data != NULL); @@ -301,7 +301,7 @@ static void event_error(const char *data, IRC_SERVER_REC *server) printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_ERROR, data); } -static void event_wallops(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr) +static void event_wallops(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { g_return_if_fail(data != NULL); @@ -324,7 +324,7 @@ static void event_wallops(const char *data, IRC_SERVER_REC *server, const char * } } -static void event_silence(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr) +static void event_silence(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr) { g_return_if_fail(data != NULL); @@ -365,7 +365,7 @@ static void event_connected(IRC_SERVER_REC *server) } -static void event_nickfind_whois(const char *data, IRC_SERVER_REC *server) +static void event_nickfind_whois(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *user, *host, *realname; @@ -410,7 +410,7 @@ static void event_ban_type_changed(const char *bantype) } } -static void sig_whois_event_no_server(const char *data, IRC_SERVER_REC *server) +static void sig_whois_event_no_server(IRC_SERVER_REC *server, const char *data) { char *params, *nick; @@ -421,7 +421,7 @@ static void sig_whois_event_no_server(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void sig_whowas_event_end(const char *data, IRC_SERVER_REC *server, +static void sig_whowas_event_end(IRC_SERVER_REC *server, const char *data, const char *sender, const char *addr) { char *params, *nick; @@ -429,7 +429,7 @@ static void sig_whowas_event_end(const char *data, IRC_SERVER_REC *server, g_return_if_fail(data != NULL); if (server->whowas_found) { - signal_emit("event 369", 4, data, server, sender, addr); + signal_emit("event 369", 4, server, data, sender, addr); return; } @@ -438,7 +438,8 @@ static void sig_whowas_event_end(const char *data, IRC_SERVER_REC *server, g_free(params); } -static void event_received(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr) +static void event_received(IRC_SERVER_REC *server, const char *data, + const char *nick, const char *addr) { char *params, *cmd, *args, *ptr; |