#NEWLINE# def oob_repeat( session , oobfuncname , interval , * args , **kwargs ) : #NEWLINE# #INDENT# '\n    Called as REPEAT <oobfunc> <interval> <args>\n    Repeats a given OOB command with a certain frequency.\n\n    Args:\n        session (Session): Session creating the repeat\n        oobfuncname (str): OOB function called every interval seconds\n        interval (int): Interval of repeat, in seconds.\n\n    Notes:\n        The command checks so that it cannot repeat itself.\n\n    ' #NEWLINE# if ( not oobfuncname ) : #NEWLINE# #INDENT# oob_error ( session , 'Usage: REPEAT <oobfuncname>, <interval>' ) #NEWLINE# return #NEWLINE# #UNINDENT# interval = ( 20 if ( not interval ) else max ( 5 , interval ) ) #NEWLINE# obj = session . get_puppet_or_player ( ) #NEWLINE# if ( obj and ( oobfuncname != 'REPEAT' ) ) : #NEWLINE# #INDENT# OOB_HANDLER . add_repeater ( obj , session , oobfuncname , interval , * args , ** interval )