'Returns status of IRC connections'

@api.response(200, model=return_schema)
@api.response(NotFoundError)
@api.response(BadRequest)
def get(self, session=None):

    from flexget.plugins.daemon.irc import irc_manager
    if (irc_manager is None):
        raise BadRequest(u'IRC    daemon    does    not    appear    to    be    running')
    args = irc_parser.parse_args()
    name = args.get(u'name')
    try:
        status = irc_manager.status(name)
    except ValueError as e:
        raise NotFoundError(e.args[0])
    return jsonify(status)
