diff -uNr a/blatta/lib/client.py b/blatta/lib/client.py --- a/blatta/lib/client.py 2e8badabcb9694cac1263be7cc37e5ddee7e2719520e6a8ca50bee27f1ac28508c38fcf217056e37fc552e74987b4134b3c43d9b96a7d53e0ad0aa214827d6e1 +++ b/blatta/lib/client.py 259e95af9fd927fa7a5733e3485ed3f1d4c11ce76da8d093320878914f48149e06a3d9800f39bd978bcc910d8586b8fa0671aa38edcbbf432fc5ed14259624fe @@ -8,6 +8,7 @@ import traceback import logging from state import State +from state import KNOBS from message import Message from server import VERSION from funcs import * @@ -529,6 +530,26 @@ else: self.pest_reply("no results") + def knob_handler(): + if len(arguments) == 0: + knobs = self.state.get_knobs() + if len(knobs) > 0: + for key in knobs.keys(): + self.pest_reply("%s %s" % (key, knobs[key])) + else: + self.pest_reply("no knobs configured") + elif len(arguments) == 1: + knob_value = self.state.get_knob(arguments[0]) + if knob: + self.pest_reply("%s %s" % (arguments[0], knob_value)) + else: + self.pest_reply("no such knob") + elif len(arguments) == 2: + self.state.set_knob(arguments[0], arguments[1]) + self.pest_reply("set %s to %s" % (arguments[0], arguments[1])) + else: + self.pest_reply("Usage: KNOB [] []") + handler_table = { "AWAY": away_handler, "AT": at_handler, @@ -554,7 +575,8 @@ "WALLOPS": wallops_handler, "WHO": who_handler, "WHOIS": whois_handler, - "WOT": wot_handler + "WOT": wot_handler, + "KNOB": knob_handler } server = self.server valid_channel_re = self.__valid_channelname_regexp diff -uNr a/blatta/lib/infosec.py b/blatta/lib/infosec.py --- a/blatta/lib/infosec.py 842d56751fd2e61caa10c290815b740c3d4a0170d705c8f47ff4ce5604b73fb82494b3b4cbe656f25df2adc8d348e001c4fb6568b3149bc2f977417d29df4668 +++ b/blatta/lib/infosec.py 2a3c3df167d4ba0f838a3e9ddddccbe6d924c3608f742c68e56e107f1f2fc68e4569cd141c992a87565b958815dde0db6998179b1398562d6d4cf5963d1c980c @@ -27,7 +27,6 @@ RED_PACKET_LENGTH_WITH_PADDING = 448 MESSAGE_PACKET_FORMAT = "