#NEWLINE# def prepare_protocol( self , protocol ) : #NEWLINE# #INDENT# self . protocols . add ( protocol ) #NEWLINE# protocol . notifyOnDisconnect ( ( lambda : self . protocols . remove ( protocol ) ) ) #NEWLINE# protocol . server = self #NEWLINE# if self . checker : #NEWLINE# #INDENT# protocol . challengers = dict ( LOGIN = imap4 . LOGINCredentials , PLAIN = imap4 . PLAINCredentials ) #NEWLINE# #UNINDENT# if self . context_factory : #NEWLINE# #INDENT# protocol . ctx = self . context_factory #NEWLINE# #UNINDENT# return protocol