Example #1
0
 def message(self, mesg, recipient, method="PRIVMSG"):
     """
     Send a message.
     """
     msg = lineify(str(mesg))
     self.history[self.lower(recipient)] = msg
     for message in [i for i in msg if i]:
         self.put(self.pack(message, recipient, method))
     return mesg  # Debugging
Example #2
0
    def fancydisplay(self, chan):
        button = """╔═══╕ %s
║ 04● │ %s
╙───┘ Will you press the button?"""
        k = 48
        while True:
            text = lineify(self.active.setdefault(chan, ""), k)
            k += 8
            if len(text) < 3: break
        if len(text) == 1: text.append("")
        return button % tuple(text)