- 2E8BADABCB9694CAC1263BE7CC37E5DDEE7E2719520E6A8CA50BEE27F1AC28508C38FCF217056E37FC552E74987B4134B3C43D9B96A7D53E0AD0AA214827D6E1+ 259E95AF9FD927FA7A5733E3485ED3F1D4C11CE76DA8D093320878914F48149E06A3D9800F39BD978BCC910D8586B8FA0671AA38EDCBBF432FC5ED14259624FEblatta/lib/client.py(8 . 6)(8 . 7)
5 import traceback
6 import logging
7 from state import State
8 from state import KNOBS
9 from message import Message
10 from server import VERSION
11 from funcs import *
(529 . 6)(530 . 26)
13 else:
14 self.pest_reply("no results")
15
16 def knob_handler():
17 if len(arguments) == 0:
18 knobs = self.state.get_knobs()
19 if len(knobs) > 0:
20 for key in knobs.keys():
21 self.pest_reply("%s %s" % (key, knobs[key]))
22 else:
23 self.pest_reply("no knobs configured")
24 elif len(arguments) == 1:
25 knob_value = self.state.get_knob(arguments[0])
26 if knob:
27 self.pest_reply("%s %s" % (arguments[0], knob_value))
28 else:
29 self.pest_reply("no such knob")
30 elif len(arguments) == 2:
31 self.state.set_knob(arguments[0], arguments[1])
32 self.pest_reply("set %s to %s" % (arguments[0], arguments[1]))
33 else:
34 self.pest_reply("Usage: KNOB [<NAME>] [<VALUE>]")
35
36 handler_table = {
37 "AWAY": away_handler,
38 "AT": at_handler,
(554 . 7)(575 . 8)
40 "WALLOPS": wallops_handler,
41 "WHO": who_handler,
42 "WHOIS": whois_handler,
43 "WOT": wot_handler
44 "WOT": wot_handler,
45 "KNOB": knob_handler
46 }
47 server = self.server
48 valid_channel_re = self.__valid_channelname_regexp