mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
server_redirect_peek_signal() now contains int *redirected parameter which
indicates if event belongs to redirection even while it didn't have any redirection signal. Proxy uses this to figure out if the event should be sent to clients or not (/WHOIS in proxy sent 3 middle lines to all clients before this). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2221 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
54a933f29c
commit
ec79871a7a
3 changed files with 22 additions and 12 deletions
|
|
@ -309,6 +309,7 @@ static void sig_server_event(IRC_SERVER_REC *server, const char *line,
|
|||
void *client;
|
||||
const char *signal;
|
||||
char *event, *args;
|
||||
int redirected;
|
||||
|
||||
g_return_if_fail(line != NULL);
|
||||
if (!IS_IRC_SERVER(server))
|
||||
|
|
@ -321,15 +322,16 @@ static void sig_server_event(IRC_SERVER_REC *server, const char *line,
|
|||
while (*args == ' ') args++;
|
||||
g_strdown(event);
|
||||
|
||||
signal = server_redirect_peek_signal(server, event, args);
|
||||
if (signal != NULL) {
|
||||
signal = server_redirect_peek_signal(server, event, args, &redirected);
|
||||
if ((signal != NULL && strncmp(signal, "proxy ", 6) != 0) ||
|
||||
(signal == NULL && redirected)) {
|
||||
/* we want to send this to one client (or proxy itself) only */
|
||||
if (strncmp(signal, "proxy ", 6) != 0) {
|
||||
/* proxy only */
|
||||
g_free(event);
|
||||
return;
|
||||
}
|
||||
/* proxy only */
|
||||
g_free(event);
|
||||
return;
|
||||
}
|
||||
|
||||
if (signal != NULL) {
|
||||
server_redirect_get_signal(server, event, args);
|
||||
if (sscanf(signal+6, "%p", &client) == 1) {
|
||||
/* send it to specific client only */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue