#NEWLINE# def on_message( msg , server ) : #NEWLINE# #INDENT# text = msg . get ( 'text' , '' ) #NEWLINE# match = re . findall ( '!(?:google|search) (.*)' , text ) #NEWLINE# if ( not text ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# return google ( match [ 0 ] )