#NEWLINE# @ eventmgr_rfc1459 . message ( 'METADATA' , min_params = 2 ) #NEWLINE# def m_METADATA( cli , ev_msg ) : #NEWLINE# #INDENT# ( target_name , subcmd ) = ev_msg [ 'params' ] [ : 2 ] #NEWLINE# if ( subcmd not in metadata_cmds ) : #NEWLINE# #INDENT# cli . dump_numeric ( '400' , [ 'METADATA' , subcmd , 'Unknown subcommand' ] ) #NEWLINE# return #NEWLINE# #UNINDENT# if ( target_name == '*' ) : #NEWLINE# #INDENT# target = cli #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# target = cli . ctx . channels . get ( target_name , None ) #NEWLINE# if ( target is None ) : #NEWLINE# #INDENT# target = cli . ctx . clients . get ( target_name , None ) #NEWLINE# #UNINDENT# #UNINDENT# if ( target is None ) : #NEWLINE# #INDENT# cli . dump_numeric ( '765' , [ target_name , 'invalid metadata target' ] , add_target = False ) #NEWLINE# return #NEWLINE# #UNINDENT# metadata_cmds [ subcmd ] ( cli , ev_msg , target_name , target )