summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-12-05 21:12:52 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-12-05 21:12:52 +0000
commit9f2f1dc70a7ed6495cf511249f3b9095fb40c38a (patch)
treeb54494da367fdeb1c4f3e90b559da6615b58e370
parent346808789cfd3556b8caf263bdd81982d6081296 (diff)
downloadirssi-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
-rw-r--r--src/core/expandos.h1
-rw-r--r--src/fe-common/irc/fe-ctcp.c18
-rw-r--r--src/fe-common/irc/fe-events-numeric.c165
-rw-r--r--src/fe-common/irc/fe-events.c43
-rw-r--r--src/irc/bot/bot-events.c2
-rw-r--r--src/irc/bot/bot-irc-commands.c10
-rw-r--r--src/irc/core/channel-events.c22
-rw-r--r--src/irc/core/channel-rejoin.c2
-rw-r--r--src/irc/core/channels-query.c15
-rw-r--r--src/irc/core/ctcp.c27
-rw-r--r--src/irc/core/irc-commands.c12
-rw-r--r--src/irc/core/irc-expandos.c6
-rw-r--r--src/irc/core/irc-log.c4
-rw-r--r--src/irc/core/irc-nicklist.c24
-rw-r--r--src/irc/core/irc-queries.c4
-rw-r--r--src/irc/core/irc-servers-reconnect.c2
-rw-r--r--src/irc/core/irc-servers.c10
-rw-r--r--src/irc/core/irc.c4
-rw-r--r--src/irc/core/lag.c4
-rw-r--r--src/irc/core/massjoin.c8
-rw-r--r--src/irc/core/mode-lists.c6
-rw-r--r--src/irc/core/modes.c8
-rw-r--r--src/irc/core/netsplit.c6
-rw-r--r--src/irc/dcc/dcc-chat.c8
-rw-r--r--src/irc/dcc/dcc-files.c8
-rw-r--r--src/irc/dcc/dcc.c14
-rw-r--r--src/irc/dcc/dcc.h6
-rw-r--r--src/irc/flood/flood.c9
-rw-r--r--src/irc/notifylist/notify-ison.c2
-rw-r--r--src/irc/notifylist/notify-whois.c10
-rw-r--r--src/irc/notifylist/notifylist.c9
-rw-r--r--src/irc/proxy/listen.c2
32 files changed, 246 insertions, 225 deletions
diff --git a/src/core/expandos.h b/src/core/expandos.h
index 3667449f..2ce00ecc 100644
--- a/src/core/expandos.h
+++ b/src/core/expandos.h
@@ -7,7 +7,6 @@
typedef enum {
EXPANDO_ARG_NONE,
EXPANDO_ARG_SERVER,
- EXPANDO_ARG_SERVER2, /* second argument.. */
EXPANDO_ARG_WINDOW,
EXPANDO_ARG_WINDOW_ITEM,
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", &ltime) != 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, &times);
+ 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;
diff --git a/src/irc/bot/bot-events.c b/src/irc/bot/bot-events.c
index 5a7fd84d..4268c239 100644
--- a/src/irc/bot/bot-events.c
+++ b/src/irc/bot/bot-events.c
@@ -167,7 +167,7 @@ static void parse_channel_mode(IRC_CHANNEL_REC *channel, const char *mode,
g_string_free(str, TRUE);
}
-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 *address)
{
IRC_CHANNEL_REC *chanrec;
diff --git a/src/irc/bot/bot-irc-commands.c b/src/irc/bot/bot-irc-commands.c
index 5713ccca..b7088b7b 100644
--- a/src/irc/bot/bot-irc-commands.c
+++ b/src/irc/bot/bot-irc-commands.c
@@ -31,7 +31,7 @@
#include "bot-users.h"
#include "botnet-users.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 *address)
{
char *params, *target, *msg, *args, *str;
@@ -50,7 +50,7 @@ static void event_privmsg(const char *data, IRC_SERVER_REC *server,
if (args != NULL) *args++ = '\0'; else args = "";
g_strdown(str);
- if (signal_emit(str, 4, args, server, nick, address)) {
+ if (signal_emit(str, 4, server, args, nick, address)) {
/* msg was a command - the msg event. */
signal_stop();
}
@@ -58,7 +58,7 @@ static void event_privmsg(const char *data, IRC_SERVER_REC *server,
g_free(params);
}
-static void botcmd_op(const char *data, IRC_SERVER_REC *server,
+static void botcmd_op(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *address)
{
CHANNEL_REC *channel;
@@ -90,7 +90,7 @@ static void botcmd_op(const char *data, IRC_SERVER_REC *server,
}
}
-static void botcmd_ident(const char *data, IRC_SERVER_REC *server,
+static void botcmd_ident(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *address)
{
USER_REC *user;
@@ -118,7 +118,7 @@ static void botcmd_ident(const char *data, IRC_SERVER_REC *server,
g_free(mask);
}
-static void botcmd_pass(const char *data, IRC_SERVER_REC *server,
+static void botcmd_pass(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *address)
{
USER_REC *user;
diff --git a/src/irc/core/channel-events.c b/src/irc/core/channel-events.c
index 9714b38e..e6c1839c 100644
--- a/src/irc/core/channel-events.c
+++ b/src/irc/core/channel-events.c
@@ -25,7 +25,7 @@
#include "irc.h"
#include "irc-channels.h"
-static void event_cannot_join(const char *data, IRC_SERVER_REC *server)
+static void event_cannot_join(IRC_SERVER_REC *server, const char *data)
{
CHANNEL_REC *chanrec;
char *params, *channel;
@@ -54,7 +54,7 @@ static void event_cannot_join(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_duplicate_channel(const char *data, IRC_SERVER_REC *server)
+static void event_duplicate_channel(IRC_SERVER_REC *server, const char *data)
{
CHANNEL_REC *chanrec;
char *params, *channel, *p;
@@ -78,7 +78,7 @@ static void event_duplicate_channel(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;
@@ -87,7 +87,7 @@ static void event_target_unavailable(const char *data, IRC_SERVER_REC *server)
params = event_get_params(data, 2, NULL, &channel);
if (ischannel(*channel)) {
/* channel is unavailable - try to join again a bit later */
- event_cannot_join(data, server);
+ event_cannot_join(server, data);
}
g_free(params);
@@ -115,7 +115,7 @@ static void channel_change_topic(IRC_SERVER_REC *server, const char *channel,
signal_emit("channel topic changed", 1, chanrec);
}
-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;
@@ -126,7 +126,7 @@ static void event_topic_get(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)
{
char *params, *channel, *topic;
@@ -138,7 +138,7 @@ static void event_topic(const char *data, IRC_SERVER_REC *server,
g_free(params);
}
-static void event_topic_info(const char *data, IRC_SERVER_REC *server)
+static void event_topic_info(IRC_SERVER_REC *server, const char *data)
{
char *params, *channel, *topicby, *topictime;
time_t t;
@@ -176,7 +176,7 @@ static IRC_CHANNEL_REC *channel_find_unjoined(IRC_SERVER_REC *server,
return NULL;
}
-static void event_join(const char *data, IRC_SERVER_REC *server, const char *nick, const char *address)
+static void event_join(IRC_SERVER_REC *server, const char *data, const char *nick, const char *address)
{
char *params, *channel, *tmp;
IRC_CHANNEL_REC *chanrec;
@@ -233,7 +233,7 @@ static void event_join(const char *data, IRC_SERVER_REC *server, const char *nic
g_free(params);
}
-static void event_part(const char *data, IRC_SERVER_REC *server, const char *nick)
+static void event_part(IRC_SERVER_REC *server, const char *data, const char *nick)
{
char *params, *channel, *reason;
CHANNEL_REC *chanrec;
@@ -256,7 +256,7 @@ static void event_part(const char *data, IRC_SERVER_REC *server, const char *nic
g_free(params);
}
-static void event_kick(const char *data, IRC_SERVER_REC *server)
+static void event_kick(IRC_SERVER_REC *server, const char *data)
{
CHANNEL_REC *chanrec;
char *params, *channel, *nick, *reason;
@@ -280,7 +280,7 @@ static void event_kick(const char *data, IRC_SERVER_REC *server)
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)
{
char *params, *channel;
diff --git a/src/irc/core/channel-rejoin.c b/src/irc/core/channel-rejoin.c
index 4114c065..0b7fb955 100644
--- a/src/irc/core/channel-rejoin.c
+++ b/src/irc/core/channel-rejoin.c
@@ -102,7 +102,7 @@ static void channel_rejoin(IRC_SERVER_REC *server, const char *channel)
channel_destroy(CHANNEL(chanrec));
}
-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;
diff --git a/src/irc/core/channels-query.c b/src/irc/core/channels-query.c
index 2283fdad..b338a0eb 100644
--- a/src/irc/core/channels-query.c
+++ b/src/irc/core/channels-query.c
@@ -396,7 +396,8 @@ static void channel_got_query(IRC_SERVER_REC *server, IRC_CHANNEL_REC *chanrec,
channels_query_check(server);
}
-static void event_channel_mode(char *data, IRC_SERVER_REC *server, const char *nick)
+static void event_channel_mode(IRC_SERVER_REC *server, const char *data,
+ const char *nick)
{
IRC_CHANNEL_REC *chanrec;
char *params, *channel, *mode;
@@ -420,7 +421,7 @@ static void multi_query_remove(IRC_SERVER_REC *server, const char *event, const
server_redirect_remove_next((SERVER_REC *) server, event, queue);
}
-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)
{
IRC_CHANNEL_REC *chanrec;
NICK_REC *nick;
@@ -474,7 +475,7 @@ static void event_end_of_who(const char *data, IRC_SERVER_REC *server)
}
}
-static void event_end_of_banlist(const char *data, IRC_SERVER_REC *server)
+static void event_end_of_banlist(IRC_SERVER_REC *server, const char *data)
{
IRC_CHANNEL_REC *chanrec;
char *params, *channel;
@@ -489,7 +490,7 @@ static void event_end_of_banlist(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_end_of_ebanlist(const char *data, IRC_SERVER_REC *server)
+static void event_end_of_ebanlist(IRC_SERVER_REC *server, const char *data)
{
IRC_CHANNEL_REC *chanrec;
char *params, *channel;
@@ -504,7 +505,7 @@ static void event_end_of_ebanlist(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_end_of_invitelist(const char *data, IRC_SERVER_REC *server)
+static void event_end_of_invitelist(IRC_SERVER_REC *server, const char *data)
{
IRC_CHANNEL_REC *chanrec;
char *params, *channel;
@@ -557,7 +558,7 @@ static void multi_command_error(IRC_SERVER_REC *server, const char *data,
channels_query_check(server);
}
-static void event_mode_abort(const char *data, IRC_SERVER_REC *server)
+static void event_mode_abort(IRC_SERVER_REC *server, const char *data)
{
char *params, *channel;
@@ -576,7 +577,7 @@ static void event_mode_abort(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_who_abort(const char *data, IRC_SERVER_REC *server)
+static void event_who_abort(IRC_SERVER_REC *server, const char *data)
{
char *params, *channel;
diff --git a/src/irc/core/ctcp.c b/src/irc/core/ctcp.c
index 3072e2f4..3eb140f7 100644
--- a/src/irc/core/ctcp.c
+++ b/src/irc/core/ctcp.c
@@ -63,7 +63,7 @@ void ctcp_send_reply(IRC_SERVER_REC *server, const char *data)
}
/* CTCP ping */
-static void ctcp_ping(const char *data, IRC_SERVER_REC *server,
+static void ctcp_ping(IRC_SERVER_REC *server, const char *data,
const char *nick)
{
char *str;
@@ -78,7 +78,7 @@ static void ctcp_ping(const char *data, IRC_SERVER_REC *server,
}
/* CTCP version */
-static void ctcp_version(const char *data, IRC_SERVER_REC *server,
+static void ctcp_version(IRC_SERVER_REC *server, const char *data,
const char *nick)
{
char *str, *reply;
@@ -95,7 +95,8 @@ static void ctcp_version(const char *data, IRC_SERVER_REC *server,
}
/* CTCP version */
-static void ctcp_time(const char *data, IRC_SERVER_REC *server, const char *nick)
+static void ctcp_time(IRC_SERVER_REC *server, const char *data,
+ const char *nick)
{
char *str, *reply;
struct tm *tm;
@@ -115,7 +116,7 @@ static void ctcp_time(const char *data, IRC_SERVER_REC *server, const char *nick
g_free(reply);
}
-static void ctcp_msg(const char *data, IRC_SERVER_REC *server,
+static void ctcp_msg(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *addr, const char *target)
{
char *args, *str;
@@ -128,14 +129,14 @@ static void ctcp_msg(const char *data, IRC_SERVER_REC *server,
if (args != NULL) *args++ = '\0'; else args = "";
g_strdown(str+9);
- if (!signal_emit(str, 5, args, server, nick, addr, target)) {
+ if (!signal_emit(str, 5, server, args, nick, addr, target)) {
signal_emit("default ctcp msg", 5,
- data, server, nick, addr, target);
+ server, data, nick, addr, target);
}
g_free(str);
}
-static void ctcp_reply(const char *data, IRC_SERVER_REC *server,
+static void ctcp_reply(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *addr, const char *target)
{
char *args, *str;
@@ -148,14 +149,14 @@ static void ctcp_reply(const char *data, IRC_SERVER_REC *server,
if (args != NULL) *args++ = '\0'; else args = "";
g_strdown(str+11);
- if (!signal_emit(str, 5, args, server, nick, addr, target)) {
+ if (!signal_emit(str, 5, server, args, nick, addr, target)) {
signal_emit("default ctcp reply", 5,
- data, server, nick, addr, target);
+ server, data, nick, addr, target);
}
g_free(str);
}
-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, *ptr;
@@ -170,14 +171,14 @@ static void event_privmsg(const char *data, IRC_SERVER_REC *server,
ptr = strrchr(++msg, 1);
if (ptr != NULL) *ptr = '\0';
- signal_emit("ctcp msg", 5, msg, server, nick, addr, target);
+ signal_emit("ctcp msg", 5, server, msg, nick, addr, target);
signal_stop();
}
g_free(params);
}
-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, *ptr, *msg;
@@ -191,7 +192,7 @@ static void event_notice(const char *data, IRC_SERVER_REC *server,
ptr = strrchr(++msg, 1);
if (ptr != NULL) *ptr = '\0';
- signal_emit("ctcp reply", 5, msg, server, nick, addr, target);
+ signal_emit("ctcp reply", 5, server, msg, nick, addr, target);
signal_stop();
}
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c
index 951ce1bb..cf127908 100644
--- a/src/irc/core/irc-commands.c
+++ b/src/irc/core/irc-commands.c
@@ -472,7 +472,7 @@ static void cmd_nick(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item
cmd_params_free(free_arg);
}
-static void sig_nickchange_over(const char *data, IRC_SERVER_REC *server,
+static void sig_nickchange_over(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *addr)
{
char *signal;
@@ -481,7 +481,7 @@ static void sig_nickchange_over(const char *data, IRC_SERVER_REC *server,
signal = g_strconcat("event ", current_server_event, NULL);
g_strdown(signal+6);
- signal_emit(signal, 4, data, server, nick, addr);
+ signal_emit(signal, 4, server, data, nick, addr);
g_free(signal);
}
@@ -558,11 +558,11 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server,
cmd_params_free(free_arg);
}
-static void event_whois(const char *data, IRC_SERVER_REC *server,
+static void event_whois(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *addr)
{
server->whois_found = TRUE;
- signal_emit("event 311", 4, data, server, nick, addr);
+ signal_emit("event 311", 4, server, data, nick, addr);
}
static void sig_whois_not_found(const char *data, IRC_SERVER_REC *server)
@@ -582,10 +582,10 @@ static void sig_whois_not_found(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_whowas(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr)
+static void event_whowas(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr)
{
server->whowas_found = TRUE;
- signal_emit("event 314", 4, data, server, nick, addr);
+ signal_emit("event 314", 4, server, data, nick, addr);
}
/* SYNTAX: WHOWAS [<nicks> [<count>]] */
diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c
index 3f71a6a1..fba3a20a 100644
--- a/src/irc/core/irc-expandos.c
+++ b/src/irc/core/irc-expandos.c
@@ -75,7 +75,7 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret)
return g_strconcat(username, "@", hostname, NULL);;
}
-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 *address)
{
g_return_if_fail(nick != NULL);
@@ -91,7 +91,7 @@ void irc_expandos_init(void)
last_join = NULL;
expando_create(":", expando_lastjoin,
- "event join", EXPANDO_ARG_SERVER2, NULL);
+ "event join", EXPANDO_ARG_SERVER, NULL);
expando_create("H", expando_server_numeric,
"server event", EXPANDO_ARG_SERVER, NULL);
expando_create("S", expando_servername,
@@ -101,7 +101,7 @@ void irc_expandos_init(void)
"window changed", EXPANDO_ARG_NONE,
"window server changed", EXPANDO_ARG_WINDOW, NULL);
- expando_add_signal("I", "event invite", EXPANDO_ARG_SERVER2);
+ expando_add_signal("I", "event invite", EXPANDO_ARG_SERVER);
signal_add("event join", (SIGNAL_FUNC) event_join);
}
diff --git a/src/irc/core/irc-log.c b/src/irc/core/irc-log.c
index cfb5afb8..2b23bdf8 100644
--- a/src/irc/core/irc-log.c
+++ b/src/irc/core/irc-log.c
@@ -37,7 +37,7 @@ static void sig_log_written(LOG_REC *log)
away_msgs++;
}
-static void event_away(const char *data, IRC_SERVER_REC *server)
+static void event_away(IRC_SERVER_REC *server, const char *data)
{
const char *fname, *levelstr;
LOG_REC *log;
@@ -71,7 +71,7 @@ static void event_away(const char *data, IRC_SERVER_REC *server)
away_msgs = 0;
}
-static void event_unaway(const char *data, IRC_SERVER_REC *server)
+static void event_unaway(IRC_SERVER_REC *server, const char *data)
{
const char *fname;
LOG_REC *log;
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c
index 9b8de036..036a3e9f 100644
--- a/src/irc/core/irc-nicklist.c
+++ b/src/irc/core/irc-nicklist.c
@@ -53,7 +53,7 @@ char *irc_nick_strip(const char *nick)
return stripped;
}
-static void event_names_list(const char *data, SERVER_REC *server)
+static void event_names_list(SERVER_REC *server, const char *data)
{
CHANNEL_REC *chanrec;
char *params, *type, *channel, *names, *ptr;
@@ -95,7 +95,7 @@ static void event_names_list(const char *data, SERVER_REC *server)
g_free(params);
}
-static void event_end_of_names(const char *data, SERVER_REC *server)
+static void event_end_of_names(SERVER_REC *server, const char *data)
{
char *params, *channel;
IRC_CHANNEL_REC *chanrec;
@@ -113,7 +113,7 @@ static void event_end_of_names(const char *data, SERVER_REC *server)
g_free(params);
}
-static void event_who(const char *data, SERVER_REC *server)
+static void event_who(SERVER_REC *server, const char *data)
{
char *params, *nick, *channel, *user, *host, *stat, *realname, *hops;
CHANNEL_REC *chanrec;
@@ -149,7 +149,7 @@ static void event_who(const char *data, 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, *realname;
GSList *nicks, *tmp;
@@ -179,7 +179,7 @@ static void event_whois(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_whois_away(const char *data, SERVER_REC *server)
+static void event_whois_away(SERVER_REC *server, const char *data)
{
char *params, *nick, *awaymsg;
@@ -191,7 +191,7 @@ static void event_whois_away(const char *data, SERVER_REC *server)
g_free(params);
}
-static void event_whois_ircop(const char *data, SERVER_REC *server)
+static void event_whois_ircop(SERVER_REC *server, const char *data)
{
char *params, *nick, *awaymsg;
@@ -203,12 +203,12 @@ static void event_whois_ircop(const char *data, 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)
{
server->whois_coming = FALSE;
}
-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 *str;
int n;
@@ -251,7 +251,7 @@ static void event_nick_in_use(const char *data, IRC_SERVER_REC *server)
irc_send_cmdv(server, "NICK %s", server->nick);
}
-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;
@@ -260,13 +260,13 @@ static void event_target_unavailable(const char *data, IRC_SERVER_REC *server)
params = event_get_params(data, 2, NULL, &channel);
if (!ischannel(*channel)) {
/* nick is unavailable. */
- event_nick_in_use(data, server);
+ event_nick_in_use(server, data);
}
g_free(params);
}
-static void event_nick(const char *data, SERVER_REC *server,
+static void event_nick(SERVER_REC *server, const char *data,
const char *orignick)
{
IRC_CHANNEL_REC *channel;
@@ -308,7 +308,7 @@ static void event_nick(const char *data, SERVER_REC *server,
g_free(params);
}
-static void event_userhost(const char *data, SERVER_REC *server)
+static void event_userhost(SERVER_REC *server, const char *data)
{
char *params, *hosts, **phosts, **pos, *ptr;
diff --git a/src/irc/core/irc-queries.c b/src/irc/core/irc-queries.c
index 6d16a030..9314aaab 100644
--- a/src/irc/core/irc-queries.c
+++ b/src/irc/core/irc-queries.c
@@ -56,7 +56,7 @@ static void sig_query_create(QUERY_REC **query,
signal_stop();
}
-static void event_privmsg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr)
+static void event_privmsg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr)
{
char *params, *target, *msg;
QUERY_REC *query;
@@ -79,7 +79,7 @@ static void event_privmsg(const char *data, IRC_SERVER_REC *server, const char *
g_free(params);
}
-static void event_nick(const char *data, IRC_SERVER_REC *server, const char *orignick)
+static void event_nick(IRC_SERVER_REC *server, const char *data, const char *orignick)
{
char *params, *nick;
GSList *tmp;
diff --git a/src/irc/core/irc-servers-reconnect.c b/src/irc/core/irc-servers-reconnect.c
index 2280cc0e..16adee12 100644
--- a/src/irc/core/irc-servers-reconnect.c
+++ b/src/irc/core/irc-servers-reconnect.c
@@ -101,7 +101,7 @@ static void sig_connected(IRC_SERVER_REC *server)
}
}
-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)
{
time_t new_connect;
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c
index fb2c97a3..ef3b328a 100644
--- a/src/irc/core/irc-servers.c
+++ b/src/irc/core/irc-servers.c
@@ -352,7 +352,7 @@ static int sig_set_user_mode(IRC_SERVER_REC *server)
return 0;
}
-static void event_connected(const char *data, IRC_SERVER_REC *server, const char *from)
+static void event_connected(IRC_SERVER_REC *server, const char *data, const char *from)
{
char *params, *nick;
const char *mode;
@@ -389,7 +389,7 @@ static void event_connected(const char *data, IRC_SERVER_REC *server, const char
g_free(params);
}
-static void event_server_info(const char *data, IRC_SERVER_REC *server)
+static void event_server_info(IRC_SERVER_REC *server, const char *data)
{
char *params, *ircd_version, *usermodes, *chanmodes;
@@ -408,14 +408,14 @@ static void event_server_info(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_server_banned(const char *data, IRC_SERVER_REC *server)
+static void event_server_banned(IRC_SERVER_REC *server, const char *data)
{
g_return_if_fail(server != NULL);
server->banned = TRUE;
}
-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(server != NULL);
@@ -424,7 +424,7 @@ static void event_error(const char *data, IRC_SERVER_REC *server)
server->banned = TRUE;
}
-static void event_ping(const char *data, IRC_SERVER_REC *server)
+static void event_ping(IRC_SERVER_REC *server, const char *data)
{
char *str;
diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c
index 465a78e9..fece504c 100644
--- a/src/irc/core/irc.c
+++ b/src/irc/core/irc.c
@@ -265,8 +265,8 @@ static void irc_server_event(IRC_SERVER_REC *server, const char *line, const cha
current_server_event = event+6;
g_strdown(callcmd);
- if (!signal_emit(callcmd, 4, args, server, nick, address))
- signal_emit_id(signal_default_event, 4, line, server, nick, address);
+ if (!signal_emit(callcmd, 4, server, args, nick, address))
+ signal_emit_id(signal_default_event, 4, server, line, nick, address);
current_server_event = NULL;
g_free(callcmd);
diff --git a/src/irc/core/lag.c b/src/irc/core/lag.c
index 2107801d..8b934dd7 100644
--- a/src/irc/core/lag.c
+++ b/src/irc/core/lag.c
@@ -81,7 +81,9 @@ static void lag_get(IRC_SERVER_REC *server)
/* we use "ctcp reply" signal here, because "ctcp reply irssilag" can be
ignored with /IGNORE * CTCPS */
-static void sig_irssilag(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target)
+static void sig_irssilag(IRC_SERVER_REC *server, const char *data,
+ const char *nick, const char *addr,
+ const char *target)
{
GTimeVal now, sent;
LAG_REC *lag;
diff --git a/src/irc/core/massjoin.c b/src/irc/core/massjoin.c
index a1ffb0b1..701d2a33 100644
--- a/src/irc/core/massjoin.c
+++ b/src/irc/core/massjoin.c
@@ -33,7 +33,7 @@ static int massjoin_max_joins;
/* Massjoin support - really useful when trying to do things (like op/deop)
to people after netjoins. It sends
"massjoin #channel nick!user@host nick2!user@host ..." signals */
-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 *address)
{
char *params, *channel, *ptr;
@@ -87,7 +87,7 @@ static void event_join(const char *data, IRC_SERVER_REC *server,
chanrec->massjoins++;
}
-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;
@@ -123,7 +123,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)
{
IRC_CHANNEL_REC *channel;
@@ -153,7 +153,7 @@ static void event_quit(const char *data, IRC_SERVER_REC *server,
g_slist_free(nicks);
}
-static void event_kick(const char *data, IRC_SERVER_REC *server)
+static void event_kick(IRC_SERVER_REC *server, const char *data)
{
char *params, *channel, *nick, *reason;
IRC_CHANNEL_REC *chanrec;
diff --git a/src/irc/core/mode-lists.c b/src/irc/core/mode-lists.c
index 5f9b5977..50d57b3a 100644
--- a/src/irc/core/mode-lists.c
+++ b/src/irc/core/mode-lists.c
@@ -169,7 +169,7 @@ static void channel_destroyed(IRC_CHANNEL_REC *channel)
invitelist_free(channel);
}
-static void event_banlist(const char *data, IRC_SERVER_REC *server)
+static void event_banlist(IRC_SERVER_REC *server, const char *data)
{
IRC_CHANNEL_REC *chanrec;
char *params, *channel, *ban, *setby, *tims;
@@ -186,7 +186,7 @@ static void event_banlist(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_ebanlist(const char *data, IRC_SERVER_REC *server)
+static void event_ebanlist(IRC_SERVER_REC *server, const char *data)
{
IRC_CHANNEL_REC *chanrec;
char *params, *channel, *ban, *setby, *tims;
@@ -203,7 +203,7 @@ static void event_ebanlist(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
-static void event_invite_list(const char *data, IRC_SERVER_REC *server)
+static void event_invite_list(IRC_SERVER_REC *server, const char *data)
{
IRC_CHANNEL_REC *chanrec;
char *params, *channel, *invite;
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c
index 5db9084d..a0f7118c 100644
--- a/src/irc/core/modes.c
+++ b/src/irc/core/modes.c
@@ -352,7 +352,7 @@ static void parse_user_mode(IRC_SERVER_REC *server, const char *modestr)
g_free_not_null(oldmode);
}
-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, *nick, *mode;
@@ -364,7 +364,7 @@ static void event_user_mode(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)
{
IRC_CHANNEL_REC *chanrec;
@@ -388,7 +388,7 @@ static void event_mode(const char *data, IRC_SERVER_REC *server,
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)
{
g_return_if_fail(server != NULL);
@@ -396,7 +396,7 @@ static void event_away(const char *data, IRC_SERVER_REC *server)
signal_emit("away mode changed", 1, server);
}
-static void event_unaway(const char *data, IRC_SERVER_REC *server)
+static void event_unaway(IRC_SERVER_REC *server, const char *data)
{
g_return_if_fail(server != NULL);
diff --git a/src/irc/core/netsplit.c b/src/irc/core/netsplit.c
index 5eeb5503..3abd1717 100644
--- a/src/irc/core/netsplit.c
+++ b/src/irc/core/netsplit.c
@@ -261,7 +261,7 @@ static void split_set_timeout(void *key, NETSPLIT_REC *rec, NETSPLIT_REC *orig)
rec->destroy = time(NULL)+60;
}
-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 *address)
{
NETSPLIT_REC *rec;
@@ -283,7 +283,7 @@ static void event_join(const char *data, IRC_SERVER_REC *server,
/* remove the nick from netsplit, but do it last so that other "event join"
signal handlers can check if the join was a netjoin */
-static void event_join_last(const char *data, IRC_SERVER_REC *server,
+static void event_join_last(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *address)
{
NETSPLIT_REC *rec;
@@ -295,7 +295,7 @@ static void event_join_last(const char *data, IRC_SERVER_REC *server,
}
}
-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 *address)
{
g_return_if_fail(data != NULL);
diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c
index e37217f1..f78485f2 100644
--- a/src/irc/dcc/dcc-chat.c
+++ b/src/irc/dcc/dcc-chat.c
@@ -93,7 +93,7 @@ static void cmd_me(const char *data, IRC_SERVER_REC *server, QUERY_REC *item)
if (dcc == NULL) return;
str = g_strdup_printf("ACTION %s", data);
- dcc_ctcp_message(dcc->nick, NULL, dcc, FALSE, str);
+ dcc_ctcp_message(NULL, dcc->nick, dcc, FALSE, str);
g_free(str);
signal_stop();
@@ -119,7 +119,7 @@ static void cmd_action(const char *data, IRC_SERVER_REC *server)
dcc = dcc_find_item(DCC_TYPE_CHAT, target+1, NULL);
if (dcc != NULL) {
str = g_strdup_printf("ACTION %s", text);
- dcc_ctcp_message(dcc->nick, NULL, dcc, FALSE, str);
+ dcc_ctcp_message(NULL, dcc->nick, dcc, FALSE, str);
g_free(str);
}
@@ -151,7 +151,7 @@ static void cmd_ctcp(const char *data, IRC_SERVER_REC *server)
g_strup(ctcpcmd);
str = g_strdup_printf("%s %s", ctcpcmd, ctcpdata);
- dcc_ctcp_message(dcc->nick, NULL, dcc, FALSE, str);
+ dcc_ctcp_message(NULL, dcc->nick, dcc, FALSE, str);
g_free(str);
}
@@ -375,7 +375,7 @@ static void dcc_ctcp_redirect(gchar *msg, DCC_REC *dcc)
g_return_if_fail(msg != NULL);
g_return_if_fail(dcc != NULL);
- signal_emit("ctcp msg dcc", 6, msg, dcc->server, dcc->nick, "dcc", dcc->mynick, dcc);
+ signal_emit("ctcp msg dcc", 6, dcc->server, msg, dcc->nick, "dcc", dcc->mynick, dcc);
}
void dcc_chat_init(void)
diff --git a/src/irc/dcc/dcc-files.c b/src/irc/dcc/dcc-files.c
index fa059f89..04e393d7 100644
--- a/src/irc/dcc/dcc-files.c
+++ b/src/irc/dcc/dcc-files.c
@@ -253,7 +253,7 @@ static void dcc_resume_send(DCC_REC *dcc, int port)
str = g_strdup_printf("DCC ACCEPT %s %d %lu",
dcc->arg, port, dcc->transfd);
- dcc_ctcp_message(dcc->nick, dcc->server, dcc->chat, FALSE, str);
+ dcc_ctcp_message(dcc->server, dcc->nick, dcc->chat, FALSE, str);
g_free(str);
}
@@ -270,7 +270,7 @@ static void dcc_resume_send(DCC_REC *dcc, int port)
((dcc)->type == DCC_TYPE_GET && \
(dcc)->get_type == DCC_GET_RESUME && (dcc)->handle == NULL))
-static void dcc_ctcp_msg(const char *data, IRC_SERVER_REC *server,
+static void dcc_ctcp_msg(IRC_SERVER_REC *server, const char *data,
const char *sender, const char *sendaddr,
const char *target, DCC_REC *chat)
{
@@ -335,7 +335,7 @@ static void dcc_resume_rec(DCC_REC *dcc)
str = g_strdup_printf("DCC RESUME %s %d %lu",
dcc->arg, dcc->port, dcc->transfd);
- dcc_ctcp_message(dcc->nick, dcc->server, dcc->chat, FALSE, str);
+ dcc_ctcp_message(dcc->server, dcc->nick, dcc->chat, FALSE, str);
g_free(str);
}
@@ -582,7 +582,7 @@ static void cmd_dcc_send(const char *data, IRC_SERVER_REC *server, void *item)
dcc_make_address(&own_ip, host);
str = g_strdup_printf("DCC SEND %s %s %d %lu",
fname, host, port, fsize);
- dcc_ctcp_message(target, server, chat, FALSE, str);
+ dcc_ctcp_message(server, target, chat, FALSE, str);
g_free(str);
g_free(fname);
diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c
index 5f8891e4..bc63a6d2 100644
--- a/src/irc/dcc/dcc.c
+++ b/src/irc/dcc/dcc.c
@@ -197,7 +197,8 @@ int dcc_str2type(const char *type)
return 0;
}
-void dcc_ctcp_message(const char *target, IRC_SERVER_REC *server, DCC_REC *chat, int notice, const char *msg)
+void dcc_ctcp_message(IRC_SERVER_REC *server, const char *target,
+ DCC_REC *chat, int notice, const char *msg)
{
char *str;
@@ -279,7 +280,9 @@ static void dcc_get_address(const char *str, IPADDR *ip)
}
/* Handle incoming DCC CTCP messages */
-static void dcc_ctcp_msg(char *data, IRC_SERVER_REC *server, char *sender, char *sendaddr, char *target, DCC_REC *chat)
+static void dcc_ctcp_msg(IRC_SERVER_REC *server, char *data,
+ char *sender, char *sendaddr,
+ char *target, DCC_REC *chat)
{
char *type, *arg, *addrstr, *portstr, *sizestr, *str;
void *free_arg;
@@ -379,7 +382,8 @@ static void dcc_ctcp_msg(char *data, IRC_SERVER_REC *server, char *sender, char
}
/* Handle incoming DCC CTCP replies */
-static void dcc_ctcp_reply(char *data, IRC_SERVER_REC *server, char *sender, char *sendaddr)
+static void dcc_ctcp_reply(IRC_SERVER_REC *server, char *data,
+ char *sender, char *sendaddr)
{
char *cmd, *subcmd, *args;
void *free_arg;
@@ -433,7 +437,7 @@ static void dcc_reject(DCC_REC *dcc, IRC_SERVER_REC *server)
}
/* SYNTAX: DCC CLOSE <type> <nick> [<file>] */
-static void cmd_dcc_close(char *data, IRC_SERVER_REC *server)
+static void cmd_dcc_close(IRC_SERVER_REC *server, char *data)
{
DCC_REC *dcc;
GSList *tmp, *next;
@@ -502,7 +506,7 @@ static int dcc_timeout_func(void)
return 1;
}
-static void event_no_such_nick(char *data, IRC_SERVER_REC *server)
+static void event_no_such_nick(IRC_SERVER_REC *server, char *data)
{
char *params, *nick;
GSList *tmp, *next;
diff --git a/src/irc/dcc/dcc.h b/src/irc/dcc/dcc.h
index b97e4a21..5f67991b 100644
--- a/src/irc/dcc/dcc.h
+++ b/src/irc/dcc/dcc.h
@@ -80,12 +80,14 @@ const char *dcc_type2str(int type);
int dcc_str2type(const char *type);
void dcc_make_address(IPADDR *ip, char *host);
-DCC_REC *dcc_create(int type, GIOChannel *handle, const char *nick, const char *arg, IRC_SERVER_REC *server, DCC_REC *chat);
+DCC_REC *dcc_create(int type, GIOChannel *handle, const char *nick,
+ const char *arg, IRC_SERVER_REC *server, DCC_REC *chat);
void dcc_destroy(DCC_REC *dcc);
/* Send a CTCP message/notify to target. Send the CTCP via DCC chat if
`chat' is specified. */
-void dcc_ctcp_message(const char *target, IRC_SERVER_REC *server, DCC_REC *chat, int notice, const char *msg);
+void dcc_ctcp_message(IRC_SERVER_REC *server, const char *target,
+ DCC_REC *chat, int notice, const char *msg);
/* Send `data' to dcc chat. */
void dcc_chat_send(DCC_REC *dcc, const char *data);
diff --git a/src/irc/flood/flood.c b/src/irc/flood/flood.c
index 08fe9bf0..0c4dc7ab 100644
--- a/src/irc/flood/flood.c
+++ b/src/irc/flood/flood.c
@@ -197,7 +197,8 @@ static void flood_newmsg(IRC_SERVER_REC *server, int level, const char *nick, co
flood->items = g_slist_append(flood->items, rec);
}
-static void flood_privmsg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr)
+static void flood_privmsg(IRC_SERVER_REC *server, const char *data,
+ const char *nick, const char *addr)
{
char *params, *target, *text;
int level;
@@ -217,7 +218,8 @@ static void flood_privmsg(const char *data, IRC_SERVER_REC *server, const char *
g_free(params);
}
-static void flood_notice(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr)
+static void flood_notice(IRC_SERVER_REC *server, const char *data,
+ const char *nick, const char *addr)
{
char *params, *target, *text;
@@ -234,7 +236,8 @@ static void flood_notice(const char *data, IRC_SERVER_REC *server, const char *n
g_free(params);
}
-static void flood_ctcp(const char *data, IRC_SERVER_REC *server, const char *nick, const char *addr, const char *target)
+static void flood_ctcp(IRC_SERVER_REC *server, const char *data,
+ const char *nick, const char *addr, const char *target)
{
int level;
diff --git a/src/irc/notifylist/notify-ison.c b/src/irc/notifylist/notify-ison.c
index 39ccff25..604c1804 100644
--- a/src/irc/notifylist/notify-ison.c
+++ b/src/irc/notifylist/notify-ison.c
@@ -298,7 +298,7 @@ static void ison_check_parts(IRC_SERVER_REC *server)
}
}
-static void event_ison(const char *data, IRC_SERVER_REC *server)
+static void event_ison(IRC_SERVER_REC *server, const char *data)
{
MODULE_SERVER_REC *mserver;
char *params, *online;
diff --git a/src/irc/notifylist/notify-whois.c b/src/irc/notifylist/notify-whois.c
index f6838bb7..eb7becd2 100644
--- a/src/irc/notifylist/notify-whois.c
+++ b/src/irc/notifylist/notify-whois.c
@@ -30,7 +30,7 @@
static char *last_notify_nick;
-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;
NOTIFY_NICK_REC *nickrec;
@@ -68,7 +68,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)
{
NOTIFY_NICK_REC *nickrec;
NOTIFYLIST_REC *notify;
@@ -92,7 +92,7 @@ static void event_whois_idle(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)
{
NOTIFY_NICK_REC *nickrec;
char *params, *nick, *awaymsg;
@@ -111,7 +111,7 @@ static void event_whois_away(const char *data, IRC_SERVER_REC *server)
}
/* All WHOIS replies got, now announce all the changes at once. */
-static void event_whois_end(const char *data, IRC_SERVER_REC *server)
+static void event_whois_end(IRC_SERVER_REC *server, const char *data)
{
MODULE_SERVER_REC *mserver;
NOTIFYLIST_REC *notify;
@@ -169,7 +169,7 @@ void notifylist_whois_init(void)
signal_add("notifylist event whois idle", (SIGNAL_FUNC) event_whois_idle);
signal_add("notifylist event whois end", (SIGNAL_FUNC) event_whois_end);
expando_create("D", expando_lastnotify,
- "notifylist event whois", EXPANDO_ARG_SERVER2, NULL);
+ "notifylist event whois", EXPANDO_ARG_SERVER, NULL);
}
void notifylist_whois_deinit(void)
diff --git a/src/irc/notifylist/notifylist.c b/src/irc/notifylist/notifylist.c
index e8f4f829..2836d586 100644
--- a/src/irc/notifylist/notifylist.c
+++ b/src/irc/notifylist/notifylist.c
@@ -253,7 +253,8 @@ static void notifylist_idle_reset(IRC_SERVER_REC *server, const char *nick)
}
}
-static void event_quit(const char *data, IRC_SERVER_REC *server, const char *nick)
+static void event_quit(IRC_SERVER_REC *server, const char *data,
+ const char *nick)
{
NOTIFY_NICK_REC *rec;
@@ -309,7 +310,8 @@ static void notifylist_check_join(IRC_SERVER_REC *server, const char *nick,
g_free(user);
}
-static void event_privmsg(const char *data, IRC_SERVER_REC *server, const char *nick, const char *address)
+static void event_privmsg(IRC_SERVER_REC *server, const char *data,
+ const char *nick, const char *address)
{
if (nick != NULL) {
notifylist_check_join(server, nick, address, "", -1);
@@ -317,7 +319,8 @@ static void event_privmsg(const char *data, IRC_SERVER_REC *server, const char *
}
}
-static void event_join(const char *data, IRC_SERVER_REC *server, const char *nick, const char *address)
+static void event_join(IRC_SERVER_REC *server, const char *data,
+ const char *nick, const char *address)
{
notifylist_check_join(server, nick, address, "", -1);
}
diff --git a/src/irc/proxy/listen.c b/src/irc/proxy/listen.c
index 0be32b81..89972fab 100644
--- a/src/irc/proxy/listen.c
+++ b/src/irc/proxy/listen.c
@@ -433,7 +433,7 @@ static void sig_server_disconnected(IRC_SERVER_REC *server)
}
}
-static void event_nick(const char *data, IRC_SERVER_REC *server,
+static void event_nick(IRC_SERVER_REC *server, const char *data,
const char *orignick)
{
GSList *tmp;