Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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, ))
Esempio n. 4
0
    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
Esempio n. 5
0
 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
Esempio n. 6
0
 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)
Esempio n. 7
0
 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)
Esempio n. 8
0
 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)
Esempio n. 9
0
 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
Esempio n. 10
0
 def showGroupMessage(self, sender, text, metadata=None):
     fmtd = IChatFormatter(self).format(text,
                                        sender=sender,
                                        metadata=metadata)
     return iwebby.ITextArea(self).printClean(fmtd)
Esempio n. 11
0
 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)