o bt @sdZddlZddlZddlmZmZmZddlmZddl m Z ddl m Z ddl mZmZmZmZddlmZdd lmZmZGd d d ejejZd d ZdS)z Shiny new words service maker N)ListOptionalSequence)plugin)strports) MultiService)checkers credentialsportalstrcred)usage)iwordsservicec@seZdZUejgZddedfgZe e e e e d<ejdgdZiZdZeejD]Zejevs6Jeeej<eejddddejd fq-[d d Zd d ZddZdS)OptionshostnameNz*Name of this server; purely an informative optParametersgroup)multiUse-portz2strports description of the port to bind for the z servercOs&tjj|g|Ri|g|d<dS)Ngroups)r r__init__)selfakwr3/usr/lib/python3/dist-packages/twisted/words/tap.pyr2s zOptions.__init__cCs|d|tjjdS)z"Specify a group which should existrN)appenddecodesysstdinencoding)rnamerrr opt_group6szOptions.opt_groupcCs|t|dS)z Name of a passwd-style file. (This is for backwards-compatibility only; you should use the --auth command instead.) N) addCheckerrFilePasswordDB)rfilenamerrr opt_passwd:szOptions.opt_passwd)__name__ __module__ __qualname__r IUsernamePasswordsupportedInterfacessocket gethostnamerrrrstr__annotations__r CompletionscompDatainterfacePluginsplgr getPluginsr IProtocolPluginr!rrr"r&rrrrrs:     rc Cs|dg}t|d}t||}t}|jD]!}||d}|dur:|j|||}t||}| |q|dD]} | | q?|S)N credCheckersrrr) getrInMemoryWordsRealmr Portalrr2 getFactoryrsetServiceParent createGroup) configr6 wordsRealm wordsPortalmsvcplgNameportfactorysvcgrrr makeServiceCs        rF)__doc__r,rtypingrrrtwistedrtwisted.applicationrtwisted.application.servicer twisted.credrr r r twisted.pythonr twisted.wordsr rrAuthOptionMixinrFrrrrs     /