2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
#include <stdint.h>
|
2016-09-01 07:33:20 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2014-10-15 07:49:29 +08:00
|
|
|
#include <string.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <errno.h>
|
2016-09-01 07:33:20 +08:00
|
|
|
#include <fcntl.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <sys/socket.h>
|
2014-10-15 07:49:29 +08:00
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
2014-10-17 19:04:08 +08:00
|
|
|
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MACH__)
|
|
|
|
#define MSG_NOSIGNAL 0
|
|
|
|
#endif
|
|
|
|
|
2014-10-15 07:49:29 +08:00
|
|
|
//IRC name and channel.
|
|
|
|
#define IRC_NAME "Tox_syncbot"
|
|
|
|
#define IRC_CHANNEL "#tox-real-ontopic"
|
|
|
|
|
|
|
|
//IRC server ip and port.
|
2016-09-05 23:10:48 +08:00
|
|
|
static uint8_t ip[4] = {127, 0, 0, 1};
|
|
|
|
static uint16_t port = 6667;
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
#define SILENT_TIMEOUT 20
|
|
|
|
|
2016-09-05 23:10:48 +08:00
|
|
|
static int sock;
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
#define SERVER_CONNECT "NICK "IRC_NAME"\nUSER "IRC_NAME" 8 * :"IRC_NAME"\n"
|
|
|
|
#define CHANNEL_JOIN "JOIN "IRC_CHANNEL"\n"
|
|
|
|
|
2014-10-16 01:28:19 +08:00
|
|
|
/* In toxcore/network.c */
|
|
|
|
uint64_t current_time_monotonic(void);
|
|
|
|
|
2016-09-05 23:10:48 +08:00
|
|
|
static uint64_t get_monotime_sec(void)
|
2014-10-15 07:49:29 +08:00
|
|
|
{
|
2014-10-16 01:28:19 +08:00
|
|
|
return current_time_monotonic() / 1000;
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
2016-09-05 23:10:48 +08:00
|
|
|
static int reconnect(void)
|
2014-10-15 07:49:29 +08:00
|
|
|
{
|
2016-09-30 22:15:50 +08:00
|
|
|
int new_sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
2014-10-15 07:49:29 +08:00
|
|
|
|
2016-09-30 22:15:50 +08:00
|
|
|
if (new_sock < 0) {
|
2014-10-15 07:49:29 +08:00
|
|
|
printf("error socket\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct sockaddr_storage addr = {0};
|
|
|
|
|
|
|
|
size_t addrsize;
|
|
|
|
|
|
|
|
struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;
|
|
|
|
|
|
|
|
addrsize = sizeof(struct sockaddr_in);
|
|
|
|
|
|
|
|
addr4->sin_family = AF_INET;
|
|
|
|
|
|
|
|
memcpy(&addr4->sin_addr, ip, 4);
|
|
|
|
|
|
|
|
addr4->sin_port = htons(port);
|
|
|
|
|
2016-09-30 22:15:50 +08:00
|
|
|
if (connect(new_sock, (struct sockaddr *)&addr, addrsize) != 0) {
|
2014-10-15 07:49:29 +08:00
|
|
|
printf("error connect\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2016-09-30 22:15:50 +08:00
|
|
|
send(new_sock, SERVER_CONNECT, sizeof(SERVER_CONNECT) - 1, MSG_NOSIGNAL);
|
2014-10-15 07:49:29 +08:00
|
|
|
|
2016-09-30 22:15:50 +08:00
|
|
|
return new_sock;
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#include "../toxcore/tox.h"
|
|
|
|
#include "misc_tools.c"
|
|
|
|
|
2016-09-05 23:10:48 +08:00
|
|
|
static int current_group = -1;
|
2014-10-15 07:49:29 +08:00
|
|
|
|
2016-09-08 00:18:19 +08:00
|
|
|
static void callback_group_invite(Tox *tox, uint32_t fid, TOX_CONFERENCE_TYPE type, const uint8_t *data, size_t length,
|
|
|
|
void *userdata)
|
2014-10-15 07:49:29 +08:00
|
|
|
{
|
2016-09-01 02:12:19 +08:00
|
|
|
if (current_group == -1) {
|
2016-09-08 00:18:19 +08:00
|
|
|
current_group = tox_conference_join(tox, fid, data, length, NULL);
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
2016-09-05 23:10:48 +08:00
|
|
|
static void callback_friend_message(Tox *tox, uint32_t fid, TOX_MESSAGE_TYPE type, const uint8_t *message,
|
|
|
|
size_t length,
|
|
|
|
void *userdata)
|
2014-10-15 07:49:29 +08:00
|
|
|
{
|
|
|
|
if (length == 1 && *message == 'c') {
|
2016-09-08 00:18:19 +08:00
|
|
|
if (tox_conference_delete(tox, current_group, NULL) == 0) {
|
2014-10-15 07:49:29 +08:00
|
|
|
current_group = -1;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (length == 1 && *message == 'i') {
|
2016-09-08 00:18:19 +08:00
|
|
|
tox_conference_invite(tox, fid, current_group, NULL);
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (length == 1 && *message == 'j' && sock >= 0) {
|
|
|
|
send(sock, CHANNEL_JOIN, sizeof(CHANNEL_JOIN) - 1, MSG_NOSIGNAL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-08 00:18:19 +08:00
|
|
|
static void copy_groupmessage(Tox *tox, uint32_t groupnumber, uint32_t friendgroupnumber, TOX_MESSAGE_TYPE type,
|
|
|
|
const uint8_t *message, size_t length,
|
2014-10-15 07:49:29 +08:00
|
|
|
void *userdata)
|
|
|
|
{
|
2016-09-18 05:32:25 +08:00
|
|
|
if (tox_conference_peer_number_is_ours(tox, groupnumber, friendgroupnumber, NULL)) {
|
2014-10-15 07:49:29 +08:00
|
|
|
return;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
2016-09-18 05:32:25 +08:00
|
|
|
TOX_ERR_CONFERENCE_PEER_QUERY error;
|
|
|
|
size_t namelen = tox_conference_peer_get_name_size(tox, groupnumber, friendgroupnumber, &error);
|
2014-10-15 07:49:29 +08:00
|
|
|
uint8_t name[TOX_MAX_NAME_LENGTH];
|
2016-09-08 00:18:19 +08:00
|
|
|
tox_conference_peer_get_name(tox, groupnumber, friendgroupnumber, name, NULL);
|
2014-10-15 07:49:29 +08:00
|
|
|
|
2016-09-18 05:32:25 +08:00
|
|
|
if (namelen == 0 || error != TOX_ERR_CONFERENCE_PEER_QUERY_OK) {
|
2014-10-15 07:49:29 +08:00
|
|
|
memcpy(name, "<unknown>", 9);
|
|
|
|
namelen = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t sendbuf[2048];
|
|
|
|
uint16_t send_len = 0;
|
|
|
|
|
|
|
|
memcpy(sendbuf, "PRIVMSG "IRC_CHANNEL" :", sizeof("PRIVMSG "IRC_CHANNEL" :"));
|
|
|
|
send_len += sizeof("PRIVMSG "IRC_CHANNEL" :") - 1;
|
|
|
|
memcpy(sendbuf + send_len, name, namelen);
|
|
|
|
send_len += namelen;
|
|
|
|
sendbuf[send_len] = ':';
|
|
|
|
send_len += 1;
|
|
|
|
sendbuf[send_len] = ' ';
|
|
|
|
send_len += 1;
|
|
|
|
memcpy(sendbuf + send_len, message, length);
|
|
|
|
send_len += length;
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
for (i = 0; i < send_len; ++i) {
|
2016-09-01 02:12:19 +08:00
|
|
|
if (sendbuf[i] == '\n') {
|
2014-10-15 07:49:29 +08:00
|
|
|
sendbuf[i] = '|';
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 21:01:00 +08:00
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (sendbuf[i] == 0) {
|
2014-10-15 21:01:00 +08:00
|
|
|
sendbuf[i] = ' ';
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
sendbuf[send_len] = '\n';
|
|
|
|
send_len += 1;
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (sock >= 0) {
|
2014-10-15 07:49:29 +08:00
|
|
|
send(sock, sendbuf, send_len, MSG_NOSIGNAL);
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
2016-09-05 23:10:48 +08:00
|
|
|
static void send_irc_group(Tox *tox, uint8_t *msg, uint16_t len)
|
2014-10-15 07:49:29 +08:00
|
|
|
{
|
2016-09-01 02:12:19 +08:00
|
|
|
if (len > 1350 || len == 0 || len == 1) {
|
2014-10-15 07:49:29 +08:00
|
|
|
return;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
--len;
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (*msg != ':') {
|
2014-10-15 07:49:29 +08:00
|
|
|
return;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
uint8_t req[len];
|
|
|
|
unsigned int i;
|
|
|
|
|
2015-05-21 02:09:05 +08:00
|
|
|
unsigned int spaces = 0;
|
|
|
|
|
2014-10-15 07:49:29 +08:00
|
|
|
for (i = 0; i < (len - 1); ++i) {
|
2015-05-21 02:09:05 +08:00
|
|
|
if (msg[i + 1] == ' ') {
|
|
|
|
++spaces;
|
|
|
|
} else {
|
|
|
|
if (spaces >= 3 && msg[i + 1] == ':') {
|
|
|
|
break;
|
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
req[i] = msg[i + 1];
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int req_len = i;
|
|
|
|
req[i] = 0;
|
|
|
|
|
|
|
|
uint8_t message[len];
|
|
|
|
uint16_t length = 0;
|
|
|
|
|
|
|
|
uint8_t *pmsg = (uint8_t *)strstr((char *)req, " PRIVMSG");
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (pmsg == NULL) {
|
2014-10-15 07:49:29 +08:00
|
|
|
return;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
2016-08-18 07:37:45 +08:00
|
|
|
uint8_t *dt;
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
for (dt = req, i = 0; dt != pmsg && *dt != '!'; ++dt, ++i) {
|
|
|
|
message[i] = *dt;
|
|
|
|
++length;
|
|
|
|
}
|
|
|
|
|
|
|
|
message[length] = ':';
|
|
|
|
length += 1;
|
|
|
|
message[length] = ' ';
|
|
|
|
length += 1;
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if ((req_len + 2) >= len) {
|
2014-10-15 07:49:29 +08:00
|
|
|
return;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
memcpy(message + length, msg + req_len + 2, len - (req_len + 2));
|
|
|
|
length += len - (req_len + 2);
|
2016-09-08 00:18:19 +08:00
|
|
|
tox_conference_send_message(tox, current_group, TOX_MESSAGE_TYPE_NORMAL, message, length, NULL);
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
2016-09-05 23:10:48 +08:00
|
|
|
static Tox *init_tox(int argc, char *argv[])
|
2014-10-15 07:49:29 +08:00
|
|
|
{
|
2015-02-25 09:29:01 +08:00
|
|
|
uint8_t ipv6enabled = 1; /* x */
|
2014-10-15 07:49:29 +08:00
|
|
|
int argvoffset = cmdline_parsefor_ipv46(argc, argv, &ipv6enabled);
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (argvoffset < 0) {
|
2014-10-15 07:49:29 +08:00
|
|
|
exit(1);
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
/* with optional --ipvx, now it can be 1-4 arguments... */
|
|
|
|
if ((argc != argvoffset + 2) && (argc != argvoffset + 4)) {
|
|
|
|
printf("Usage: %s [--ipv4|--ipv6] ip port public_key (of the DHT bootstrap node)\n", argv[0]);
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
2015-05-23 06:23:56 +08:00
|
|
|
Tox *tox = tox_new(0, 0);
|
2014-10-15 07:49:29 +08:00
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (!tox) {
|
2014-10-15 07:49:29 +08:00
|
|
|
exit(1);
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
2016-09-05 23:10:48 +08:00
|
|
|
tox_self_set_name(tox, (const uint8_t *)IRC_NAME, sizeof(IRC_NAME) - 1, 0);
|
2016-08-20 02:01:58 +08:00
|
|
|
tox_callback_friend_message(tox, &callback_friend_message);
|
2016-09-19 23:30:36 +08:00
|
|
|
tox_callback_conference_invite(tox, &callback_group_invite);
|
|
|
|
tox_callback_conference_message(tox, ©_groupmessage);
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
char temp_id[128];
|
|
|
|
printf("\nEnter the address of irc_syncbots master (38 bytes HEX format):\n");
|
|
|
|
|
|
|
|
if (scanf("%s", temp_id) != 1) {
|
2016-09-13 04:37:58 +08:00
|
|
|
exit(1);
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
2016-09-30 22:15:50 +08:00
|
|
|
uint16_t bootstrap_port = atoi(argv[argvoffset + 2]);
|
2015-05-21 02:09:05 +08:00
|
|
|
unsigned char *binary_string = hex_string_to_bin(argv[argvoffset + 3]);
|
2016-09-30 22:15:50 +08:00
|
|
|
tox_bootstrap(tox, argv[argvoffset + 1], bootstrap_port, binary_string, 0);
|
2015-05-21 02:09:05 +08:00
|
|
|
free(binary_string);
|
|
|
|
|
2014-10-15 07:49:29 +08:00
|
|
|
uint8_t *bin_id = hex_string_to_bin(temp_id);
|
2016-09-05 23:10:48 +08:00
|
|
|
uint32_t num = tox_friend_add(tox, bin_id, (const uint8_t *)"Install Gentoo", sizeof("Install Gentoo") - 1, 0);
|
2014-10-15 07:49:29 +08:00
|
|
|
free(bin_id);
|
|
|
|
|
2015-02-25 09:29:01 +08:00
|
|
|
if (num == UINT32_MAX) {
|
2014-10-15 07:49:29 +08:00
|
|
|
printf("\nSomething went wrong when adding friend.\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
return tox;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
Tox *tox = init_tox(argc, argv);
|
|
|
|
|
|
|
|
sock = reconnect();
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (sock < 0) {
|
2014-10-15 07:49:29 +08:00
|
|
|
return 1;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
uint64_t last_get = get_monotime_sec();
|
|
|
|
int connected = 0, ping_sent = 0;
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
int count = 0;
|
|
|
|
ioctl(sock, FIONREAD, &count);
|
|
|
|
|
|
|
|
if (count > 0) {
|
|
|
|
last_get = get_monotime_sec();
|
|
|
|
ping_sent = 0;
|
|
|
|
uint8_t data[count + 1];
|
|
|
|
data[count] = 0;
|
|
|
|
recv(sock, data, count, MSG_NOSIGNAL);
|
|
|
|
printf("%s", data);
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (!connected) {
|
2014-10-15 07:49:29 +08:00
|
|
|
connected = 1;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
if (count > 6 && data[0] == 'P' && data[1] == 'I' && data[2] == 'N' && data[3] == 'G') {
|
|
|
|
data[1] = 'O';
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
for (i = 0; i < count; ++i) {
|
|
|
|
if (data[i] == '\n') {
|
|
|
|
++i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
send(sock, data, i, MSG_NOSIGNAL);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int i, p_i = 0;
|
|
|
|
|
|
|
|
for (i = 1; data[0] == ':' && i < count; ++i) {
|
|
|
|
if (data[i] == ' ') {
|
|
|
|
if (i + 5 < count && memcmp(data + i, " 404 ", 5) == 0) {
|
|
|
|
connected = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (data[i] == ':') {
|
2014-10-15 07:49:29 +08:00
|
|
|
break;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < count; ++i) {
|
|
|
|
if (data[i] == '\n' && i != 0) {
|
|
|
|
send_irc_group(tox, data + p_i, i - p_i);
|
|
|
|
p_i = i + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (connected == 1) {
|
|
|
|
send(sock, CHANNEL_JOIN, sizeof(CHANNEL_JOIN) - 1, MSG_NOSIGNAL);
|
|
|
|
connected = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ping_sent && last_get + (SILENT_TIMEOUT / 2) < get_monotime_sec()) {
|
|
|
|
unsigned int p_s = sizeof("PING :test\n") - 1;
|
|
|
|
|
2016-09-01 02:12:19 +08:00
|
|
|
if (send(sock, "PING :test\n", p_s, MSG_NOSIGNAL) == p_s) {
|
2014-10-15 07:49:29 +08:00
|
|
|
ping_sent = 1;
|
2016-09-01 02:12:19 +08:00
|
|
|
}
|
2014-10-15 07:49:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int error = 0;
|
2016-09-13 04:37:58 +08:00
|
|
|
socklen_t len = sizeof(error);
|
2014-10-15 07:49:29 +08:00
|
|
|
|
|
|
|
if (sock < 0 || last_get + SILENT_TIMEOUT < get_monotime_sec()
|
2016-09-13 04:37:58 +08:00
|
|
|
|| getsockopt(sock, SOL_SOCKET, SO_ERROR, &error, &len) != 0) {
|
2014-10-15 07:49:29 +08:00
|
|
|
close(sock);
|
|
|
|
printf("reconnect\n");
|
|
|
|
sock = reconnect();
|
|
|
|
|
|
|
|
if (sock >= 0) {
|
|
|
|
last_get = get_monotime_sec();
|
|
|
|
connected = 0;
|
|
|
|
ping_sent = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Make self_connection_status callback stateless.
**What are we doing?**
We are moving towards stateless callbacks. This means that when registering a
callback, you no longer pass a user data pointer. Instead, you pass a user data
pointer to tox_iterate. This pointer is threaded through the code, passed to
each callback. The callback can modify the data pointed at. An extra indirection
will be needed if the pointer itself can change.
**Why?**
Currently, callbacks are registered with a user data pointer. This means the
library has N pointers for N different callbacks. These pointers need to be
managed by the client code. Managing the lifetime of the pointee can be
difficult. In C++, it takes special effort to ensure that the lifetime of user
data extends at least beyond the lifetime of the Tox instance. For other
languages, the situation is much worse. Java and other garbage collected
languages may move objects in memory, so the pointers are not stable. Tox4j goes
through a lot of effort to make the Java/Scala user experience a pleasant one by
keeping a global array of Tox+userdata on the C++ side, and communicating via
protobufs. A Haskell FFI would have to do similarly complex tricks.
Stateless callbacks ensure that a user data pointer only needs to live during a
single function call. This means that the user code (or language runtime) can
move the data around at will, as long as it sets the new location in the
callback.
**How?**
We are doing this change one callback at a time. After each callback, we ensure
that everything still works as expected. This means the toxcore change will
require 15 Pull Requests.
2016-08-10 20:46:04 +08:00
|
|
|
tox_iterate(tox, NULL);
|
2014-10-15 07:49:29 +08:00
|
|
|
usleep(1000 * 50);
|
|
|
|
}
|
|
|
|
}
|