示例#1
0
    def fakepublic(self, room, user, text):

        self.log(
            "fakepublic(room, user, text) is deprecated, please use echo_public(room, text)"
        )

        msg = slskmessages.SayChatroom(room, text)
        msg.user = user
        self.core.chatrooms.say_chat_room(msg)
 def fakepublic(self, room, user, text):
     try:
         room = self.frame.chatrooms.roomsctrl.joinedrooms[room]
     except KeyError:
         return False
     text = cast_to_unicode_if_needed(text, self.log)
     msg = slskmessages.SayChatroom(room, ToBeEncoded(text, 'UTF-8'))
     msg.user = user
     room.SayChatRoom(msg, text)
     return True
示例#3
0
    def fakepublic(self, room, user, text):
        try:
            room = self.frame.chatrooms.joinedrooms[room]
        except KeyError:
            return False

        msg = slskmessages.SayChatroom(room, text)
        msg.user = user
        room.say_chat_room(msg, text)
        return True
示例#4
0
    def send_message(self, room, message):

        event = self.core.pluginhandler.outgoing_public_chat_event(
            room, message)
        if event is None:
            return

        room, message = event
        message = self.core.privatechats.auto_replace(message)

        self.queue.append(slskmessages.SayChatroom(room, message))
        self.core.pluginhandler.outgoing_public_chat_notification(
            room, message)
示例#5
0
 def say(self, text):
     text = re.sub("\\s\\s+", "  ", text)
     self.frame.np.queue.append(slskmessages.SayChatroom(self.room, text))
 def saychatroom(self, room, text):
     text = cast_to_unicode_if_needed(text, log.addwarning)
     self.frame.np.queue.put(
         slskmessages.SayChatroom(room, ToBeEncoded(text, 'UTF-8')))
示例#7
0
 def saychatroom(self, room, text):
     self.frame.np.queue.put(slskmessages.SayChatroom(room, text))
示例#8
0
 def send_public(self, room, text):
     self.core.queue.append(slskmessages.SayChatroom(room, text))