Slack seems to be getting more aggressive about insisting you use a bloated GUI. When it began, it was easy to use with irssi and weechat. Now, as you'll see below, irssi takes a lot of work, and weechat requires a plugin made by someone. Both of these rely on legacy tokens.
Slack now says it will be removing legacy tokens in May. Whether the methods outlined below will work after that, I don't know. Unfortunately, (to my point of view, anyway) people have gotten so used to bloated GUIs that they can get away with this. Slack seems to have pulled off, successfully, the thing that used to be attributed to Microsoft, embrace, engulf, extinguish. One can only hope that more IT departments will go back to using IRC, but it seems doubtful.
When Slack, the chat client, first came along, it provided gateways for using one's desired irc client. As of May 15, 2018, they dropped this. Whether one uses Slack out of choice or necessity, many of use wanted to continue using our irc client, at least in most circumstances. This article covers using weechat and irssi with Slack.
There is a slack-term. I haven't used it yet, and I believe it does use legacy tokens, but I am not sure. Its github page is here. There is a link there that takes you to another page explaining how to get a slack token. It seems as if it may be a good solution for those of us who prefer terminal clients. If the weechat-slack plugin ever stops working for me, this would be what I'd try.
The weechat-slack plugin is the easier to use. All instructions are right there on the github page, and step by step instructions are right under the setup section. Upon saving your configuration, as pointed out in the article, once you reopen, you will have your slack channels all open, as if you'd logged out and back into the web interface. I have not put instructions here because they are so clearly outlined on the github page.
With upgrades to weechat, if you are using the original plugin, it may stop working. If you've upgraded weechat and the slack plugin no longer works, go back to the github page and get the latest wee_slack.py. The original one should be in $HOME/.weechat/python, possibly with a symlink in $HOME/.weechat/python/autoload.
As a sidenote, when talking about upgrading, those who use FreeBSD and use weechat with aspell for spell check, will find that aspell no longer works. The description didn't make it into the last commit, but this is easily fixed by using spell, instead of aspell. So, next time you start weechat
/spell enable /set spell.check.default_dict en
That, of course, assumes you're using English, If not, replace the en with your language, e.g,, de or fr
Note that as of CentOS-8, in April of 2020 there was still no weechat package. However, Laurent Wandrebeck has built one that works perfectly. It may get into EPEL, one never knows. To get the spec file, see the bug report.
One last note on weechat. If the mouse is enabled, it won't cut or paste text in a weechat buffer. However, if you hit the shift key, you will be able to cut and paste text. In my weechat use, the only time I use the mouse is to cut or paste text, so I have mouse = off in my ~/.weechat/weechat.conf. This allows cutting and pasting in buffer without having to use the shift key. I mention this because, although it is in their FAQ, I overlooked it and it took me quite awhile to figure out why I couldn't cut and paste text into a buffer.
Using irssi requires more work. It requires the bitlbee plugin for irssi (and other irc clients) as well as the libpurple plugin for bitlbee. In CentOS-7, the libpurple plugin didn't include slack, so one also has to add a libpurple-slack git repo. (More on that shortly). FreeBSD has a libpurple-slack plugin which can be installed. In addition, I've yet to find a set of instructions from start to finish to install it with irssi and slack. Also note that the bitlbee page for libpurple mentions how it can be resource hungry, though on most modern machines, I doubt that's a factor
Assuming irssi is installed, install bitlbee. This will depend upon your distribution. In CentOS-7 it's available with yum, in FreeBSD-11.2 it's available from package or port. With FreeBSD, also install the libpurple-slack port. In CentOS-7, though it will install a libpurple rpm, you won't have slack.
The program should install an /etc/bitlbee/bitlbee.conf directory in most Linux distributions. FreeBSD doesn't seem to include a sample bitlbee.conf file, though it has a manpage. There is none listed in the pkg-plist file. One can probably find a sample on the web. In my case, I just copied it over from CentOS-7's supplied one. Look for the line RunMode. It's commented out to the default of Inetd about line 19. I change it to Daemon.
In CentOS, it can be started with systemctl start bitlbee.service, in FreeBSD with service bitlbee onestart. (That's assuming you haven't added it to /etc/rc.conf)
Once bitlbee is running, start irssi. Type the command /connect localhost and if you go to /window 2 you'll see it's connected to bitlbee. In the bitlbee window type
Type it as shown, it doesn't have a leading slash. If you're not in the bitlbe window, you'll get an error. If you're running FreeBSD and installed the libpurple-slack plugin, you should see among other things.
* slack (Slack)
or similar. If it shows a lot of other protocols, but not slack, you're going to have to add slack-libpurple. If on CentOS-7, first install libpurple-devel.
Go to that page, clone it with
git clone https://github.com/dylex/slack-libpurple.git
Now, cd into the directory and run sudo make install.
At this point, rather than continuing with that page's instructions, I've found the Fabrice Aneche page very helpful. Most of the rest of this is taken from their page.
Once you've installed the libpurple-slack, you can restart bitlbee and irssi and once again, in /window 2, try the help purple. Hopefully, Slack will show as a protocol.
Next add your slack domain. Again, in /window 2, no leading slash, as this will give an error in irssi.
account add slack firstname.lastname@example.org
Now, get a legacy token from slack. Go to slack's page for it and copy it. Still in the bitlebee window
account slack set api_token xoxp-xxxxxxxxx
Now, if you type account slack on (still in the bitlbee window), you should be able to connect.
This didn't exactly connect me to slack. Instead I saw some of my co-workers connected to bitlbee. At this point, you can probably use /msg to reach them. If you want to join an existing channel, you type
chat add slack tech-meetings
That should show success. Again, we're still in the bitlbee window--any of these commands without a backslash are in the bitlbee window. Then, as you would in a normal irssi session, from any window, type /join #tech-meetings. You will be attached, but if you look at the first window, and use ctl+x to view servers, you won't be on the slack server, you'll just see the bitlbee server.
I didn't find a way to save this in irrssi. Hitting /save, while it said it was writing to irssi config, did not seem to do so. If I signed off and signed on again, I had to go through the same steps, of adding slack email@example.com, getting a new token and doing account slack on. As I'd already decided that I preferred the weechat plugin, I didn't investigate any further. I'm sure there's a way to do it