adhere to jep about kicked by None/banned by None
This commit is contained in:
parent
c3b701ca8e
commit
b5aad7039c
1 changed files with 18 additions and 8 deletions
|
@ -334,19 +334,29 @@ class GroupchatWindow(chat.Chat):
|
||||||
model = self.list_treeview[room_jid].get_model()
|
model = self.list_treeview[room_jid].get_model()
|
||||||
if show in ('offline', 'error'):
|
if show in ('offline', 'error'):
|
||||||
if statusCode == '307':
|
if statusCode == '307':
|
||||||
s = _('%(nick)s has been kicked by %(who)s: %(reason)s') % {
|
if actor is None: # do not print 'kicked by None'
|
||||||
'nick': nick,
|
s = _('%(nick)s has been kicked: %(reason)s') % {
|
||||||
'who': actor,
|
'nick': nick,
|
||||||
'reason': reason }
|
'reason': reason }
|
||||||
|
else:
|
||||||
|
s = _('%(nick)s has been kicked by %(who)s: %(reason)s') % {
|
||||||
|
'nick': nick,
|
||||||
|
'who': actor,
|
||||||
|
'reason': reason }
|
||||||
self.print_conversation(s, room_jid)
|
self.print_conversation(s, room_jid)
|
||||||
#FIXME: this produced foo has been kicked by JID: reason
|
#FIXME: this produced foo has been kicked by JID: reason
|
||||||
# Should we show the JID to everyone? the same for ban
|
# Should we show the JID to everyone? the same for ban
|
||||||
# I propose we use nick
|
# I propose we use nick
|
||||||
elif statusCode == '301':
|
elif statusCode == '301':
|
||||||
s = _('%(nick)s has been banned by %(who)s: %(reason)s') % {
|
if actor is None: # do not print 'banned by None'
|
||||||
'nick': nick,
|
s = _('%(nick)s has been banned: %(reason)s') % {
|
||||||
'who': actor,
|
'nick': nick,
|
||||||
'reason': reason }
|
'reason': reason }
|
||||||
|
else:
|
||||||
|
s = _('%(nick)s has been banned by %(who)s: %(reason)s') % {
|
||||||
|
'nick': nick,
|
||||||
|
'who': actor,
|
||||||
|
'reason': reason }
|
||||||
self.print_conversation(s, room_jid)
|
self.print_conversation(s, room_jid)
|
||||||
elif statusCode == '303': # Someone changed his nick
|
elif statusCode == '303': # Someone changed his nick
|
||||||
if nick == self.nicks[room_jid]: # We changed our nick
|
if nick == self.nicks[room_jid]: # We changed our nick
|
||||||
|
|
Loading…
Add table
Reference in a new issue