Scroll to navigation

localslackirc(1) General Commands Manual localslackirc(1)

NAME

localslackirc - Creates an IRC server running locally, which acts as a gateway to slack for one user.

SYNOPSIS

localslackirc [OPTIONS]

DESCRIPTION

This command starts an IRC server running on 127.0.0.1:9007 which acts as a gateway to slack for one user.
To connect to multiple instances it is necessary to run multiple instances of this software.

Options:

Show the help message and exit.
Show the version and exit.
Set the port number. The default is 9007.
Set the IP (Ipv4 only) address to listen to. The default is 127.0.0.1.
Set the token file. The default is ~/.localslackirc.
Set the cookie file. This is only used on slack, and is only useful if your token starts with "xoxc".
Don't display userlist in the IRC client.
Automatically join all remote channels.
Allow listening on addresses that do not start with 127.*
This is potentially dangerous.
Where to create files for automatic downloads. It defaults to /tmp.
The directory must exist and be writeable. Files will automatically be downloaded in it.
No cleaning is automatically performed on it by localslackirc.
Maximum amount of lines in a formatted text to send to the client rather than store in a file.
When people send logs or otherwise long text content as formatted text, the end result is usually hardly readable in IRC, having the username of the sender and the time in each line.
This option sets a limit for formatted content to be sent as text.
When the limit is exceeded, the formatted text will be stored as a .txt file instead and its URL will be shown in the IRC client.
The files will be saved in the path specified by "downloads directory".
The files are not automatically removed.
Setting to 0 (the default) will send everything to the client and create no text files.
Path to the file keeping the status. When this is set, it allows for the history to be loaded on start.
Comma separated list of nicknames and channels that are prevented from using general mentions (@here, @channel, @everyone, and the likes).
Since some people are greatly abusing the feature, this is to make them less annoying.
Their messages aren't blocked and are shown as "yelling MESSAGE", but the nickname of the user won't be injected in the message, so the IRC client won't create a notification.
The channels must begin with #.
The threads created from a silenced channel will also be silenced.
Enables debugging logs.
Instead of using localslackirc as ident for syslog, this appends a custom string, separated by a -.
This is useful when running several instances, to be able to distinguish the logs.
The default .service file uses this. Of course journald keeps track of the services but this makes it easier to have the information on text dumps or other logging daemons such as rsyslog.
Comma separated list of channels to ignore and not automatically join on IRC.
It is ignored unless autojoin is set.
If a channel is in this list, the IRC client will not automatically join it, but on slack you will still be inside the channel
This is useful to avoid off topic channels in which coworkers who can't take a hint keep re-inviting.
The ignored channels can be joined again if needed, with a /join #channel command. However the conversation history will not be fetched.
For channel names containing non ascii characters, their ascii representation needs to be used. Use /list to see which that is.
Normally localslackirc will automatically join channel and threads if someone mentions the user.
When this is set the mentions will be ignored and no channels or threads will be joined upon mention.
When used, localslackirc will create a unix socket in the specified path, that can be used by the various lsi-* commands to interact with localslackirc.
Before an IRC client connects to localslackirc, the process is in a dormant unconnected state and is not connected to slack. For this reason the control socket exists only when an IRC client is connected.

TOKEN

The access token is (unless specified otherwise) located in ~/.localslackirc, for information on how to obtain your token, check the README file.

ENVIRONMENT

The following environment variables are used. They override command line settings. The alternatives to switches must contain "true" to work.

Alternative to --cookiefile
Alternative to --downloads-directory
Alternative to --formatted-max-lines
Alternative to --port
Alternative to --tokenfile
If running as root, this is the name of the user to switch to. If this is not specified, "nobody" will be used.
This is very useful to start localslackirc as a service and configure which user to use in the configuration file.
Alternative to --ip
Alternative to --override
Path to the status file
Alternative to --autojoin
Set to "true" to enable.
Alternative to --nouserlist
Set to "true" to enable.
Alternative to --debug
Alternative to --log-suffix
Alternative to --ignored-channels
Alternative to --no-rejoin-on-mention
Set to "true" to enable.
Alternative to --silenced-yellers
Alternative to --control-socket

Additional IRC commands

Some commands are added, to use some additional features that are present in slack but not IRC.

/sendfile destination /path/to/file
Sends the specified file to destination.
The destination can be a user or a channel, in which case it must begin with #.
/annoy user [duration]
The indicated user will be annoyed.
This means that whenever a typing event is received from that user, on any channel, a type event on the same channel will be sent back, making the user think you are about to write something too.
duration is the duration of the annoyance in minutes. It defaults to 10.
/autoreact user probability [reaction] [duration]
To automate reacting to messages, this nice feature is available.
user is the username of the user that we want to react to.
probability is a number between 0 and 1, to decide how much to react.
reaction is the reaction to use. The default is "thumbsup".
duration indicates when to stop doing it, in minutes. Defaults to 10. Setting it to -1 makes it never expire.
/dropautoreact user
Deletes all the automatic reacts for a given user
/dropannoy user
Stops annoying the given user
/listannoy
Lists the users that are currently being annoyed
/listautoreact
Lists the automatic reactions

SEE ALSO

lsi-send(1),lsi-write(1)

WEB

https://github.com/ltworf/localslackirc

AUTHOR

Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>
November 22, 2023 IRC gateway for slack