summaryrefslogtreecommitdiff
path: root/poezio/core
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/core')
-rw-r--r--poezio/core/commands.py12
-rw-r--r--poezio/core/core.py9
-rw-r--r--poezio/core/handlers.py18
3 files changed, 26 insertions, 13 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index c9605987..4dbb5611 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -509,6 +509,16 @@ class CommandCore:
else:
self.core.information('No bookmark to remove', 'Info')
+ @command_args_parser.ignored
+ def command_reconnect(self):
+ """
+ /reconnect
+ """
+ if self.core.xmpp.is_connected():
+ self.core.disconnect(reconnect=True)
+ else:
+ self.core.xmpp.connect()
+
@command_args_parser.quoted(0, 3)
def set(self, args):
"""
@@ -687,7 +697,7 @@ class CommandCore:
else:
msg = 'The last activity of %s was %s ago%s' % (
from_, common.parse_secs_to_str(seconds),
- (' and his/her last status was %s' % status)
+ (' and their last status was %s' % status)
if status else '')
self.core.information(msg, 'Info')
diff --git a/poezio/core/core.py b/poezio/core/core.py
index 9651a73b..6bb19d16 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -1220,7 +1220,7 @@ class Core:
def rename_private_tabs(self, room_name: str, old_nick: str, user: User) -> None:
"""
- Call this method when someone changes his/her nick in a MUC,
+ Call this method when someone changes their nick in a MUC,
this updates the name of all the opened private conversations
with him/her
"""
@@ -1759,6 +1759,13 @@ class Core:
shortdesc="Bookmark a room online.",
completion=self.completion.bookmark)
self.register_command(
+ 'reconnect',
+ self.command.command_reconnect,
+ usage="[reconnect]",
+ desc='Disconnect from the remote server if you are '
+ 'currently connected and then connect to it again.',
+ shortdesc='Disconnect and reconnect to the server.')
+ self.register_command(
'set',
self.command.set,
usage="[plugin|][section] <option> [value]",
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 6fa9935b..030a43e5 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -472,7 +472,7 @@ class HandlerCore:
def on_nick_received(self, message):
"""
- Called when a pep notification for an user nickname
+ Called when a pep notification for a user nickname
is received
"""
contact = roster[message['from'].bare]
@@ -527,7 +527,7 @@ class HandlerCore:
def on_mood_event(self, message):
"""
- Called when a pep notification for an user mood
+ Called when a pep notification for a user mood
is received.
"""
contact = roster[message['from'].bare]
@@ -561,11 +561,11 @@ class HandlerCore:
'Mood')
else:
self.core.information(
- contact.bare_jid + ' stopped having his/her mood.', 'Mood')
+ contact.bare_jid + ' stopped having their mood.', 'Mood')
def on_activity_event(self, message):
"""
- Called when a pep notification for an user activity
+ Called when a pep notification for a user activity
is received.
"""
contact = roster[message['from'].bare]
@@ -606,12 +606,12 @@ class HandlerCore:
contact.activity, 'Activity')
else:
self.core.information(
- contact.bare_jid + ' stopped doing his/her activity.',
+ contact.bare_jid + ' stopped doing their activity.',
'Activity')
def on_tune_event(self, message):
"""
- Called when a pep notification for an user tune
+ Called when a pep notification for a user tune
is received
"""
contact = roster[message['from'].bare]
@@ -653,8 +653,6 @@ class HandlerCore:
"""
Triggered whenever a message is received from a multi-user chat room.
"""
- if message['subject']:
- return
room_from = message['from'].bare
if message['type'] == 'error': # Check if it's an error
@@ -1015,7 +1013,7 @@ class HandlerCore:
contact.pending_out = False
else:
self.core.information(
- '%s does not want you to receive his/her/its status anymore.' %
+ '%s does not want you to receive their/its status anymore.' %
jid, 'Roster')
self.core.tabs.first().state = 'highlight'
if isinstance(self.core.tabs.current_tab, tabs.RosterInfoTab):
@@ -1312,8 +1310,6 @@ class HandlerCore:
"""
Triggered when the topic is changed.
"""
- if message['body'] or message['thread']:
- return
nick_from = message['mucnick']
room_from = message.get_mucroom()
tab = self.core.tabs.by_name_and_class(room_from, tabs.MucTab)