summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui.py8
-rw-r--r--src/room.py2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/gui.py b/src/gui.py
index f8ee32b5..b9a02703 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -81,6 +81,7 @@ class Gui(object):
'bookmark': (self.command_bookmark, _('Usage: /bookmark [roomname][/nick]\nBookmark: Bookmark the specified room (you will then auto-join it on each poezio start). This commands uses the same syntaxe as /join. Type /help join for syntaxe examples. Note that when typing "/bookmark" on its own, the room will be bookmarked with the nickname you\'re currently using in this room (instead of default_nick)')),
'set': (self.command_set, _('Usage: /set <option> [value]\nSet: Sets the value to the option in your configuration file. You can, for example, change your default nickname by doing `/set default_nick toto` or your resource with `/set resource blabla`. You can also set an empty value (nothing) by providing no [value] after <option>.')),
'kick': (self.command_kick, _('Usage: /kick <nick> [reason]\nKick: Kick the user with the specified nickname. You also can give an optional reason.')),
+ 'topic': (self.command_topic, _('Usage: /topic <subject>\nTopic: Change the subject of the room')),
'nick': (self.command_nick, _('Usage: /nick <nickname>\nNick: Change your nickname in the current room'))
}
@@ -543,6 +544,13 @@ class Gui(object):
self.rooms.remove(self.current_room())
self.window.refresh(self.rooms)
+ def command_topic(self, args):
+ subject = ' '.join(args)
+ room = self.current_room()
+ if not room.joined or room.name == "Info":
+ return
+ self.muc.change_subject(room.name, subject)
+
def command_nick(self, args):
if len(args) != 1:
return
diff --git a/src/room.py b/src/room.py
index 0c3a5deb..87a78107 100644
--- a/src/room.py
+++ b/src/room.py
@@ -39,7 +39,7 @@ class Room(object):
self.joined = False
self.users = []
- def add_message(self, nick, msg, date=None, delayed=False):
+ def add_message(self, nick, msg, date=None):
if not date:
date = datetime.now()
color = None