mirror of
https://github.com/gryf/weechat-xmpp.git
synced 2025-12-19 12:28:12 +01:00
Detect and show MUC topic
This commit is contained in:
@@ -658,6 +658,9 @@ class Server:
|
||||
else:
|
||||
buddy = self.search_buddy_list(self.stringify_jid(jid), by='jid')
|
||||
if not jid or not body:
|
||||
subject = node.getSubject()
|
||||
if subject:
|
||||
buddy.chat.set_title(subject)
|
||||
return
|
||||
if not buddy:
|
||||
buddy = self.add_buddy(jid=jid)
|
||||
@@ -1121,6 +1124,11 @@ class Chat:
|
||||
"%s%s\t%s" % (weechat.color("chat_nick_self"),
|
||||
self.server.buddy.alias,
|
||||
message))
|
||||
|
||||
def set_title(self, title):
|
||||
self.buffer_title = title
|
||||
weechat.buffer_set(self.buffer, "title", self.buffer_title)
|
||||
|
||||
def print_status(self, status):
|
||||
""" Print a status message in chat. """
|
||||
weechat.prnt(self.buffer, "%s%s has status %s" %
|
||||
|
||||
Reference in New Issue
Block a user