zabbix_bot.py
def dnsjedi_callback(room, event):
    """Callback function for the !dnsjedi matches.

    :param room: reference to the room
    :type room: room thingie
    :param event: the message, essentially
    :type event: event
    """
    try:
        room_id, zabbix_config = _room_init(room)
        if room_id is None:
            return

        if room_id not in ['!OUZabccnPEwNGbzecZ', '!OTdomlClomfOdIOdOa']:
            return

        args = event['content']['body'].split()
        args.pop(0)

        if len(args) == 0:
            messages = _dnsjedi_chunks_summary(zabbix_config)

        elif len(args) == 1:
            arg = args[0]
            if arg == 'left':
                messages = _dnsjedi_chunks_left(zabbix_config)

            elif arg == 'forecast':
                messages = _dnsjedi_chunks_forecast(zabbix_config)

            else:
                messages = _dnsjedi_help()

        matrix_config['message'] = messages
        matrix.send_message(matrix_config, room)

    except Exception as error:  # Keep running!
        return _error(matrix_config, room, error)
Callback function for the !dnsjedi matches.

    :param room: reference to the room
    :type room: room thingie
    :param event: the message, essentially
    :type event: event
    
Callback function for the !dnsjedi matches.
Callback function for the !dnsjedi matches .
def dnsjedi_callback(room, event):
    try:
        room_id, zabbix_config = _room_init(room)
        if room_id is None:
            return
        if room_id not in ['!OUZabccnPEwNGbzecZ', '!OTdomlClomfOdIOdOa']:
            return
        args = event['content']['body'].split()
        args.pop(0)
        if len(args) == 0:
            messages = _dnsjedi_chunks_summary(zabbix_config)
        elif len(args) == 1:
            arg = args[0]
            if arg == 'left':
                messages = _dnsjedi_chunks_left(zabbix_config)
            elif arg == 'forecast':
                messages = _dnsjedi_chunks_forecast(zabbix_config)
            else:
                messages = _dnsjedi_help()
        matrix_config['message'] = messages
        matrix.send_message(matrix_config, room)
    except Exception as error:  
        return _error(matrix_config, room, error)
def dnsjedi_callback ( room , event ) : try : room_id , zabbix_config = _room_init ( room ) if room_id is None : return if room_id not in [ '!OUZabccnPEwNGbzecZ' , '!OTdomlClomfOdIOdOa' ] : return args = event [ 'content' ] [ 'body' ] . split ( ) args . pop ( 0 ) if len ( args ) == 0 : messages = _dnsjedi_chunks_summary ( zabbix_config ) elif len ( args ) == 1 : arg = args [ 0 ] if arg == 'left' : messages = _dnsjedi_chunks_left ( zabbix_config ) elif arg == 'forecast' : messages = _dnsjedi_chunks_forecast ( zabbix_config ) else : messages = _dnsjedi_help ( ) matrix_config [ 'message' ] = messages matrix . send_message ( matrix_config , room ) except Exception as error : return _error ( matrix_config , room , error )
Callback function for the !dnsjedi matches.
Callback function for the !dnsjedi matches .
"""Callback function for the !dnsjedi matches.

    :param room: reference to the room
    :type room: room thingie
    :param event: the message, essentially
    :type event: event
    """ # Keep running!
room
reference to the room
reference to the room
event
the message, essentially
the message essentially