Changed some formatting of command relays.

This commit is contained in:
Jeremy Fincher 2003-04-30 14:49:09 +00:00
parent 6822cc31a7
commit 26f185c0e9
1 changed files with 6 additions and 13 deletions

View File

@ -31,13 +31,6 @@
""" """
Handles relaying between networks. Handles relaying between networks.
Commands include:
startrelay
relayconnect
relaydisconnect
relayjoin
relaypart
""" """
from baseplugin import * from baseplugin import *
@ -250,7 +243,7 @@ class Relay(callbacks.Privmsg):
if channel not in self.channels: if channel not in self.channels:
return return
abbreviation = self.abbreviations[irc] abbreviation = self.abbreviations[irc]
s = '%s has joined on %s' % (msg.nick, abbreviation) s = '%s (%s) has joined on %s' % (msg.nick,msg.prefix,abbreviation)
for otherIrc in self.ircs.itervalues(): for otherIrc in self.ircs.itervalues():
if otherIrc != irc: if otherIrc != irc:
if channel in otherIrc.state.channels: if channel in otherIrc.state.channels:
@ -264,7 +257,7 @@ class Relay(callbacks.Privmsg):
if channel not in self.channels: if channel not in self.channels:
return return
abbreviation = self.abbreviations[irc] abbreviation = self.abbreviations[irc]
s = '%s has left on %s' % (msg.nick, abbreviation) s = '%s (%s) has left on %s' % (msg.nick, msg.prefix, abbreviation)
for otherIrc in self.ircs.itervalues(): for otherIrc in self.ircs.itervalues():
if otherIrc != irc: if otherIrc != irc:
if channel in otherIrc.state.channels: if channel in otherIrc.state.channels:
@ -277,8 +270,8 @@ class Relay(callbacks.Privmsg):
channel = msg.args[0] channel = msg.args[0]
if channel in self.channels: if channel in self.channels:
abbreviation = self.abbreviations[irc] abbreviation = self.abbreviations[irc]
s = 'mode change by %s on %s/%s %s' % \ s = 'mode change by %s on %s: %s' % \
(msg.nick, channel, abbreviation, ' '.join(msg.args[1:])) (msg.nick, abbreviation, ' '.join(msg.args[1:]))
for otherIrc in self.ircs.itervalues(): for otherIrc in self.ircs.itervalues():
if otherIrc != irc: if otherIrc != irc:
otherIrc.queueMsg(ircmsgs.privmsg(channel, s)) otherIrc.queueMsg(ircmsgs.privmsg(channel, s))
@ -301,9 +294,9 @@ class Relay(callbacks.Privmsg):
irc = irc.getRealIrc() irc = irc.getRealIrc()
network = self.abbreviations[irc] network = self.abbreviations[irc]
if len(msg.args) > 0: if len(msg.args) > 0:
s = '%s/%s has quit (%s)' % (msg.nick, network, msg.args[0]) s = '%s has quit %s (%s)' % (msg.nick, network, msg.args[0])
else: else:
s = '%s/%s has quit.' % (msg.nick, network) s = '%s has quit %s.' % (msg.nick, network)
for channel in self.channels: for channel in self.channels:
if msg.nick in self.ircstates[irc].channels[channel].users: if msg.nick in self.ircstates[irc].channels[channel].users:
for otherIrc in self.ircs.itervalues(): for otherIrc in self.ircs.itervalues():