plugin XEP-0045, plugin text commands: added '/title' command
This commit is contained in:
parent
920931ce8b
commit
902045e174
1 changed files with 27 additions and 1 deletions
|
|
@ -127,3 +127,19 @@ class TextCommands():
|
|||
"""just a synonym of /leave"""
|
||||
return self.cmd_leave(mess_data, profile)
|
||||
|
||||
def cmd_title(self, mess_data, profile):
|
||||
debug("Catched title command")
|
||||
|
||||
if mess_data['type'] != "groupchat":
|
||||
#/leave command does nothing if we are not on a group chat
|
||||
info("Ignoring /title command on a non groupchat message")
|
||||
return True
|
||||
|
||||
subject = mess_data["unparsed"].strip()
|
||||
|
||||
if subject:
|
||||
room = mess_data["to"]
|
||||
self.host.plugins["XEP-0045"].subject(room, subject, profile)
|
||||
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue