Blatta 9987: hearsay embargo

Version 9987 includes:

- embargoing of in-wot messages
- hearsay message labeling
- removed IRC message formatting from pest message body
- some removal of dead/unnecessary irc related code
- limit of one irc client connection per station
- fix for crash when messages sent to unknown handle
- proper padding
- message bytes complied one time only
- a small number of unit tests

Notes:

This version introduces threads in order to implement hearsay embargoing. This opens the possibility of a whole new world of bugs. The pest portion of Blatta has been refactored for ease of unit testing. I added unit tests to avoid recreating the actual network conditions that would produce the hearsay messages that need to be tested. I am considering adding unit tests for the message packing portion of the code. This could come in handy for others when building their own pestrons.

9987-embargoing.vpatch

9987-embargoing.vpatch.thimbronion.sig

3 Responses to “Blatta 9987: hearsay embargo”

  1. thimbronion says:

    File "./blatta", line 149, in
    main(sys.argv)
    File "./blatta", line 144, in main
    server.start()
    File "/home/Lambert/alcuin/blatta-9987/blatta/lib/server.py", line 177, in start
    self.client.socket_readable_notification()
    File "/home/Lambert/alcuin/blatta-9987/blatta/lib/client.py", line 578, in socket_readable_notification
    self.__parse_read_buffer()
    File "/home/Lambert/alcuin/blatta-9987/blatta/lib/client.py", line 90, in __parse_read_buffer
    self.__handle_command(command, arguments)
    File "/home/Lambert/alcuin/blatta-9987/blatta/lib/client.py", line 565, in __command_handler
    logger.debug(stack)
    NameError: global name 'logger' is not defined

  2. PeterL says:

    in the lib/client.py, line 608 to 609, it seems that adding another colon to the notice message helps the whole message show up in my client console. It was dropping the first word from all the lines, I could only see them if I looked at the debug output instead of the console. I am not sure if this is specific to my client (ice9), or if it has something to do with the number of paramaters expected in a notice message? This is what I changed the line to and it seems to be showing up right in my client console now:

    def pest_reply(self, msg):
    self.message("NOTICE %s : :%s" % (self.nickname, msg))

  3. thimbronion says:

    from billymg's logger:

    Traceback (most recent call last):
    File "/home/bmg/applications/blatta/blatta", line 149, in
    main(sys.argv)
    File "/home/bmg/applications/blatta/blatta", line 144, in main
    server.start()
    File "/home/bmg/applications/blatta/lib/server.py", line 177, in start
    self.client.socket_readable_notification()
    File "/home/bmg/applications/blatta/lib/client.py", line 578, in socket_readable_notification
    self.__parse_read_buffer()
    File "/home/bmg/applications/blatta/lib/client.py", line 90, in __parse_read_buffer
    self.__handle_command(command, arguments)
    File "/home/bmg/applications/blatta/lib/client.py", line 561, in __command_handler
    handler_table[command]()
    File "/home/bmg/applications/blatta/lib/client.py", line 305, in notice_and_privmsg_handler
    "body": message
    File "/home/bmg/applications/blatta/lib/infosec.py", line 67, in message
    self.state.log(message.speaker, message_bytes, target_peer)
    File "/home/bmg/applications/blatta/lib/state.py", line 122, in log
    (handle, peer_id, buffer(message_bytes)))

Leave a Reply