def cron(cronline, venusian_category='irc3.plugins.cron'):
    """main decorator"""
    def wrapper(func):
        def callback(context, name, ob):
            obj = context.context
            crons = obj.get_plugin(Crons)
            if info.scope == 'class':
                callback = getattr(
                    obj.get_plugin(ob),
                    func.__name__)
            else:
                callback = irc3.utils.wraps_with_context(func, obj)
            crons.add_cron(cronline, callback)
        info = venusian.attach(func, callback, category=venusian_category)
        return func
    return wrapper
def cron ( cronline , venusian_category = 'irc3.plugins.cron' ) : def wrapper ( func ) : def callback ( context , name , ob ) : obj = context . context crons = obj . get_plugin ( Crons ) if info . scope == 'class' : callback = getattr ( obj . get_plugin ( ob ) , func . __name__ ) else : callback = irc3 . utils . wraps_with_context ( func , obj ) crons . add_cron ( cronline , callback ) info = venusian . attach ( func , callback , category = venusian_category ) return func return wrapper
main decorator