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

@ -201,42 +201,6 @@ static void read_settings(void)
g_free(old_recode_fallback);
g_free(old_recode_out_default);
}
static void message_own_public(const SERVER_REC *server, const char *msg,
const char *target)
{
char *recoded;
recoded = recode_in(server, msg, target);
signal_continue(3, server, recoded, target);
g_free(recoded);
}
static void message_own_private(const SERVER_REC *server, const char *msg,
const char *target, const char *orig_target)
{
char *recoded;
recoded = recode_in(server, msg, target);
signal_continue(4, server, recoded, target, orig_target);
g_free(recoded);
}
static void message_irc_own_action(const SERVER_REC *server, const char *msg,
const char *target)
{
char *recoded;
recoded = recode_in(server, msg, target);
signal_continue(3, server, recoded, target);
g_free(recoded);
}
static void message_irc_own_notice(const SERVER_REC *server, const char *msg,
const char *channel)
{
char *recoded;
recoded = recode_in(server, msg, channel);
signal_continue(3, server, recoded, channel);
g_free(recoded);
}
#endif
void fe_recode_init (void)
@ -247,10 +211,6 @@ void fe_recode_init (void)
command_bind("recode add", NULL, (SIGNAL_FUNC) fe_recode_add_cmd);
command_bind("recode remove", NULL, (SIGNAL_FUNC) fe_recode_remove_cmd);
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
signal_add("message own_public", (SIGNAL_FUNC) message_own_public);
signal_add("message own_private", (SIGNAL_FUNC) message_own_private);
signal_add("message irc own_action", (SIGNAL_FUNC) message_irc_own_action);
signal_add("message irc own_notice", (SIGNAL_FUNC) message_irc_own_notice);
read_settings();
#endif
}
@ -263,9 +223,5 @@ void fe_recode_deinit (void)
command_unbind("recode add", (SIGNAL_FUNC) fe_recode_add_cmd);
command_unbind("recode remove", (SIGNAL_FUNC) fe_recode_remove_cmd);
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
signal_remove("message own_public", (SIGNAL_FUNC) message_own_public);
signal_remove("message own_private", (SIGNAL_FUNC) message_own_private);
signal_remove("message irc own_action", (SIGNAL_FUNC) message_irc_own_action);
signal_remove("message irc own_notice", (SIGNAL_FUNC) message_irc_own_notice);
#endif
}