mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Include hostmasks in JOIN, PART, QUIT logs.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
10f5a12b7e
commit
4a9596608a
@ -1,6 +1,6 @@
|
||||
###
|
||||
# Copyright (c) 2002-2004, Jeremiah Fincher
|
||||
# Copyright (c) 2009, James Vega
|
||||
# Copyright (c) 2009-2010, James Vega
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -206,8 +206,8 @@ class ChannelLogger(callbacks.Plugin):
|
||||
def doJoin(self, irc, msg):
|
||||
for channel in msg.args[0].split(','):
|
||||
self.doLog(irc, channel,
|
||||
'*** %s has joined %s\n',
|
||||
msg.nick or msg.prefix, channel)
|
||||
'*** %s <%s> has joined %s\n',
|
||||
msg.nick, msg.prefix, channel)
|
||||
|
||||
def doKick(self, irc, msg):
|
||||
if len(msg.args) == 3:
|
||||
@ -226,7 +226,8 @@ class ChannelLogger(callbacks.Plugin):
|
||||
def doPart(self, irc, msg):
|
||||
for channel in msg.args[0].split(','):
|
||||
self.doLog(irc, channel,
|
||||
'*** %s has left %s\n', msg.nick, channel)
|
||||
'*** %s <%s> has left %s\n',
|
||||
msg.nick, msg.prefix, channel)
|
||||
|
||||
def doMode(self, irc, msg):
|
||||
channel = msg.args[0]
|
||||
@ -248,7 +249,9 @@ class ChannelLogger(callbacks.Plugin):
|
||||
irc = irc.getRealIrc()
|
||||
for (channel, chan) in self.lastStates[irc].channels.iteritems():
|
||||
if msg.nick in chan.users:
|
||||
self.doLog(irc, channel, '*** %s has quit IRC\n', msg.nick)
|
||||
self.doLog(irc, channel,
|
||||
'*** %s <%s> has quit IRC\n',
|
||||
msg.nick, msg.prefix)
|
||||
|
||||
def outFilter(self, irc, msg):
|
||||
# Gotta catch my own messages *somehow* :)
|
||||
|
@ -1,5 +1,6 @@
|
||||
###
|
||||
# Copyright (c) 2002-2005, Jeremiah Fincher
|
||||
# Copyright (c) 2010, James Vega
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -292,13 +293,17 @@ def prettyPrint(msg, addRecipients=False, timestampFormat=None, showNick=True):
|
||||
else:
|
||||
s = '-%s- %s' % (nick(), msg.args[1])
|
||||
elif msg.command == 'JOIN':
|
||||
s = '*** %s has joined %s' % (msg.nick, msg.args[0])
|
||||
prefix = msg.prefix
|
||||
if msg.nick:
|
||||
prefix = '%s <%s>' % (msg.nick, prefix)
|
||||
s = '*** %s has joined %s' % (prefix, msg.args[0])
|
||||
elif msg.command == 'PART':
|
||||
if len(msg.args) > 1:
|
||||
partmsg = ' (%s)' % msg.args[1]
|
||||
else:
|
||||
partmsg = ''
|
||||
s = '*** %s has parted %s%s' % (msg.nick, msg.args[0], partmsg)
|
||||
s = '*** %s <%s> has parted %s%s' % (msg.nick, msg.prefix,
|
||||
msg.args[0], partmsg)
|
||||
elif msg.command == 'KICK':
|
||||
if len(msg.args) > 2:
|
||||
kickmsg = ' (%s)' % msg.args[1]
|
||||
@ -312,7 +317,7 @@ def prettyPrint(msg, addRecipients=False, timestampFormat=None, showNick=True):
|
||||
quitmsg = ' (%s)' % msg.args[0]
|
||||
else:
|
||||
quitmsg = ''
|
||||
s = '*** %s has quit IRC%s' % (msg.nick, quitmsg)
|
||||
s = '*** %s <%s> has quit IRC%s' % (msg.nick, msg.prefix, quitmsg)
|
||||
elif msg.command == 'TOPIC':
|
||||
s = '*** %s changes topic to %s' % (nickorprefix(), msg.args[1])
|
||||
elif msg.command == 'NICK':
|
||||
|
Loading…
Reference in New Issue
Block a user