-
Notifications
You must be signed in to change notification settings - Fork 0
/
hexTest.py
62 lines (52 loc) · 1.55 KB
/
hexTest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# thanks for agreeing to help by testing this script
#
# The first step, is to load the script,
#
# (menu) => Hexchat => Load Plugin or Script
#
# then navigate to this script, and click OK
#
# I'm looking to find out what happens if you enter 1 word,
# and 2 words, and 3 words, so, you might try:
#
# foo <enter>
# foo bar <enter>
# foo bar baz <enter>
#
# and pastebin the results.
#
# You will want to unload the script when you're done testing and
# observing, that is done this way:
#
# (menu) => Window => Plugins and Scripts
#
# then you'll get a small window, click on the line representing
# this module, it should highlight, then at the bottom center of
# the small window, you should see an Unload button, press that.
#
# NOTE, if you don't see the representative line in the small window,
# you might have to quit hexchat and restart it, to get rid of the
# script.
#
# Again, thanks!
#
# -jim
import hexchat
__module_name__ = "hexTest"
__module_version__ = "0.1d"
__module_description__ = "shows details of inputs"
hexchat.prnt(f"loading {__module_name__}-{__module_version__}")
hexchat.prnt(f"({__module_description__})")
# return a string detailing a list (its items togeter with each index)
def detailList(l):
reslst = []
for i, item in enumerate(l):
reslst.append(f"[{i}]: {item}")
if len(reslst) != 0:
resStr = " ".join(reslst)
else: # reslst is empty
resStr = "[]"
return resStr
def testHex(word, word_eol, userdata):
hexchat.prnt(f"word list in detail is: {detailList(word)}")
hexchat.hook_command('', testHex)