diff --git a/README.md b/README.md index e4862e8..d2b649f 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ a message their path between single quotes ('). - Vim-like key bindings are also available, use `hjkl` to navigate between lists, use `i` to select the text area and `esc` to leave it. -- Use Shift + Up or Shift + Down to navigate in your own message history. +- Use `shift + Up` or `shift + Down` to navigate in your own message history. #### Troubleshooting diff --git a/nctelegram b/nctelegram index 120f17d..1ae6898 100755 --- a/nctelegram +++ b/nctelegram @@ -6,6 +6,17 @@ import os.path import configparser import ncTelegram +import psutil + + + +# Check if telegram-cli is already running on the same port +list_connection = [ i[4] for i in psutil.net_connections() ] +for connection in list_connection: + if connection and connection[1] == 4458: + print('telegram-cli is already running, kill it before starting ncTelegram') + sys.exit(1) + userconf = os.path.expanduser("~")+'/.ncTelegram.conf'