def extend(func):
    """same as :func:`~irc3.dec.extend` but for servers"""
    def callback(context, name, ob):
        obj = context.context
        if info.scope == 'class':
            @functools.wraps(func)
            def f(self, *args, **kwargs):
                plugin = obj.get_plugin(ob)
                return getattr(plugin, func.__name__)(*args, **kwargs)
            setattr(obj, func.__name__, f.__get__(obj, obj.__class__))
        else:
            setattr(obj, func.__name__, func.__get__(obj, obj.__class__))
    info = venusian.attach(func, callback, category='irc3d.extend')
    return func
same as :func:`~irc3.dec.extend` but for servers