adhere to jep about kicked by None/banned by None

This commit is contained in:
Nikos Kouremenos 2005-09-12 10:54:10 +00:00
parent c3b701ca8e
commit b5aad7039c
1 changed files with 18 additions and 8 deletions

View File

@ -334,6 +334,11 @@ class GroupchatWindow(chat.Chat):
model = self.list_treeview[room_jid].get_model()
if show in ('offline', 'error'):
if statusCode == '307':
if actor is None: # do not print 'kicked by None'
s = _('%(nick)s has been kicked: %(reason)s') % {
'nick': nick,
'reason': reason }
else:
s = _('%(nick)s has been kicked by %(who)s: %(reason)s') % {
'nick': nick,
'who': actor,
@ -343,6 +348,11 @@ class GroupchatWindow(chat.Chat):
# Should we show the JID to everyone? the same for ban
# I propose we use nick
elif statusCode == '301':
if actor is None: # do not print 'banned by None'
s = _('%(nick)s has been banned: %(reason)s') % {
'nick': nick,
'reason': reason }
else:
s = _('%(nick)s has been banned by %(who)s: %(reason)s') % {
'nick': nick,
'who': actor,