Pārlūkot izejas kodu

Don't ping in reply() if it's private.

tags/v0.1^2
Ben Kurtovic pirms 12 gadiem
vecāks
revīzija
e133d5cfdc
1 mainītis faili ar 5 papildinājumiem un 2 dzēšanām
  1. +5
    -2
      earwigbot/irc/connection.py

+ 5
- 2
earwigbot/irc/connection.py Parādīt failu

@@ -142,8 +142,11 @@ class IRCConnection(object):


def reply(self, data, msg, hidelog=False): def reply(self, data, msg, hidelog=False):
"""Send a private message as a reply to a user on the server.""" """Send a private message as a reply to a user on the server."""
msg = "\x02{0}\x0F: {1}".format(data.nick, msg)
self.say(data.chan, msg, hidelog)
if data.is_private:
self.say(data.chan, msg, hidelog)
else:
msg = "\x02{0}\x0F: {1}".format(data.nick, msg)
self.say(data.chan, msg, hidelog)


def action(self, target, msg, hidelog=False): def action(self, target, msg, hidelog=False):
"""Send a private message to a target on the server as an action.""" """Send a private message to a target on the server as an action."""


Notiek ielāde…
Atcelt
Saglabāt