summaryrefslogtreecommitdiff
path: root/testing/irc_syncbot.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/irc_syncbot.c')
-rw-r--r--testing/irc_syncbot.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/testing/irc_syncbot.c b/testing/irc_syncbot.c
index affc0296..b63b6151 100644
--- a/testing/irc_syncbot.c
+++ b/testing/irc_syncbot.c
@@ -1,3 +1,4 @@
1#define _XOPEN_SOURCE 600
1 2
2#include <stdint.h> 3#include <stdint.h>
3#include <stdio.h> 4#include <stdio.h>
@@ -34,8 +35,8 @@ static uint16_t port = 6667;
34 35
35static int sock; 36static int sock;
36 37
37#define SERVER_CONNECT "NICK "IRC_NAME"\nUSER "IRC_NAME" 8 * :"IRC_NAME"\n" 38#define SERVER_CONNECT "NICK " IRC_NAME "\nUSER " IRC_NAME " 8 * :" IRC_NAME "\n"
38#define CHANNEL_JOIN "JOIN "IRC_CHANNEL"\n" 39#define CHANNEL_JOIN "JOIN " IRC_CHANNEL "\n"
39 40
40/* In toxcore/network.c */ 41/* In toxcore/network.c */
41uint64_t current_time_monotonic(void); 42uint64_t current_time_monotonic(void);
@@ -131,8 +132,8 @@ static void copy_groupmessage(Tox *tox, uint32_t groupnumber, uint32_t friendgro
131 uint8_t sendbuf[2048]; 132 uint8_t sendbuf[2048];
132 uint16_t send_len = 0; 133 uint16_t send_len = 0;
133 134
134 memcpy(sendbuf, "PRIVMSG "IRC_CHANNEL" :", sizeof("PRIVMSG "IRC_CHANNEL" :")); 135 memcpy(sendbuf, "PRIVMSG " IRC_CHANNEL " :", sizeof("PRIVMSG " IRC_CHANNEL " :"));
135 send_len += sizeof("PRIVMSG "IRC_CHANNEL" :") - 1; 136 send_len += sizeof("PRIVMSG " IRC_CHANNEL " :") - 1;
136 memcpy(sendbuf + send_len, name, namelen); 137 memcpy(sendbuf + send_len, name, namelen);
137 send_len += namelen; 138 send_len += namelen;
138 sendbuf[send_len] = ':'; 139 sendbuf[send_len] = ':';