# Slack plugin for weechat



## scottro (May 17, 2018)

Networking seems as good a place as any to post this.  For those who use slack, whether by choice or not, I suspect many, like myself, prefer using it with irssi or weechat. At any rate, as of May 15th, 2018, Slack discontinued their irc gateway.  I'd seen the announcements, but basically found out the hard way when my irssi window went from something like 15 windows to 4.  

They did suggest the (unsupported by them) wee-slack plugin. It's a python script that you can load with weechat, and allows you to continue using slack from a terminal or console while keeping your irc channels in the same terminal. As having to have had a browser page open for slack would have been a major annoyance to my workflow, I was glad to find this, and figured I'd pass it along in case other had the same problem. (Meh, maybe I'm the only one at a company who uses slack, but ya never know.)
https://github.com/wee-slack/wee-slack is the page.  You don't have to build it, just start from the setup section in the middle of the  page and follow the instructions.  You install py-websocket-client and py27-six, then get the script. (Their instructions use wget, but you can use fetch of course.)  

Worked like a charm for me.  As the change (of stopping irc support, thereby breaking irssi for me) caught me by surprise, I found this very useful.  

Hopefully, this won't degenerate into a discussion of how bad Slack is. Though I did find myself amused, when first googling the issue, by the xkcd strip.   https://xkcd.com/1782/

And hopefully it won't degenerate into a discussion of how bad in general the current reliance on GUIs is. It started with html mail, and I remember, in the early double oughts, even the MS lists would rant about the increase in html mail and the attack vectors it opened. 

I think many of us (or maybe mostly the older folks) already dislike the increasing reliance upon GUIs, often at the expense of text based things. But sad to say, it is a fact.


----------



## zirias@ (May 17, 2018)

I always found BitlBee very useful for using any strange chatting protocol through something sane like irssi  Seems it can connect with Slack as well. So, just to give an alternative here


----------



## scottro (May 17, 2018)

I will have to look at that when I have time.


----------



## scottro (Jun 9, 2018)

Never did look at bitlbee, it seemed a plugin within a plugin (pluginception?) but came across this the other day. I haven't tried it, just posting this in case someone comes across this thread. 
https://github.com/insomniacslk/irc-slack

For me, though, I've actually gotten to like a couple of weechat things that aren't defaults in irssi, so for the moment will be sticking with wee-slack.


----------



## scottro (Jul 14, 2018)

Well, to update over a month later, I finally got around to trying bitlbee with libpurple's plugin for irssi.  Unlike the weechat-slack plugin, which had clear step by step instructions on the github page, I had to look around to find the correct way to do this. I'll probably put up a page at some point (though the interest doesn't seem high) .
https://blog.nobugware.com/post/2018/bitlbee_slack_hangouts_facebook_irc_gateway/  gave a moderately clear picture, though it doesn't discuss irssi and if  one runs the commands in win 1 you'll just get command not found.  You have to go to the bittlbee window, /win 2.  (Also, the author says one should get the libpurple slack git repo, but FreeBSD has a package libpurple-slack which works).

I also didn't see a  way to save the settings, including trying to put them in $HOME/.irrsi/config but by that point, I wasn't that interested.

Anyway, the upshot is that you connect to bittlebee, create a slack token, then connect. (Again, I had to do this each time, but I am sure there's a way to save.)  At that point, it doesn't show you connected to slack server, but may show some of your team connected to bittlbee.  To join a channel, you first run 
	
	



```
chat add slack general
```
 as an example, and as shown, without a leading slash from the bittlbee window and then run, as normal /join #general). 

In contrast, the weechat plugin connects you directly to slack, you can easily save your session (say if you are in 5 channels but next time, don't want the 5th, you can close the 5th channel, and the next time you log in, it won't be there. )

Also, for someone lazy like me, the fact that they had clear step by step working instructions in one place was a big plus.

EDIT: My little page is done.  http://srobb.net/slackircclient.html


----------



## scottro (Jun 9, 2019)

In case this thread comes up in a google search, it may be worth mentioning that upgrading weechat to 2.5 broke things with the same error as the OP in this bug report. https://github.com/wee-slack/wee-slack/issues/676 

Downgrading to 2.3 (I didn't have 2.4 in /var/cache/pkg) fixed it.


----------



## scottro (Jun 12, 2019)

Oh....kay.  So, with much help from the weeslack developer, it turns out that one can use the latest weechat. Later weechat uses python3, my old script and dependencies were using python2.  So, get the latest version with curl as described on the github page, https://github.com/wee-slack/wee-slack
and the developer has updated instructions to reflect latest dependencies.


----------

