Provided by: localslackirc_1.33-1_all
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: -h, --help Show the help message and exit. -v, --version Show the version and exit. -p PORT, --port PORT Set the port number. The default is 9007. -i IP, --ip IP Set the IP (Ipv4 only) address to listen to. The default is 127.0.0.1. -t TOKENFILE, --tokenfile TOKENFILE Set the token file. The default is ~/.localslackirc. -c TOKENFILE, --cookiefile TOKENFILE Set the cookie file. This is only used on slack, and is only useful if your token starts with "xoxc". -u, --nouserlist Don't display userlist in the IRC client. -j, --autojoin Automatically join all remote channels. -o, --override Allow listening on addresses that do not start with 127.* This is potentially dangerous. --downloads-directory 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. --formatted-max-lines 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. -f --status-file Path to the file keeping the status. When this is set, it allows for the history to be loaded on start. --silenced-yellers 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. -d --debug Enables debugging logs. --log-suffix 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. --ignored-channels 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. If the user gets personally mentioned in one of the ignored channels, it will be joined anyway. General mentions will be ignored. --no-rejoin-on-mention 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. --control-socket CONTROL_SOCKET 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 easiest way to obtain the COOKIE and the TOKEN, is to login in slack using Firefox, closing Firefox and running lsi-getconf. It will parse your saved cookies and try to find the values. If that should fail, the README contains the procedure to manually extract them from the browser.
ENVIRONMENT
The following environment variables are used. They override command line settings. The alternatives to switches must contain "true" to work. COOKIE Alternative to --cookiefile DOWNLOADS_DIRECTORY Alternative to --downloads-directory FORMATTED_MAX_LINES Alternative to --formatted-max-lines PORT Alternative to --port TOKEN Alternative to --tokenfile PROCESS_OWNER 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. IP_ADDRESS Alternative to --ip OVERRIDE_LOCAL_IP Alternative to --override STATUS_FILE Path to the status file AUTOJOIN Alternative to --autojoin Set to "true" to enable. NOUSERLIST Alternative to --nouserlist Set to "true" to enable. DEBUG Alternative to --debug LOG_SUFFIX Alternative to --log-suffix IGNORED_CHANNELS Alternative to --ignored-channels NO_REJOIN_ON_MENTION Alternative to --no-rejoin-on-mention Set to "true" to enable. SILENCED_YELLERS Alternative to --silenced-yellers CONTROL_SOCKET 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-getconf(1),lsi-send(1),lsi-write(1)
WEB
https://codeberg.org/ltworf/localslackirc
AUTHOR
Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>