#NEWLINE# @ internationalizeDocstring #NEWLINE# def identify( self , irc , msg , args , user , password ) : #NEWLINE# #INDENT# '<name> <password>\n\n        Identifies the user as <name>. This command (and all other\n        commands that include a password) must be sent to the bot privately,\n        not in a channel.\n        ' #NEWLINE# if user . checkPassword ( password ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# user . addAuth ( msg . prefix ) #NEWLINE# ircdb . users . setUser ( user , flush = False ) #NEWLINE# irc . replySuccess ( ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# irc . error ( _ ( "Your secure flag is true and your hostmask doesn't match any of your known hostmasks." ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . log . warning ( 'Failed identification attempt by %s (password did not match for %s).' , msg . prefix , user . name ) #NEWLINE# irc . error ( conf . supybot . replies . incorrectAuthentication ( ) )