summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-servers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core/irc-servers.c')
-rw-r--r--src/irc/core/irc-servers.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c
index 0bd19e4b..ca548400 100644
--- a/src/irc/core/irc-servers.c
+++ b/src/irc/core/irc-servers.c
@@ -73,17 +73,19 @@ static int ischannel_func(char flag)
return ischannel(flag);
}
-static void send_message(IRC_SERVER_REC *server, const char *target,
+static void send_message(SERVER_REC *server, const char *target,
const char *msg)
{
+ IRC_SERVER_REC *ircserver;
char *str;
- g_return_if_fail(server != NULL);
+ ircserver = IRC_SERVER(server);
+ g_return_if_fail(ircserver != NULL);
g_return_if_fail(target != NULL);
g_return_if_fail(msg != NULL);
str = g_strdup_printf("PRIVMSG %s :%s", target, msg);
- irc_send_cmd_split(server, str, 2, server->max_msgs_in_cmd);
+ irc_send_cmd_split(ircserver, str, 2, ircserver->max_msgs_in_cmd);
g_free(str);
}
@@ -94,8 +96,7 @@ static void sig_server_looking(IRC_SERVER_REC *server)
server->isnickflag = isnickflag_func;
server->ischannel = ischannel_func;
- server->send_message =
- (void (*)(void *, const char *, const char *)) send_message;
+ server->send_message = send_message;
}
static void server_init(IRC_SERVER_REC *server)