aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2022-01-12 21:45:19 -0800
committerTrumeet <yuuta@yuuta.moe>2022-01-12 21:45:19 -0800
commit4fa5d022430ded38d18b4f1cca572ac7a800cfe1 (patch)
tree5ca75670c7fd73cb3c3bed24f20a5fde5dd955d2
parentb84d47972e0667d22264a01e185f17af6d96277e (diff)
downloadmutebot-4fa5d022430ded38d18b4f1cca572ac7a800cfe1.tar
mutebot-4fa5d022430ded38d18b4f1cca572ac7a800cfe1.tar.gz
mutebot-4fa5d022430ded38d18b4f1cca572ac7a800cfe1.tar.bz2
mutebot-4fa5d022430ded38d18b4f1cca572ac7a800cfe1.zip
Do not automatically logout
It causes issues with things like locks.
-rw-r--r--README.md4
-rw-r--r--tdutils.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 6dfb7ff..1cba751 100644
--- a/README.md
+++ b/README.md
@@ -42,10 +42,10 @@ Currently, there are only a few options for you:
### Log out
-TDLib treats bots as normal accounts, so you need to log out if you want to change the bot token. To simplify your logout process, MuteBot will automatically logout your bot if you send SIGINT or SIGTERM to the daemon. Therefore, you can safely specify a new bot token at the next startup without worrying that it is still using the old one. However, you may still need to logout manually using the `-l` switch. It does nothing except for logging out the current bot session, if any.
+TDLib treats bots as normal accounts, so you need to log out if you want to change the bot token. You may logout using the `-l` switch. It does nothing except for logging out the current bot session, if any.
# License
WTFPL
-by Yuuta Liang <yuuta@yuuta.moe> \ No newline at end of file
+by Yuuta Liang <yuuta@yuuta.moe>
diff --git a/tdutils.c b/tdutils.c
index 0c50b00..9fd936f 100644
--- a/tdutils.c
+++ b/tdutils.c
@@ -66,7 +66,7 @@ static void *main_sighandler(void *arg) {
case SIGINT:
case SIGTERM:
if (td == -1) goto cleanup;
- td_send(TdCreateObjectLogOut(), &fetal_cb, NULL);
+ tg_close();
goto cleanup;
default:
break;