irclib: fix _getTarget when to= is given and self.private=True

This commit is contained in:
Valentin Lorentz 2021-06-08 21:20:52 +02:00
parent 8a52902727
commit 69c948bd5f

View File

@ -511,7 +511,9 @@ class RichReplyMethods(object):
# change the state of this Irc object.
if to is not None:
self.to = self.to or to
if self.private or self.msg.channel is None:
if self.private:
target = to or self.msg.nick
elif self.msg.channel is None:
target = self.msg.nick
else:
target = self.to or self.msg.args[0]