haavard / tox-weechat Goto Github PK
View Code? Open in Web Editor NEWTox plugin for WeeChat
License: GNU General Public License v3.0
Tox plugin for WeeChat
License: GNU General Public License v3.0
Loading a Tox profile that was created via a different client doesn't work for me. If this isn't meant to be a feature, it would be nice to add.
When connecting with tox, the profile window is spammed every 10 seconds with about 20 times the following message:
tox | network.c:484 [sendpacket] attempted to send message of length 33 on uninitialized socket
Note that I'm connecting with SOCKS5/tor (udp set to off). Connection seems to work, contacts appear. Weechat process is firejail'ed.
When I begin a chat with a contact using /msg
, it's buffer opens-up with the same indent as the profile. It would be nice if it were indented like channels to a server.
I saw there was another issued (closed) about this but I still cannot figure out how to import profiles. I use both qTox and toxic. The files for each profile are in .config/tox and each profile has a .tox, .db and some also have an .ini as well as avatars in the avatar/ folder. Trying to copy any of these files into .weechat/tox doesn't do anything; /tox list doesn't show any profiles.
How does this work?
Hello, I'm the current lame guy trying to maintain the aur package for this awesome tool. But for some reason it's no longer compiling.
Output from makpkg:
↘ makepkg ♥
==> Making package: tox-weechat-git r255.ed96d36-1 (Sat Aug 22 17:19:03 PDT 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating tox-weechat-git git repo...
Fetching origin
==> Validating source files with md5sums...
tox-weechat-git ... Skipped
==> Extracting sources...
-> Creating working copy of tox-weechat git repo...
Reset branch 'makepkg'
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git
[ 13%] Building C object CMakeFiles/tox.dir/src/twc.c.o
[ 13%] Building C object CMakeFiles/tox.dir/src/twc-bootstrap.c.o
[ 20%] Building C object CMakeFiles/tox.dir/src/twc-completion.c.o
[ 26%] Building C object CMakeFiles/tox.dir/src/twc-chat.c.o
[ 33%] Building C object CMakeFiles/tox.dir/src/twc-commands.c.o
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-bootstrap.c: In function ‘twc_bootstrap_tox’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-bootstrap.c:74:18: warning: implicit declaration of function ‘tox_bootstrap_from_address’ [-Wimplicit-function-declaration]
int result = tox_bootstrap_from_address(tox, address, port,
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-chat.c: In function ‘twc_chat_new_friend’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-chat.c:106:5: warning: implicit declaration of function ‘tox_get_client_id’ [-Wimplicit-function-declaration]
tox_get_client_id(profile->tox, friend_number, client_id);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c: In function ‘twc_match_friend’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:145:29: warning: implicit declaration of function ‘tox_count_friendlist’ [-Wimplicit-function-declaration]
uint32_t friend_count = tox_count_friendlist(profile->tox);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:147:5: warning: implicit declaration of function ‘tox_get_friendlist’ [-Wimplicit-function-declaration]
tox_get_friendlist(profile->tox, friend_numbers, friend_count);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:165:13: warning: implicit declaration of function ‘tox_get_client_id’ [-Wimplicit-function-declaration]
tox_get_client_id(profile->tox, friend_numbers[i], tox_id);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c: In function ‘twc_cmd_friend’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:309:24: warning: implicit declaration of function ‘tox_del_friend’ [-Wimplicit-function-declaration]
fail = tox_del_friend(profile->tox, friend_number) != 0;
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:321:37: warning: implicit declaration of function ‘tox_add_friend’ [-Wimplicit-function-declaration]
TOX_ERR_FRIEND_ADD result = tox_add_friend(profile->tox,
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c: In function ‘twc_cmd_myid’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:696:5: warning: implicit declaration of function ‘tox_get_address’ [-Wimplicit-function-declaration]
tox_get_address(profile->tox, address);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c: In function ‘twc_cmd_name’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:725:18: warning: implicit declaration of function ‘tox_set_name’ [-Wimplicit-function-declaration]
int result = tox_set_name(profile->tox, (uint8_t )name, strlen(name));
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c: In function ‘twc_cmd_nospam’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:792:27: warning: implicit declaration of function ‘tox_get_nospam’ [-Wimplicit-function-declaration]
uint32_t old_nospam = tox_get_nospam(profile->tox);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:793:5: warning: implicit declaration of function ‘tox_set_nospam’ [-Wimplicit-function-declaration]
tox_set_nospam(profile->tox, new_nospam);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c: In function ‘twc_cmd_status’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:890:5: warning: implicit declaration of function ‘tox_set_user_status’ [-Wimplicit-function-declaration]
tox_set_user_status(profile->tox, status);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c: In function ‘twc_cmd_statusmsg’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-commands.c:909:18: warning: implicit declaration of function ‘tox_set_status_message’ [-Wimplicit-function-declaration]
int result = tox_set_status_message(profile->tox,
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-completion.c: In function ‘twc_completion_friend’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-completion.c:60:29: warning: implicit declaration of function ‘tox_count_friendlist’ [-Wimplicit-function-declaration]
uint32_t friend_count = tox_count_friendlist(profile->tox);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-completion.c:62:5: warning: implicit declaration of function ‘tox_get_friendlist’ [-Wimplicit-function-declaration]
tox_get_friendlist(profile->tox, friend_numbers, friend_count);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-completion.c:71:13: warning: implicit declaration of function ‘tox_get_client_id’ [-Wimplicit-function-declaration]
tox_get_client_id(profile->tox, friend_numbers[i], tox_id);
^
[ 40%] Building C object CMakeFiles/tox.dir/src/twc-gui.c.o
[ 46%] Building C object CMakeFiles/tox.dir/src/twc-friend-request.c.o
[ 53%] Building C object CMakeFiles/tox.dir/src/twc-config.c.o
[ 60%] Building C object CMakeFiles/tox.dir/src/twc-group-invite.c.o
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-gui.c: In function ‘twc_bar_item_away’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-gui.c:44:13: warning: implicit declaration of function ‘tox_get_self_user_status’ [-Wimplicit-function-declaration]
switch (tox_get_self_user_status(profile->tox))
^
[ 66%] Building C object CMakeFiles/tox.dir/src/twc-list.c.o
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-friend-request.c: In function ‘twc_friend_request_accept’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-friend-request.c:70:5: warning: implicit declaration of function ‘tox_add_friend_norequest’ [-Wimplicit-function-declaration]
tox_add_friend_norequest(request->profile->tox, request->tox_id);
^
[ 80%] Building C object CMakeFiles/tox.dir/src/twc-profile.c.o
[ 80%] Building C object CMakeFiles/tox.dir/src/twc-message-queue.c.o
[ 86%] Building C object CMakeFiles/tox.dir/src/twc-tox-callbacks.c.o
[ 93%] Building C object CMakeFiles/tox.dir/src/twc-utils.c.o
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-message-queue.c: In function ‘twc_message_queue_add_friend_message’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-message-queue.c:78:12: warning: implicit declaration of function ‘tox_get_friend_connection_status’ [-Wimplicit-function-declaration]
&& tox_get_friend_connection_status(profile->tox, friend_number) == 1)
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-message-queue.c: In function ‘twc_message_queue_flush_friend’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-message-queue.c:103:22: warning: implicit declaration of function ‘tox_send_message’ [-Wimplicit-function-declaration]
rc = tox_send_message(profile->tox,
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-message-queue.c:109:22: warning: implicit declaration of function ‘tox_send_action’ [-Wimplicit-function-declaration]
rc = tox_send_action(profile->tox,
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-profile.c: In function ‘twc_profile_load’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-profile.c:306:38: warning: passing argument 2 of ‘tox_new’ from incompatible pointer type [-Wincompatible-pointer-types]
profile->tox = tox_new(&options, data, data_size, &rc);
^
In file included from /home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-profile.c:26:0:
/usr/include/tox/tox.h:632:6: note: expected ‘TOX_ERR_NEW * {aka enum TOX_ERR_NEW *}’ but argument is of type ‘uint8_t * {aka unsigned char *}’
Tox *tox_new(const struct Tox_Options *options, TOX_ERR_NEW *error);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-profile.c:306:20: error: too many arguments to function ‘tox_new’
profile->tox = tox_new(&options, data, data_size, &rc);
^
In file included from /home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-profile.c:26:0:
/usr/include/tox/tox.h:632:6: note: declared here
Tox *tox_new(const struct Tox_Options *options, TOX_ERR_NEW *error);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-profile.c:357:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
CMakeFiles/tox.dir/build.make:326: recipe for target 'CMakeFiles/tox.dir/src/twc-profile.c.o' failed
make[2]: ** [CMakeFiles/tox.dir/src/twc-profile.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c: In function ‘twc_get_name_nt’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:84:21: warning: implicit declaration of function ‘tox_get_name_size’ [-Wimplicit-function-declaration]
size_t length = tox_get_name_size(tox, friend_number);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:91:5: warning: implicit declaration of function ‘tox_get_name’ [-Wimplicit-function-declaration]
tox_get_name(tox, friend_number, name);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c: In function ‘twc_get_status_message_nt’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:101:21: warning: implicit declaration of function ‘tox_get_status_message_size’ [-Wimplicit-function-declaration]
size_t length = tox_get_status_message_size(tox, friend_number);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:103:5: warning: implicit declaration of function ‘tox_get_status_message’ [-Wimplicit-function-declaration]
tox_get_status_message(tox, friend_number, message, length);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c: In function ‘twc_get_self_name_nt’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:130:21: warning: implicit declaration of function ‘tox_get_self_name_size’ [-Wimplicit-function-declaration]
size_t length = tox_get_self_name_size(tox);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:132:5: warning: implicit declaration of function ‘tox_get_self_name’ [-Wimplicit-function-declaration]
tox_get_self_name(tox, name);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c: In function ‘twc_get_friend_id_short’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:144:5: warning: implicit declaration of function ‘tox_get_client_id’ [-Wimplicit-function-declaration]
tox_get_client_id(tox, friend_number, client_id);
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c: In function ‘twc_read_file’:
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:196:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (file = fopen(path, "r"))
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:203:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (data = malloc(sizeof(data) * *size))
^
/home/shaggy/workspace/aur4/tox-weechat-git/src/tox-weechat-git/src/twc-utils.c:205:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(data, sizeof(uint8_t), *size, file);
^
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tox.dir/all' failed
make[1]: ** [CMakeFiles/tox.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
You can see the pkgbuild here https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=tox-weechat-git Not entirely seeing the issue right away (not the greatest coder lol) Any help towards figuring out the problem would be wonderful.
hi! thanks for this plugin!
it may be a corner case, but since i hide the nicklist i use /names to print the nicklist when i need it, would you support /names to mimic irc's behaviour?
also /query to open a private message buffer :)
It still works if you bring the nodelist up to date, but there's been no activity since 2017.
$ cmake -DPLUGIN_PATH=~/.weechat/plugins ..
-- The C compiler identification is Clang 3.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found WeeChat: /usr/local/include
-- Found Tox: /usr/local/include;/usr/local/include;/usr/local/include found components: CORE AV ENCRYPTSAVE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lrvick/Sources/tox-weechat/build
$ make install
Scanning dependencies of target tox
[ 6%] Building C object CMakeFiles/tox.dir/src/twc.c.o
[ 13%] Building C object CMakeFiles/tox.dir/src/twc-bootstrap.c.o
[ 20%] Building C object CMakeFiles/tox.dir/src/twc-chat.c.o
/home/lrvick/Sources/tox-weechat/src/twc-chat.c:86:71: error: too many arguments provided to function-like macro invocation
twc_chat_buffer_close_callback, chat, NULL);
^
/usr/local/include/weechat/weechat-plugin.h:1539:9: note: macro 'weechat_buffer_new' defined here
#define weechat_buffer_new(__name, __input_callback, \
^
/home/lrvick/Sources/tox-weechat/src/twc-chat.c:84:20: error: use of undeclared identifier 'weechat_buffer_new'
chat->buffer = weechat_buffer_new(full_name,
^
/home/lrvick/Sources/tox-weechat/src/twc-chat.c:206:63: error: too many arguments provided to function-like macro invocation
twc_chat_refresh_timer_callback, chat, NULL);
^
/usr/local/include/weechat/weechat-plugin.h:1430:9: note: macro 'weechat_hook_timer' defined here
#define weechat_hook_timer(__interval, __align_second, __max_calls, \
^
/home/lrvick/Sources/tox-weechat/src/twc-chat.c:205:5: error: use of undeclared identifier 'weechat_hook_timer'
weechat_hook_timer(1, 0, 1,
^
4 errors generated.
*** Error code 1
Stop.
make[2]: stopped in /usr/home/lrvick/Sources/tox-weechat/build
*** Error code 1
Stop.
make[1]: stopped in /usr/home/lrvick/Sources/tox-weechat/build
*** Error code 1
Stop.
make: stopped in /usr/home/lrvick/Sources/tox-weechat/build
Using Cygwin to compile tox-weechat on Windows 8.1 with the jenkins build results in undefined references: https://gist.github.com/omyno/848f2bbfb16d339a4a87
i haven't found a way to rejoin groups when i get out of them :)
Due to their length, tox IDs can stretch the buffer bar (buffers.pl
) considerably.
If they can be easily trimmed a bit, even if just in the buffer bar, that would be incredibly useful.
when a person connects and disconnects, i receive a notification like this:
13:33:37 -- person just went offline.
while on other channels it'll be like this:
13:06:15 <-- person (~person@hostname) has left (Ping timeout: 264 seconds)
the issue is that with smart filters, you don't see the parts/joins unless the person has been talking during the last 5 minutes, but since tox notifications are in another format, they're always printed, making the unread lines counter on the buffer bar increase.
i think you can put anything on the right side, you just have to use the arrows.
i'd contribute patches but my C is awful :(
the tox buffer connects normally and i get friends connect/disconnect messages but using /tox
to interact with it does nothing
This repo isn't maintained anymore and there's a slightly updated version on https://git.plastiras.org/emdee/tox-weechat
Sorry for having no more / other details on this:
my output tells me I keep reconnecting, where my contacts tell me I am online the whole time.
Maybe this is too verbose output on your side or something in weechat 1.3 changed or something else.
After commit 1cc1aa2 make produced tox.so which is not linked to libtoxav.so and libtoxencryptsave.so which leads to inability to load tox.so in weechat:
unable to load plugin "/home/gordon/.weechat/plugins/tox.so": /home/gordon/.weechat/plugins/tox.so: undefined symbol: tox_pass_encrypt
I am using c-toxcore from git and it seems that it never produced single libtoxcore.so with everything linked inside. I wonder why did you change FindTox.cmake to exclude those libraries from Tox_LIBRARIES cmake variable?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.