Changed format of ACTIONs to match normal PRIVMSGs.

This commit is contained in:
Jeremy Fincher 2003-06-05 21:03:22 +00:00
parent 51cb83d3e6
commit 1131cc4f15

View File

@ -216,7 +216,7 @@ class Relay(callbacks.Privmsg):
def _formatPrivmsg(self, nick, abbreviation, msg): def _formatPrivmsg(self, nick, abbreviation, msg):
if ircmsgs.isAction(msg): if ircmsgs.isAction(msg):
return '* %s/%s %s' % (nick, abbreviation, ircmsgs.unAction(msg)) return '* %s@%s %s' % (nick, abbreviation, ircmsgs.unAction(msg))
else: else:
return '<%s@%s> %s' % (nick, abbreviation, msg.args[1]) return '<%s@%s> %s' % (nick, abbreviation, msg.args[1])
@ -311,7 +311,7 @@ class Relay(callbacks.Privmsg):
if msg.command == 'PRIVMSG': if msg.command == 'PRIVMSG':
abbreviations = self.abbreviations.values() abbreviations = self.abbreviations.values()
rPrivmsg = re.compile(r'<[^@]+@(?:%s)>' % '|'.join(abbreviations)) rPrivmsg = re.compile(r'<[^@]+@(?:%s)>' % '|'.join(abbreviations))
rAction = re.compile(r'\* [^/]+/(?:%s) ' % '|'.join(abbreviations)) rAction = re.compile(r'\* [^/]+@(?:%s) ' % '|'.join(abbreviations))
if not (rPrivmsg.match(msg.args[1]) or \ if not (rPrivmsg.match(msg.args[1]) or \
rAction.match(msg.args[1]) or \ rAction.match(msg.args[1]) or \
msg.args[1].find('has left on ') != -1 or \ msg.args[1].find('has left on ') != -1 or \