Wee-slack: No reconnect on wifi connection loss

Created on 30 Nov 2017  路  3Comments  路  Source: wee-slack/wee-slack

Hi!

first of all thanks for your work on this plugin. However, I'm currently stuck with a bug that "disconnects" weechat whenever I the wifi connection of my Mac is interrupted. As there is no manual reconnect I have to /python reload slack, which can be quite annoying on flakey wifi connections. Is there a fix for this that I'm not aware of?

Most helpful comment

Seems like there should be a setting similar to plugins.var.python.slack.slack_timeout for this. I don't know much about the capabilities exposed to plugins with WeeChat but something like plugins.var.python.slack.slack_autoreconnect that could be triggered by plugins.var.python.slack.slack_timeout seems like it would work well.

All 3 comments

Seems like there should be a setting similar to plugins.var.python.slack.slack_timeout for this. I don't know much about the capabilities exposed to plugins with WeeChat but something like plugins.var.python.slack.slack_autoreconnect that could be triggered by plugins.var.python.slack.slack_timeout seems like it would work well.

Just implemented this in NetworkManager. Won't help for OSX, but the concept might:

[trapier@revnd wee-slack]$ cat /etc/NetworkManager/dispatcher.d/40-weeslack
#!/bin/sh
# This is a NetworkManager dispatcher script to reload the wee_slack
# plugin in weechat when a network interface is brought up

WEECHAT_FIFO=~trapier/.weechat/weechat_fifo

# Check if there is a default route
if test -p ${WEECHAT_FIFO} && test $2 == "connectivity-change" && /sbin/ip route list 2> /dev/null | grep -q '^default'; then
        echo '*/python reload slack' >  ${WEECHAT_FIFO}
  exit 0
fi

plugins.var.python.slack.slack_autoreconnect would be nice to have. Like weechat works with irc server.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonsmith picture simonsmith  路  5Comments

luk1337 picture luk1337  路  8Comments

JanKoppe picture JanKoppe  路  6Comments

tuananh picture tuananh  路  9Comments

ahmedelgabri picture ahmedelgabri  路  9Comments