diff options
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-servers.c | 9 | ||||
-rw-r--r-- | src/irc/core/irc-servers.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 1c3f2208..c1b74274 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -346,6 +346,15 @@ static void sig_server_quit(IRC_SERVER_REC *server, const char *msg) g_free(str); } +void irc_server_send_action(IRC_SERVER_REC *server, const char *target, const char *data) +{ + char *recoded; + + recoded = recode_out(SERVER(server), data, target); + irc_send_cmdv(server, "PRIVMSG %s :\001ACTION %s\001", target, recoded); + g_free(recoded); +} + void irc_server_send_away(IRC_SERVER_REC *server, const char *reason) { char *recoded = NULL; diff --git a/src/irc/core/irc-servers.h b/src/irc/core/irc-servers.h index fc3480a7..67ee76c1 100644 --- a/src/irc/core/irc-servers.h +++ b/src/irc/core/irc-servers.h @@ -117,6 +117,7 @@ void irc_server_purge_output(IRC_SERVER_REC *server, const char *target); char *irc_server_get_channels(IRC_SERVER_REC *server); /* INTERNAL: */ +void irc_server_send_action(IRC_SERVER_REC *server, const char *target, const char *data); void irc_server_send_away(IRC_SERVER_REC *server, const char *reason); void irc_server_send_data(IRC_SERVER_REC *server, const char *data, int len); void irc_server_init_isupport(IRC_SERVER_REC *server); |