
Untitled
By: a guest on
Jul 17th, 2012 | syntax:
None | size: 0.59 KB | hits: 10 | expires: Never
1 #!/usr/bin/env python
2
3 __module_name__ = "DictBot"
4 __module_version__ = "0.1"
5 __module_description__ = "DictBot by Muneeb"
6
7 import xchat
8 import os
9
10
11 print "\0034",__module_name__, __module_version__,"has been loaded\003"
12
13 def getDefinition(word, word_eol, userdata):
14 if word[0] == 'define':
15 cmd = 'dict %s' % (word[1])
16 fi, fo, fe = os.popen3(cmd)
17 for i in fo.readlines():
18 print i,
19
20 return xchat.EAT_ALL
21
22 xchat.hook_command('define', getDefinition, help="Usage: /define word")