def showMessage(self, text, metadata=None): """ Handle text received from the IRC server by printing it in my GUI """ fmtd = IChatFormatter(self).format(text, sender=self.person.name, metadata=metadata) return iwebby.ITextArea(self).printClean(fmtd)
def memberChangedNick(self, oldnick, newnick): basechat.GroupConversation.memberChangedNick(self, oldnick, newnick) event = "-!- %s is now known as %s in #%s" % (oldnick, newnick, self.group.name) namesel = iwebby.INameSelect(self) namesel.removeName(oldnick) namesel.addName(newnick, None) return iwebby.ITextArea(self).printClean(event)
def sendText(self, text, metadata=None): if metadata is None: style = '' else: style = u'(%s) ' % (metadata.get('style', ''), ) text = unicode(style + text) return iwebby.ITextArea(self).printClean( '** Not in a channel or conversation: %s' % (text, ))
def sendText(self, text, metadata=None): """ Handle text that was sent by my client by sending it to the IRC server and printing it in the local client gui """ r = self.person.sendMessage(text, metadata) me = self.person.account.client.name fmtd = IChatFormatter(self).format(text, sender=me, metadata=metadata) iwebby.ITextArea(self).printClean(fmtd) return r
def irccmd_notice(self, args, conv): client = self.page.chatui.onlineClients[0] recipient, rest = args.split(None, 1) r = client.notice(recipient, rest) iwebby.ITextArea(conv).printClean(u'>%s< %s' % (recipient, rest)) return r
def memberLeft(self, member): basechat.GroupConversation.memberLeft(self, member) event = "-!- %s left #%s" % (member, self.group.name) iwebby.INameSelect(self).removeName(member) return iwebby.ITextArea(self).printClean(event)
def memberJoined(self, member): basechat.GroupConversation.memberJoined(self, member) event = "-!- %s joined #%s" % (member, self.group.name) iwebby.INameSelect(self).addName(member, None) return iwebby.ITextArea(self).printClean(event)
def setTopic(self, topic, author): event = "-!- %s set the topic to: %s" % (author, topic) t = '%s (set by %s)' % (topic, author) iwebby.ITopicBar(self).setTopic(t) return iwebby.ITextArea(self).printClean(event)
def sendText(self, text, metadata=None): r = self.group.sendGroupMessage(text, metadata) me = self.group.account.client.name fmtd = IChatFormatter(self).format(text, sender=me, metadata=metadata) iwebby.ITextArea(self).printClean(fmtd) return r
def showGroupMessage(self, sender, text, metadata=None): fmtd = IChatFormatter(self).format(text, sender=sender, metadata=metadata) return iwebby.ITextArea(self).printClean(fmtd)
def contactChangedNick(self, person, newnick): basechat.Conversation.contactChangedNick(self, person, newnick) event = "-!- %s is now known as %s" % (person.name, newnick) return iwebby.ITextArea(self).printClean(event)