diff options
-rw-r--r-- | src/irc/core/irc.c | 10 | ||||
-rw-r--r-- | src/irc/core/irc.h | 4 | ||||
-rw-r--r-- | src/perl/irc/Server.xs | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c index e91fc738..528e541f 100644 --- a/src/irc/core/irc.c +++ b/src/irc/core/irc.c @@ -139,6 +139,16 @@ void irc_send_cmd_now(IRC_SERVER_REC *server, const char *cmd) irc_send_cmd_full(server, cmd, TRUE, TRUE, FALSE); } +/* Send command to server putting it at the beginning of the queue of + commands to send -- it will go out as soon as possible in accordance + to the flood protection settings. */ +void irc_send_cmd_first(IRC_SERVER_REC *server, const char *cmd) +{ + g_return_if_fail(cmd != NULL); + + irc_send_cmd_full(server, cmd, FALSE, TRUE, FALSE); +} + static char *split_nicks(const char *cmd, char **pre, char **nicks, char **post, int arg) { char *p; diff --git a/src/irc/core/irc.h b/src/irc/core/irc.h index 5197f42d..de19e084 100644 --- a/src/irc/core/irc.h +++ b/src/irc/core/irc.h @@ -44,6 +44,10 @@ void irc_send_cmd_split(IRC_SERVER_REC *server, const char *cmd, /* Send command to server immediately bypassing all flood protections and queues. */ void irc_send_cmd_now(IRC_SERVER_REC *server, const char *cmd); +/* Send command to server putting it at the beginning of the queue of + commands to send -- it will go out as soon as possible in accordance + to the flood protection settings. */ +void irc_send_cmd_first(IRC_SERVER_REC *server, const char *cmd); /* The core of the irc_send_cmd* functions. If `raw' is TRUE, the `cmd' won't be checked at all if it's 512 bytes or not, or if it contains line feeds or not. Use with extreme caution! */ diff --git a/src/perl/irc/Server.xs b/src/perl/irc/Server.xs index 74f7a962..a3359bbc 100644 --- a/src/perl/irc/Server.xs +++ b/src/perl/irc/Server.xs @@ -70,6 +70,13 @@ CODE: irc_send_cmd_now(server, cmd); void +send_raw_first(server, cmd) + Irssi::Irc::Server server + char *cmd +CODE: + irc_send_cmd_first(server, cmd); + +void send_raw_split(server, cmd, nickarg, max_nicks) Irssi::Irc::Server server char *cmd |