Fixed showing of originating server in relaynames, and showing of empty name

This commit is contained in:
Jeremy Fincher 2003-03-27 21:21:20 +00:00
parent a144afcd69
commit b67f2fa874
1 changed files with 4 additions and 1 deletions

View File

@ -115,6 +115,8 @@ class Relay(privmsgs.CapabilityCheckingPrivmsg):
def relaynames(self, irc, msg, args):
"[<channel>] (only if not sent in the channel itself.)"
if not isinstance(irc, irclib.Irc):
irc = irc.getRealIrc()
channel = privmsgs.getChannel(msg, args)
if channel not in self.channels:
irc.error(msg, 'I\'m not relaying that channel.')
@ -123,7 +125,8 @@ class Relay(privmsgs.CapabilityCheckingPrivmsg):
for (abbreviation, otherIrc) in self.ircs.iteritems():
if abbreviation != self.abbreviations[irc]:
Channel = otherIrc.state.channels[channel]
users.append('%s: %s'%(abbreviation,', '.join(Channel.users)))
usersS = ', '.join([s for s in Channel.users if s.strip()!=''])
users.append('%s: %s' % (abbreviation, usersS))
irc.reply(msg, '; '.join(users))