argparse: add --no-connect option to disable autoconnect rules in configuration files
This commit is contained in:
parent
f575674d47
commit
22a2ba76c4
2 changed files with 7 additions and 1 deletions
|
|
@ -32,6 +32,9 @@ if __name__ == "__main__":
|
|||
# Parse command line arguments
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument("-a", "--no-connect", action="store_true",
|
||||
help="disable auto-connect to servers at startup")
|
||||
|
||||
parser.add_argument("-v", "--verbose", action="count",
|
||||
default=0,
|
||||
help="verbosity level")
|
||||
|
|
@ -87,6 +90,9 @@ if __name__ == "__main__":
|
|||
context = bot.Bot(modules_paths=modules_paths, data_path=args.data_path,
|
||||
verbosity=args.verbose)
|
||||
|
||||
if args.no_connect:
|
||||
context.noautoconnect = True
|
||||
|
||||
# Load the prompt
|
||||
prmpt = prompt.Prompt()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue