├── .gitignore ├── contrib └── docker │ ├── Dockerfile │ └── bitlbee.conf ├── autogen.sh ├── Makefile.am ├── doc ├── Makefile.am └── discord-help.txt ├── src ├── Makefile.am ├── discord-handlers.h ├── discord-http.h ├── discord-websockets.h ├── discord-util.h ├── discord.h ├── discord.c ├── discord-util.c ├── discord-websockets.c ├── discord-http.c └── discord-handlers.c ├── configure.ac ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | *.la 2 | *.lo 3 | *.o 4 | *.tar.* 5 | .deps 6 | .libs 7 | aclocal.m4 8 | autom4te.cache 9 | build-aux 10 | config.log 11 | config.status 12 | configure 13 | debian 14 | facebook/facebook-marshal.* 15 | INSTALL 16 | libtool 17 | libtool.m4 18 | lt*.m4 19 | Makefile 20 | Makefile.in 21 | config.h* 22 | stamp-h1 23 | TAGS 24 | src/TAGS 25 | -------------------------------------------------------------------------------- /contrib/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | MAINTAINER Daniel da Silva 3 | 4 | # Make & install 5 | RUN apt-get update 6 | RUN apt-get install bitlbee-dev bitlbee-libpurple bitlbee-plugin-otr git autoconf build-essential autoproject libtool glib2.0 glib2.0-dev -y 7 | RUN cd tmp && git clone https://github.com/sm00th/bitlbee-discord.git && cd bitlbee-discord && ./autogen.sh && ./configure && make && make install 8 | 9 | # Bitlbee config 10 | EXPOSE 6667 11 | VOLUME ["/var/lib/bitlbee"] 12 | COPY bitlbee.conf /etc/bitlbee/bitlbee.conf 13 | WORKDIR / 14 | RUN chown -R bitlbee /var/lib/bitlbee/ 15 | 16 | ENTRYPOINT chown -R bitlbee /var/lib/bitlbee && /usr/sbin/bitlbee -n -c /etc/bitlbee/bitlbee.conf 17 | 18 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2016 Artem Savkov 3 | # 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 2 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | 17 | mkdir -p m4 18 | autoreconf --verbose --force --install 19 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Artem Savkov 2 | # 3 | # This program is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation, either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program. If not, see . 15 | 16 | AUTOMAKE_OPTIONS = foreign 17 | ACLOCAL_AMFLAGS = -Im4 18 | SUBDIRS = src doc 19 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Artem Savkov 2 | # 3 | # This program is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation, either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program. If not, see . 15 | 16 | EXTRA_DIST = discord-help.txt 17 | 18 | install-data-local: 19 | if [ -f $(datadir)/help.txt ]; then \ 20 | for file in $(EXTRA_DIST); do \ 21 | mkdir -p $(DESTDIR)$(datadir); \ 22 | $(INSTALL) -m 644 $(srcdir)/$$file $(DESTDIR)$(datadir)/; \ 23 | done \ 24 | else \ 25 | echo "Detected dir $(datadir) is not bitlbee's data dir"; \ 26 | echo "Skipping help install"; \ 27 | fi 28 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Artem Savkov 2 | # 3 | # This program is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation, either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program. If not, see . 15 | 16 | libdir = $(plugindir) 17 | lib_LTLIBRARIES = discord.la 18 | 19 | discord_la_CFLAGS = \ 20 | $(BITLBEE_CFLAGS) \ 21 | $(GLIB_CFLAGS) \ 22 | -Wall \ 23 | -std=c99 24 | 25 | discord_la_LDFLAGS = \ 26 | $(BITLBEE_LIBS) \ 27 | $(GLIB_LIBS) \ 28 | -module \ 29 | -avoid-version 30 | 31 | discord_la_SOURCES = \ 32 | discord.c \ 33 | discord.h \ 34 | discord-handlers.c \ 35 | discord-handlers.h \ 36 | discord-http.c \ 37 | discord-http.h \ 38 | discord-util.c \ 39 | discord-util.h \ 40 | discord-websockets.c \ 41 | discord-websockets.h 42 | -------------------------------------------------------------------------------- /src/discord-handlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Artem Savkov 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #include "discord.h" 18 | #include 19 | 20 | typedef enum { 21 | ACTION_CREATE, 22 | ACTION_DELETE, 23 | ACTION_UPDATE 24 | } handler_action; 25 | 26 | void discord_handle_message(struct im_connection *ic, json_value *minfo, 27 | handler_action action, gboolean use_tstamp); 28 | void discord_handle_channel(struct im_connection *ic, json_value *cinfo, 29 | const char *server_id, handler_action action); 30 | /* Returns TRUE if it called iwc_logout() */ 31 | gboolean discord_parse_message(struct im_connection *ic, gchar *buf, guint64 size); 32 | -------------------------------------------------------------------------------- /src/discord-http.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Artem Savkov 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #include 18 | 19 | void discord_http_send_msg(struct im_connection *ic, const char *id, 20 | const char *msg); 21 | void discord_http_create_and_send_msg(struct im_connection *ic, 22 | const char *handle, const char *msg); 23 | void discord_http_send_ack(struct im_connection *ic, const char *channel_id, 24 | const char *message_id); 25 | void discord_http_get_backlog(struct im_connection *ic, 26 | const char *channel_id); 27 | void discord_http_get_pinned(struct im_connection *ic, const char *channel_id); 28 | void discord_http_login(account_t *acc); 29 | void discord_http_mfa_auth(struct im_connection *ic, const char *msg); 30 | void discord_http_get_gateway(struct im_connection *ic, const char *token); 31 | -------------------------------------------------------------------------------- /src/discord-websockets.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Artem Savkov 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #include "discord.h" 18 | 19 | typedef enum { 20 | OPCODE_DISPATCH, 21 | OPCODE_HEARTBEAT, 22 | OPCODE_IDENTIFY, 23 | OPCODE_STATUS_UPDATE, 24 | OPCODE_VOICE_UPDATE, 25 | OPCODE_VOICE_PING, 26 | OPCODE_RESUME, 27 | OPCODE_RECONNECT, 28 | OPCODE_REQUEST_MEMBERS, 29 | OPCODE_INVALID_SESSION, 30 | OPCODE_HELLO, 31 | OPCODE_HEARTBEAT_ACK, 32 | OPCODE_REQUEST_SYNC, 33 | OPCODE_REQUEST_SYNC_PRIVATE_GROUP, 34 | OPCODE_REQUEST_SYNC_CHANNEL 35 | } discord_opcode; 36 | 37 | gboolean discord_ws_keepalive_loop(gpointer data, gint fd, 38 | b_input_condition cond); 39 | 40 | int discord_ws_init(struct im_connection *ic, discord_data *dd); 41 | void discord_ws_cleanup(discord_data *dd); 42 | void discord_ws_set_status(struct im_connection *ic, gchar *status, 43 | gchar *message); 44 | void discord_ws_sync_server(discord_data *dd, const char *id); 45 | void discord_ws_sync_channel(discord_data *dd, const char *guild_id, 46 | const char *channel_id, unsigned int members); 47 | void discord_ws_sync_private_group(discord_data *dd, const char *channel_id); 48 | -------------------------------------------------------------------------------- /src/discord-util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Artem Savkov 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #include "discord.h" 18 | #include 19 | #include 20 | #include 21 | 22 | typedef enum { 23 | SEARCH_UNKNOWN, 24 | SEARCH_ID, 25 | SEARCH_NAME, 26 | SEARCH_NAME_IGNORECASE, 27 | SEARCH_FNAME, 28 | SEARCH_IRC_USER_NAME, 29 | SEARCH_IRC_USER_NAME_IGNORECASE 30 | } search_t; 31 | 32 | channel_info *get_channel(discord_data *dd, const char *channel_id, 33 | const char *server_id, search_t type); 34 | user_info *get_user(discord_data *dd, const char *uname, 35 | const char *server_id, search_t type); 36 | server_info *get_server_by_id(discord_data *dd, const char *server_id); 37 | 38 | void free_channel_info(channel_info *cinfo); 39 | void free_discord_data(discord_data *dd); 40 | void free_server_info(server_info *sinfo); 41 | void free_user_info(user_info *uinfo); 42 | void free_gw_data(gw_data *gw); 43 | char *discord_canonize_name(const char *name); 44 | char *discord_escape_string(const char *msg); 45 | void discord_debug(char *format, ...); 46 | char *discord_utf8_strndup(const char *str, size_t n); 47 | 48 | /* input: 2018-05-24T19:06:42.190000+00:00 */ 49 | /* output: 1527188802 (the .19 and timezone are discarded) */ 50 | time_t parse_iso_8601(const char *timestamp); 51 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Artem Savkov 2 | # 3 | # This program is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation, either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program. If not, see . 15 | 16 | AC_INIT( 17 | [bitlbee-discord], 18 | [0.4.3], 19 | [https://github.com/sm00th/bitlbee-discord/issues], 20 | [bitlbee-discord], 21 | [https://github.com/sm00th/bitlbee-discord], 22 | ) 23 | 24 | AC_CONFIG_AUX_DIR([build-aux]) 25 | AC_CONFIG_MACRO_DIR([m4]) 26 | AM_INIT_AUTOMAKE([no-define]) 27 | 28 | AC_PROG_CC 29 | AM_PROG_CC_C_O 30 | 31 | AC_DISABLE_STATIC 32 | LT_INIT 33 | 34 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 35 | m4_ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99]) 36 | 37 | # Define PKG_CHECK_VAR() for pkg-config < 0.28 38 | m4_define_default( 39 | [PKG_CHECK_VAR], 40 | [AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config]) 41 | AS_IF([test -z "$$1"], [$1=`$PKG_CONFIG --variable="$3" "$2"`]) 42 | AS_IF([test -n "$$1"], [$4], [$5])] 43 | ) 44 | 45 | # Checks for libraries. 46 | PKG_CHECK_MODULES([BITLBEE], [bitlbee >= 3.5]) 47 | PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32]) 48 | 49 | AC_CONFIG_HEADERS([config.h]) 50 | 51 | # Checks for typedefs, structures, and compiler characteristics. 52 | AC_TYPE_SIZE_T 53 | 54 | # Checks for library functions. 55 | AC_CHECK_FUNCS([memset]) 56 | 57 | # bitlbee-specific stuff 58 | AC_ARG_WITH([plugindir], 59 | [AS_HELP_STRING([--with-plugindir], [BitlBee plugin directory])], 60 | [plugindir="$with_plugindir"] 61 | ) 62 | 63 | AS_IF( 64 | [test -z "$plugindir"], 65 | [PKG_CHECK_VAR( 66 | [BITLBEE_PLUGINDIR], 67 | [bitlbee], 68 | [plugindir], 69 | [plugindir="$BITLBEE_PLUGINDIR"], 70 | [plugindir="$libdir/bitlbee"] 71 | )] 72 | ) 73 | 74 | AC_SUBST([plugindir]) 75 | 76 | AC_ARG_WITH([bdatadir], 77 | [AS_HELP_STRING([--with-bdatadir], [BitlBee data directory])], 78 | [bdatadir="$with_bdatadir"] 79 | ) 80 | 81 | AS_IF( 82 | [test -z "$bdatadir"], 83 | [PKG_CHECK_VAR( 84 | [BITLBEE_DATADIR], 85 | [bitlbee], 86 | [datadir], 87 | [datadir="$BITLBEE_DATADIR"], 88 | [datadir="$datarootdir/bitlbee"] 89 | )], 90 | [datadir="$bdatadir"] 91 | ) 92 | 93 | AC_SUBST([datadir]) 94 | 95 | AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile]) 96 | AC_OUTPUT 97 | -------------------------------------------------------------------------------- /src/discord.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Artem Savkov 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #ifndef __DISCORD_H 18 | #define __DISCORD_H 19 | 20 | #include 21 | 22 | #define DISCORD_HOST "discordapp.com" 23 | #define DEFAULT_KEEPALIVE_INTERVAL 30000 24 | #define DISCORD_MFA_HANDLE "discord_mfa" 25 | 26 | typedef enum { 27 | WS_IDLE, 28 | WS_CONNECTING, 29 | WS_CONNECTED, 30 | WS_ALMOST_READY, 31 | WS_READY, 32 | WS_CLOSING, 33 | } ws_state; 34 | 35 | typedef enum { 36 | CHANNEL_TEXT, 37 | CHANNEL_PRIVATE, 38 | CHANNEL_VOICE, 39 | CHANNEL_GROUP_PRIVATE 40 | } channel_type; 41 | 42 | typedef enum { 43 | RELATIONSHIP_NONE, 44 | RELATIONSHIP_FRIENDS, 45 | RELATIONSHIP_UNKNOWN, 46 | RELATIONSHIP_REQUEST_RECEIVED, 47 | RELATIONSHIP_REQUEST_SENT 48 | } relationship_type; 49 | 50 | typedef struct _gw_data { 51 | int wss; 52 | gchar *addr; 53 | gchar *path; 54 | } gw_data; 55 | 56 | typedef struct _discord_data { 57 | char *token; 58 | char *id; 59 | char *session_id; 60 | char *uname; 61 | gw_data *gateway; 62 | GSList *servers; 63 | GSList *pchannels; 64 | gint main_loop_id; 65 | GString *ws_buf; 66 | ws_state state; 67 | gint keepalive_interval; 68 | gint keepalive_loop_id; 69 | gint heartbeat_timeout_id; 70 | gint status_timeout_id; 71 | void *ssl; 72 | int sslfd; 73 | gint inpa; 74 | gint wsid; 75 | guint64 seq; 76 | GSList *pending_reqs; 77 | GSList *pending_events; 78 | gboolean reconnecting; 79 | GHashTable *sent_message_ids; 80 | } discord_data; 81 | 82 | typedef struct _server_info { 83 | char *name; 84 | char *id; 85 | GSList *users; 86 | GSList *channels; 87 | struct im_connection *ic; 88 | } server_info; 89 | 90 | typedef struct _channel_info { 91 | char *id; 92 | guint64 last_msg; 93 | guint64 last_read; 94 | union { 95 | struct { 96 | struct groupchat *gc; 97 | char *name; 98 | bee_chat_info_t *bci; 99 | server_info *sinfo; 100 | } channel; 101 | struct { 102 | char *name; 103 | struct im_connection *ic; 104 | } handle; 105 | struct { 106 | struct groupchat *gc; 107 | char *name; 108 | bee_chat_info_t *bci; 109 | GSList *users; 110 | struct im_connection *ic; 111 | } group; 112 | } to; 113 | channel_type type; 114 | GSList *pinned; 115 | } channel_info; 116 | 117 | typedef struct _user_info { 118 | char *id; 119 | char *name; 120 | channel_info *voice_channel; 121 | bee_user_t *user; 122 | guint32 flags; 123 | } user_info; 124 | 125 | gboolean discord_is_self(struct im_connection *ic, const char *who); 126 | 127 | struct groupchat *discord_chat_do_join(struct im_connection *ic, 128 | const char *name, 129 | gboolean is_auto_join); 130 | void discord_soft_reconnect(struct im_connection *ic); 131 | 132 | #endif //__DISCORD_H 133 | -------------------------------------------------------------------------------- /contrib/docker/bitlbee.conf: -------------------------------------------------------------------------------- 1 | ## BitlBee default configuration file 2 | ## 3 | ## Comments are marked like this. The rest of the file is INI-style. The 4 | ## comments should tell you enough about what all settings mean. 5 | ## 6 | 7 | [settings] 8 | 9 | ## RunMode: 10 | ## 11 | ## Inetd -- Run from inetd (default) 12 | ## Daemon -- Run as a stand-alone daemon, serving all users from one process. 13 | ## This saves memory if there are more users, the downside is that when one 14 | ## user hits a crash-bug, all other users will also lose their connection. 15 | ## ForkDaemon -- Run as a stand-alone daemon, but keep all clients in separate 16 | ## child processes. This should be pretty safe and reliable to use instead 17 | ## of inetd mode. 18 | ## 19 | RunMode = ForkDaemon 20 | 21 | ## User: 22 | ## 23 | ## If BitlBee is started by root as a daemon, it can drop root privileges, 24 | ## and change to the specified user. 25 | ## 26 | User = bitlbee 27 | 28 | ## DaemonPort/DaemonInterface: 29 | ## 30 | ## For daemon mode, you can specify on what interface and port the daemon 31 | ## should be listening for connections. 32 | ## 33 | # DaemonInterface = 0.0.0.0 34 | # DaemonPort = 6667 35 | 36 | ## ClientInterface: 37 | ## 38 | ## If for any reason, you want BitlBee to use a specific address/interface 39 | ## for outgoing traffic (IM connections, HTTP(S), etc.), set it here. 40 | ## 41 | # ClientInterface = 0.0.0.0 42 | 43 | ## AuthMode 44 | ## 45 | ## Open -- Accept connections from anyone, use NickServ for user authentication. 46 | ## (default) 47 | ## Closed -- Require authorization (using the PASS command during login) before 48 | ## allowing the user to connect at all. 49 | ## Registered -- Only allow registered users to use this server; this disables 50 | ## the register- and the account command until the user identifies itself. 51 | ## 52 | # AuthMode = Open 53 | 54 | ## AuthPassword 55 | ## 56 | ## Password the user should enter when logging into a closed BitlBee server. 57 | ## You can also have a BitlBee-style MD5 hash here. Format: "md5:", followed 58 | ## by a hash as generated by "bitlbee -x hash ". 59 | ## 60 | # AuthPassword = ItllBeBitlBee ## Heh.. Our slogan. ;-) 61 | ## or 62 | # AuthPassword = md5:gzkK0Ox/1xh+1XTsQjXxBJ571Vgl 63 | 64 | ## OperPassword 65 | ## 66 | ## Password that unlocks access to special operator commands. 67 | ## 68 | # OperPassword = ChangeMe! 69 | ## or 70 | # OperPassword = md5:I0mnZbn1t4R731zzRdDN2/pK7lRX 71 | 72 | ## HostName 73 | ## 74 | ## Normally, BitlBee gets a hostname using getsockname(). If you have a nicer 75 | ## alias for your BitlBee daemon, you can set it here and BitlBee will identify 76 | ## itself with that name instead. 77 | ## 78 | # HostName = localhost 79 | 80 | ## MotdFile 81 | ## 82 | ## Specify an alternative MOTD (Message Of The Day) file. Default value depends 83 | ## on the --etcdir argument to configure. 84 | ## 85 | # MotdFile = /etc/bitlbee/motd.txt 86 | 87 | ## ConfigDir 88 | ## 89 | ## Specify an alternative directory to store all the per-user configuration 90 | ## files. (.nicks/.accounts) 91 | ## 92 | ConfigDir = /var/lib/bitlbee 93 | 94 | ## Ping settings 95 | ## 96 | ## BitlBee can send PING requests to the client to check whether it's still 97 | ## alive. This is not very useful on local servers, but it does make sense 98 | ## when most clients connect to the server over a real network interface. 99 | ## (Public servers) Pinging the client will make sure lost clients are 100 | ## detected and cleaned up sooner. 101 | ## 102 | ## PING requests are sent every PingInterval seconds. If no PONG reply has 103 | ## been received for PingTimeOut seconds, BitlBee aborts the connection. 104 | ## 105 | ## To disable the pinging, set at least one of these to 0. 106 | ## 107 | # PingInterval = 180 108 | # PingTimeOut = 300 109 | 110 | ## Using proxy servers for outgoing connections 111 | ## 112 | ## If you're running BitlBee on a host which is behind a restrictive firewall 113 | ## and a proxy server, you can tell BitlBee to use that proxy server here. 114 | ## The setting has to be a URL, formatted like one of these examples: 115 | ## 116 | ## (Obviously, the username and password are optional) 117 | ## 118 | # Proxy = http://john:doe@proxy.localnet.com:8080 119 | # Proxy = socks4://socksproxy.localnet.com 120 | # Proxy = socks5://socksproxy.localnet.com 121 | 122 | ## Protocols offered by bitlbee 123 | ## 124 | ## As recompiling may be quite unpractical for some people, this option 125 | ## allows to remove the support of protocol, even if compiled in. If 126 | ## nothing is given, there are no restrictions. 127 | ## 128 | # Protocols = jabber yahoo 129 | 130 | ## Trusted CAs 131 | ## 132 | ## Path to a file containing a list of trusted certificate authorities used in 133 | ## the verification of server certificates. 134 | ## 135 | ## Uncomment this and make sure the file actually exists and contains all 136 | ## certificate authorities you're willing to accept (default value should 137 | ## work on at least Debian/Ubuntu systems with the "ca-certificates" package 138 | ## installed). As long as the line is commented out, SSL certificate 139 | ## verification is completely disabled. 140 | ## 141 | ## The location of this file may be different on other distros/OSes. For 142 | ## example, try /etc/ssl/ca-bundle.pem on OpenSUSE. 143 | ## 144 | # CAfile = /etc/ssl/certs/ca-certificates.crt 145 | 146 | [defaults] 147 | 148 | ## Here you can override the defaults for some per-user settings. Users are 149 | ## still able to override your defaults, so this is not a way to restrict 150 | ## your users... 151 | 152 | ## To enable private mode by default, for example: 153 | 154 | ## private = 1 155 | -------------------------------------------------------------------------------- /doc/discord-help.txt: -------------------------------------------------------------------------------- 1 | ?discord 2 | You need to configure discord channels you would like to join/autojoin. To do that, use bitlbee's chat list functionality (help chat list and help chat add): 3 |  chat list discord 4 | This will show you the list of available channel with indexes that can be used for adding channels. 5 |  chat add discord !1 #mydiscordchannel 6 |  chan #mydiscordchannel set auto_join true 7 |  /join #mydiscordchannel 8 | If you set auto_join to true, next time you reconnect there will be no need to join the channel manually. 9 | Alternatively, you may set the auto_join setting on the account itself (account discord set auto_join on) to automatically join all of the server's channels. 10 | You can exclude channels from auto-joining using the auto_join_exclude setting. 11 | See help discord options for more. 12 | % 13 | ?discord options 14 | Various options are available through account set. See help account set for more info. For more help on the the options themselves, use help discord