Use sender instead of nick in Response to allow sent by PM or over DCC, ...
This commit is contained in:
parent
99e91af2cb
commit
711cefe0c2
3 changed files with 22 additions and 8 deletions
|
|
@ -111,16 +111,16 @@ class Server(threading.Thread):
|
|||
self.s.send(("PONG %s\r\n" % cnt).encode ())
|
||||
|
||||
def send_response(self, res):
|
||||
if res.channel is not None:
|
||||
if res.channel is not None and res.channel != self.nick:
|
||||
self.send_msg(res.channel, res.get_message())
|
||||
|
||||
if not res.alone:
|
||||
self.moremessages[res.channel] = res
|
||||
elif res.nick is not None:
|
||||
self.send_msg_usr(res.nick, res.get_message())
|
||||
elif res.sender is not None:
|
||||
self.send_msg_usr(res.sender, res.get_message())
|
||||
|
||||
if not res.alone:
|
||||
self.moremessages[res.nick] = res
|
||||
self.moremessages[res.sender] = res
|
||||
|
||||
def send_ctcp(self, to, msg, cmd = "NOTICE", endl = "\r\n"):
|
||||
"""Send a message as CTCP response"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue