Response sender is not needed anymore, private channels are now better handled
This commit is contained in:
parent
5e202063d4
commit
772d68a34d
32 changed files with 161 additions and 182 deletions
|
|
@ -32,7 +32,7 @@ def cmd_man(msg):
|
|||
args.append(msg.cmds[1])
|
||||
|
||||
os.unsetenv("LANG")
|
||||
res = Response(msg.sender, channel=msg.channel)
|
||||
res = Response(channel=msg.channel)
|
||||
with subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as proc:
|
||||
for line in proc.stdout.read().split(b"\n"):
|
||||
(line, n) = RGXP_s.subn(b'', line)
|
||||
|
|
@ -50,7 +50,7 @@ def cmd_man(msg):
|
|||
def cmd_whatis(msg):
|
||||
args = ["whatis", " ".join(msg.cmds[1:])]
|
||||
|
||||
res = Response(msg.sender, channel=msg.channel)
|
||||
res = Response(channel=msg.channel)
|
||||
with subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as proc:
|
||||
for line in proc.stdout.read().split(b"\n"):
|
||||
(line, n) = RGXP_s.subn(b'', line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue