summaryrefslogtreecommitdiff
path: root/src/plugins/relay
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/relay')
-rw-r--r--src/plugins/relay/irc/relay-irc.c13
-rw-r--r--src/plugins/relay/weechat/relay-weechat-msg.c13
2 files changed, 22 insertions, 4 deletions
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c
index c1353ac00..24e32ed07 100644
--- a/src/plugins/relay/irc/relay-irc.c
+++ b/src/plugins/relay/irc/relay-irc.c
@@ -34,6 +34,7 @@
#include "../../weechat-plugin.h"
#include "../relay.h"
#include "relay-irc.h"
+#include "../relay-buffer.h"
#include "../relay-client.h"
#include "../relay-config.h"
#include "../relay-raw.h"
@@ -208,6 +209,8 @@ relay_irc_sendf (struct t_relay_client *client, const char *format, ...)
free (vbuffer);
+ relay_buffer_refresh (NULL);
+
return total_sent;
}
@@ -978,12 +981,14 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
int items_count, i;
items = weechat_string_split (data, "\n", 0, 0, &items_count);
- for (i = 0; i < items_count; i++)
- {
- relay_irc_recv_one_msg (client, items[i]);
- }
if (items)
+ {
+ for (i = 0; i < items_count; i++)
+ {
+ relay_irc_recv_one_msg (client, items[i]);
+ }
weechat_string_free_split (items);
+ }
}
/*
diff --git a/src/plugins/relay/weechat/relay-weechat-msg.c b/src/plugins/relay/weechat/relay-weechat-msg.c
index e3bb00532..e7f11fb7f 100644
--- a/src/plugins/relay/weechat/relay-weechat-msg.c
+++ b/src/plugins/relay/weechat/relay-weechat-msg.c
@@ -40,6 +40,7 @@
#include "../relay.h"
#include "relay-weechat.h"
#include "relay-weechat-msg.h"
+#include "../relay-buffer.h"
#include "../relay-client.h"
#include "../relay-config.h"
#include "../relay-raw.h"
@@ -880,6 +881,12 @@ relay_weechat_msg_send (struct t_relay_client *client,
}
}
+ if (num_sent > 0)
+ {
+ client->bytes_sent += num_sent;
+ relay_buffer_refresh (NULL);
+ }
+
free (dest);
return;
}
@@ -908,6 +915,12 @@ relay_weechat_msg_send (struct t_relay_client *client,
"error: %s", strerror (errno));
}
}
+
+ if (num_sent > 0)
+ {
+ client->bytes_sent += num_sent;
+ relay_buffer_refresh (NULL);
+ }
}
/*