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