Make the compiler happy by replacing 'const char *' by 'char *'.

Pass the pointer to the SERVER_REC to dcc_ctcp_message.
Recode 'own' messages back for printing just before they actually get printed. (ugly but more effective than adding all the signals in fe-recode and doing it there)
Replaced SERVER_REC by IRC_SERVER_REC in dcc-chat.c since it's belongs to IRC(makes the compiler happy again).

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4034 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Valentin Batz 2005-10-10 18:32:32 +00:00 committed by vb
commit fd476e8b31
6 changed files with 51 additions and 71 deletions

View file

@ -215,7 +215,7 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
cmd_params_free(free_arg);
}
static void cmd_me(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
static void cmd_me(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
{
CHAT_DCC_REC *dcc;
char *str;
@ -226,13 +226,13 @@ static void cmd_me(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
if (dcc == NULL) return;
str = g_strconcat("ACTION ", data, NULL);
dcc_ctcp_message(NULL, dcc->nick, dcc, FALSE, str);
dcc_ctcp_message(server, dcc->nick, dcc, FALSE, str);
g_free(str);
signal_stop();
}
static void cmd_action(const char *data, SERVER_REC *server)
static void cmd_action(const char *data, IRC_SERVER_REC *server)
{
CHAT_DCC_REC *dcc;
char *target, *text, *str;
@ -254,7 +254,7 @@ static void cmd_action(const char *data, SERVER_REC *server)
dcc = dcc_chat_find_id(target+1);
if (dcc != NULL) {
str = g_strconcat("ACTION ", text, NULL);
dcc_ctcp_message(NULL, dcc->nick, dcc, FALSE, str);
dcc_ctcp_message(server, dcc->nick, dcc, FALSE, str);
g_free(str);
}
@ -262,7 +262,7 @@ static void cmd_action(const char *data, SERVER_REC *server)
signal_stop();
}
static void cmd_ctcp(const char *data, SERVER_REC *server)
static void cmd_ctcp(const char *data, IRC_SERVER_REC *server)
{
CHAT_DCC_REC *dcc;
char *target, *ctcpcmd, *ctcpdata, *str;
@ -287,7 +287,7 @@ static void cmd_ctcp(const char *data, SERVER_REC *server)
g_strup(ctcpcmd);
str = g_strconcat(ctcpcmd, " ", ctcpdata, NULL);
dcc_ctcp_message(NULL, dcc->nick, dcc, FALSE, str);
dcc_ctcp_message(server, dcc->nick, dcc, FALSE, str);
g_free(str);
}

View file

@ -399,8 +399,7 @@ static void ctcp_msg_dcc_send(IRC_SERVER_REC *server, const char *data,
GET_DCC_REC *dcc;
SEND_DCC_REC *temp_dcc;
IPADDR ip;
const char *address;
char **params, *fname;
char *address, **params, *fname;
int paramcount, fileparams;
int port, len, quoted = FALSE;
uoff_t size;