'Hook into and record events which happen to C{protocol}.
@param server: The SSH server protocol over which C{protocol} is
running.
@type server: L{IProtocol} provider
@param protocol:
@param event:
@param noArgs:'

def record(self, server, protocol, event, noArgs=False):

    channelId = protocol.transport.id
    recorder = []
    if noArgs:
        f = (lambda : recorder.append(None))
    else:
        f = recorder.append
    setattr(server.service.channels[channelId], event, f)
    return recorder
