2005-02-02 08:18:23 +01:00
|
|
|
###
|
|
|
|
# Copyright (c) 2002-2004, Jeremiah Fincher
|
2012-09-01 16:16:48 +02:00
|
|
|
# Copyright (c) 2009-2010, James McCoy
|
2021-08-01 21:47:37 +02:00
|
|
|
# Copyright (c) 2010-2021, The Limnoria Contributors
|
2005-02-02 08:18:23 +01:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are met:
|
|
|
|
#
|
|
|
|
# * Redistributions of source code must retain the above copyright notice,
|
|
|
|
# this list of conditions, and the following disclaimer.
|
|
|
|
# * Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
# this list of conditions, and the following disclaimer in the
|
|
|
|
# documentation and/or other materials provided with the distribution.
|
|
|
|
# * Neither the name of the author of this software nor the name of
|
|
|
|
# contributors to this software may be used to endorse or promote products
|
|
|
|
# derived from this software without specific prior written consent.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
|
|
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
###
|
|
|
|
|
|
|
|
import re
|
2007-10-23 07:19:09 +02:00
|
|
|
import math
|
2007-10-23 05:33:37 +02:00
|
|
|
import types
|
2005-02-02 08:18:23 +01:00
|
|
|
|
|
|
|
import supybot.log as log
|
|
|
|
import supybot.conf as conf
|
2010-10-10 14:45:25 +02:00
|
|
|
from supybot.i18n import PluginInternationalization, internationalizeDocstring
|
2005-02-02 08:18:23 +01:00
|
|
|
import supybot.utils as utils
|
|
|
|
import supybot.world as world
|
|
|
|
import supybot.ircdb as ircdb
|
|
|
|
from supybot.commands import *
|
|
|
|
import supybot.irclib as irclib
|
|
|
|
import supybot.ircmsgs as ircmsgs
|
|
|
|
import supybot.plugins as plugins
|
|
|
|
import supybot.ircutils as ircutils
|
|
|
|
import supybot.callbacks as callbacks
|
2020-01-26 20:42:38 +01:00
|
|
|
from supybot.utils.math_evaluator import safe_eval, InvalidNode
|
2005-02-02 08:18:23 +01:00
|
|
|
|
2010-10-10 14:45:25 +02:00
|
|
|
_ = PluginInternationalization('ChannelStats')
|
2010-10-09 11:36:22 +02:00
|
|
|
|
2005-02-02 08:18:23 +01:00
|
|
|
class ChannelStat(irclib.IrcCommandDispatcher):
|
2007-10-23 06:44:53 +02:00
|
|
|
_values = ['actions', 'chars', 'frowns', 'joins', 'kicks','modes',
|
2009-10-28 00:28:34 +01:00
|
|
|
'msgs', 'parts', 'quits', 'smileys', 'topics', 'words', 'users']
|
2005-02-02 08:18:23 +01:00
|
|
|
def __init__(self, actions=0, chars=0, frowns=0, joins=0, kicks=0, modes=0,
|
2009-10-28 00:28:34 +01:00
|
|
|
msgs=0, parts=0, quits=0, smileys=0, topics=0, words=0,
|
|
|
|
users=0):
|
2005-02-02 08:18:23 +01:00
|
|
|
self.actions = actions
|
|
|
|
self.chars = chars
|
|
|
|
self.frowns = frowns
|
|
|
|
self.joins = joins
|
|
|
|
self.kicks = kicks
|
|
|
|
self.modes = modes
|
|
|
|
self.msgs = msgs
|
|
|
|
self.parts = parts
|
|
|
|
self.quits = quits
|
|
|
|
self.smileys = smileys
|
|
|
|
self.topics = topics
|
|
|
|
self.words = words
|
2009-10-28 00:28:34 +01:00
|
|
|
self.users = users
|
2009-08-20 16:48:41 +02:00
|
|
|
|
2005-02-02 08:18:23 +01:00
|
|
|
def values(self):
|
|
|
|
return [getattr(self, s) for s in self._values]
|
|
|
|
|
|
|
|
def addMsg(self, msg):
|
|
|
|
self.msgs += 1
|
2020-01-23 14:25:10 +01:00
|
|
|
method = self.dispatchCommand(msg.command, msg.args)
|
2005-02-02 08:18:23 +01:00
|
|
|
if method is not None:
|
|
|
|
method(msg)
|
|
|
|
|
|
|
|
def doPayload(self, channel, payload):
|
2005-03-03 05:45:47 +01:00
|
|
|
channel = plugins.getChannel(channel)
|
2005-02-02 08:18:23 +01:00
|
|
|
self.chars += len(payload)
|
|
|
|
self.words += len(payload.split())
|
|
|
|
fRe = conf.supybot.plugins.ChannelStats.get('frowns').get(channel)()
|
|
|
|
sRe =conf.supybot.plugins.ChannelStats.get('smileys').get(channel)()
|
|
|
|
self.frowns += len(fRe.findall(payload))
|
|
|
|
self.smileys += len(sRe.findall(payload))
|
|
|
|
|
|
|
|
def doPrivmsg(self, msg):
|
2010-01-28 14:14:44 +01:00
|
|
|
isAction = ircmsgs.isAction(msg)
|
|
|
|
if ircmsgs.isCtcp(msg) and not isAction:
|
|
|
|
return
|
2005-02-02 08:18:23 +01:00
|
|
|
self.doPayload(*msg.args)
|
2010-01-28 14:14:44 +01:00
|
|
|
if isAction:
|
2005-02-02 08:18:23 +01:00
|
|
|
self.actions += 1
|
|
|
|
|
|
|
|
def doTopic(self, msg):
|
|
|
|
self.doPayload(*msg.args)
|
|
|
|
self.topics += 1
|
|
|
|
|
|
|
|
def doKick(self, msg):
|
|
|
|
self.kicks += 1
|
|
|
|
|
|
|
|
def doPart(self, msg):
|
|
|
|
if len(msg.args) == 2:
|
|
|
|
self.doPayload(*msg.args)
|
|
|
|
self.parts += 1
|
|
|
|
|
|
|
|
def doJoin(self, msg):
|
|
|
|
if len(msg.args) == 2:
|
|
|
|
self.doPayload(*msg.args)
|
|
|
|
self.joins += 1
|
2009-10-28 00:28:34 +01:00
|
|
|
# Handle max-users in the plugin since we need an irc object
|
2005-02-02 08:18:23 +01:00
|
|
|
|
|
|
|
def doMode(self, msg):
|
|
|
|
self.modes += 1
|
|
|
|
|
|
|
|
# doQuit is handled by the plugin.
|
|
|
|
|
|
|
|
|
|
|
|
class UserStat(ChannelStat):
|
2007-10-24 16:16:12 +02:00
|
|
|
_values = ['kicked'] + ChannelStat._values
|
2005-02-02 08:18:23 +01:00
|
|
|
def __init__(self, kicked=0, *args):
|
|
|
|
ChannelStat.__init__(self, *args)
|
|
|
|
self.kicked = kicked
|
|
|
|
|
|
|
|
def doKick(self, msg):
|
|
|
|
self.doPayload(msg.args[0], msg.args[2])
|
|
|
|
self.kicks += 1
|
|
|
|
|
|
|
|
class StatsDB(plugins.ChannelUserDB):
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
plugins.ChannelUserDB.__init__(self, *args, **kwargs)
|
|
|
|
|
|
|
|
def serialize(self, v):
|
|
|
|
return v.values()
|
|
|
|
|
|
|
|
def deserialize(self, channel, id, L):
|
2014-01-21 10:57:38 +01:00
|
|
|
L = list(map(int, L))
|
2005-02-02 08:18:23 +01:00
|
|
|
if id == 'channelStats':
|
|
|
|
return ChannelStat(*L)
|
|
|
|
else:
|
|
|
|
return UserStat(*L)
|
|
|
|
|
2019-08-04 18:11:28 +02:00
|
|
|
def addMsg(self, irc, msg, id=None):
|
2019-08-24 17:50:05 +02:00
|
|
|
if msg.channel:
|
|
|
|
channel = plugins.getChannel(msg.channel)
|
2005-02-02 08:18:23 +01:00
|
|
|
if (channel, 'channelStats') not in self:
|
|
|
|
self[channel, 'channelStats'] = ChannelStat()
|
|
|
|
self[channel, 'channelStats'].addMsg(msg)
|
|
|
|
try:
|
|
|
|
if id is None:
|
|
|
|
id = ircdb.users.getUserId(msg.prefix)
|
|
|
|
except KeyError:
|
|
|
|
return
|
|
|
|
if (channel, id) not in self:
|
|
|
|
self[channel, id] = UserStat()
|
|
|
|
self[channel, id].addMsg(msg)
|
|
|
|
|
|
|
|
def getChannelStats(self, channel):
|
|
|
|
return self[channel, 'channelStats']
|
|
|
|
|
|
|
|
def getUserStats(self, channel, id):
|
|
|
|
return self[channel, id]
|
|
|
|
|
|
|
|
filename = conf.supybot.directories.data.dirize('ChannelStats.db')
|
2005-02-09 08:04:04 +01:00
|
|
|
class ChannelStats(callbacks.Plugin):
|
2014-11-30 08:18:44 +01:00
|
|
|
"""This plugin keeps stats of the channel and returns them with
|
|
|
|
the command 'channelstats'."""
|
2005-02-02 08:18:23 +01:00
|
|
|
noIgnore = True
|
|
|
|
def __init__(self, irc):
|
|
|
|
self.__parent = super(ChannelStats, self)
|
|
|
|
self.__parent.__init__(irc)
|
|
|
|
self.outFiltering = False
|
|
|
|
self.db = StatsDB(filename)
|
|
|
|
self._flush = self.db.flush
|
|
|
|
world.flushers.append(self._flush)
|
|
|
|
|
|
|
|
def die(self):
|
|
|
|
world.flushers.remove(self._flush)
|
|
|
|
self.db.close()
|
2005-02-09 08:04:04 +01:00
|
|
|
self.__parent.die()
|
2005-02-02 08:18:23 +01:00
|
|
|
|
|
|
|
def __call__(self, irc, msg):
|
2019-08-04 18:11:28 +02:00
|
|
|
self.db.addMsg(irc, msg)
|
2005-02-02 08:18:23 +01:00
|
|
|
super(ChannelStats, self).__call__(irc, msg)
|
|
|
|
|
|
|
|
def outFilter(self, irc, msg):
|
|
|
|
if msg.command == 'PRIVMSG':
|
2019-08-24 17:50:05 +02:00
|
|
|
if msg.channel:
|
|
|
|
if self.registryValue('selfStats', msg.channel, irc.network):
|
2005-02-02 08:18:23 +01:00
|
|
|
try:
|
|
|
|
self.outFiltering = True
|
2019-08-04 18:11:28 +02:00
|
|
|
self.db.addMsg(irc, msg, 0)
|
2005-02-02 08:18:23 +01:00
|
|
|
finally:
|
|
|
|
self.outFiltering = False
|
|
|
|
return msg
|
|
|
|
|
2009-10-28 00:28:34 +01:00
|
|
|
def _setUsers(self, irc, channel):
|
|
|
|
if (channel, 'channelStats') not in self.db:
|
|
|
|
self.db[channel, 'channelStats'] = ChannelStat()
|
|
|
|
oldUsers = self.db[channel, 'channelStats'].users
|
|
|
|
newUsers = len(irc.state.channels[channel].users)
|
|
|
|
self.db[channel, 'channelStats'].users = max(oldUsers, newUsers)
|
|
|
|
|
|
|
|
def doJoin(self, irc, msg):
|
|
|
|
self._setUsers(irc, msg.args[0])
|
|
|
|
|
|
|
|
def do366(self, irc, msg):
|
|
|
|
self._setUsers(irc, msg.args[1])
|
|
|
|
|
2005-02-02 08:18:23 +01:00
|
|
|
def doQuit(self, irc, msg):
|
|
|
|
try:
|
|
|
|
id = ircdb.users.getUserId(msg.prefix)
|
|
|
|
except KeyError:
|
|
|
|
id = None
|
2015-12-04 13:30:07 +01:00
|
|
|
for channel in msg.tagged('channels'):
|
|
|
|
if (channel, 'channelStats') not in self.db:
|
|
|
|
self.db[channel, 'channelStats'] = ChannelStat()
|
|
|
|
self.db[channel, 'channelStats'].quits += 1
|
|
|
|
if id is not None:
|
|
|
|
if (channel, id) not in self.db:
|
|
|
|
self.db[channel, id] = UserStat()
|
|
|
|
self.db[channel, id].quits += 1
|
2005-02-02 08:18:23 +01:00
|
|
|
|
|
|
|
def doKick(self, irc, msg):
|
|
|
|
(channel, nick, _) = msg.args
|
|
|
|
hostmask = irc.state.nickToHostmask(nick)
|
|
|
|
try:
|
|
|
|
id = ircdb.users.getUserId(hostmask)
|
|
|
|
except KeyError:
|
|
|
|
return
|
2009-10-28 00:28:34 +01:00
|
|
|
if (channel, id) not in self.db:
|
|
|
|
self.db[channel, id] = UserStat()
|
2005-02-02 08:18:23 +01:00
|
|
|
self.db.channels[channel][id].kicked += 1
|
|
|
|
|
2010-10-10 14:45:25 +02:00
|
|
|
@internationalizeDocstring
|
2005-02-02 08:18:23 +01:00
|
|
|
def stats(self, irc, msg, args, channel, name):
|
2010-10-10 14:45:25 +02:00
|
|
|
"""[<channel>] [<name>]
|
|
|
|
|
|
|
|
Returns the statistics for <name> on <channel>. <channel> is only
|
|
|
|
necessary if the message isn't sent on the channel itself. If <name>
|
|
|
|
isn't given, it defaults to the user sending the command.
|
|
|
|
"""
|
2020-04-07 21:17:52 +02:00
|
|
|
if channel != '#':
|
|
|
|
# Skip this check if databases.plugins.channelspecific is False.
|
|
|
|
if msg.nick not in irc.state.channels[channel].users:
|
|
|
|
irc.error(format('You must be in %s to use this command.', channel))
|
|
|
|
return
|
2005-02-02 08:18:23 +01:00
|
|
|
if name and ircutils.strEqual(name, irc.nick):
|
|
|
|
id = 0
|
|
|
|
elif not name:
|
|
|
|
try:
|
|
|
|
id = ircdb.users.getUserId(msg.prefix)
|
|
|
|
name = ircdb.users.getUser(id).name
|
|
|
|
except KeyError:
|
2010-10-09 11:36:22 +02:00
|
|
|
irc.error(_('I couldn\'t find you in my user database.'))
|
2005-02-02 08:18:23 +01:00
|
|
|
return
|
|
|
|
elif not ircdb.users.hasUser(name):
|
|
|
|
try:
|
|
|
|
hostmask = irc.state.nickToHostmask(name)
|
|
|
|
id = ircdb.users.getUserId(hostmask)
|
|
|
|
except KeyError:
|
|
|
|
irc.errorNoUser()
|
|
|
|
return
|
|
|
|
else:
|
|
|
|
id = ircdb.users.getUserId(name)
|
|
|
|
try:
|
|
|
|
stats = self.db.getUserStats(channel, id)
|
2010-10-09 11:36:22 +02:00
|
|
|
s = format(_('%s has sent %n; a total of %n, %n, '
|
|
|
|
'%n, and %n; %s of those messages %s. '
|
2005-02-02 08:18:23 +01:00
|
|
|
'%s has joined %n, parted %n, quit %n, '
|
|
|
|
'kicked someone %n, been kicked %n, '
|
|
|
|
'changed the topic %n, and changed the '
|
2010-10-09 11:36:22 +02:00
|
|
|
'mode %n.'),
|
2005-02-02 08:18:23 +01:00
|
|
|
name, (stats.msgs, 'message'),
|
2010-10-09 11:36:22 +02:00
|
|
|
(stats.chars, _('character')),
|
|
|
|
(stats.words, _('word')),
|
|
|
|
(stats.smileys, _('smiley')),
|
|
|
|
(stats.frowns, _('frown')),
|
2005-02-02 08:18:23 +01:00
|
|
|
stats.actions,
|
2010-10-09 11:36:22 +02:00
|
|
|
stats.actions == 1 and _('was an ACTION')
|
|
|
|
or _('were ACTIONs'),
|
2005-02-02 08:18:23 +01:00
|
|
|
name,
|
2010-10-09 11:36:22 +02:00
|
|
|
(stats.joins, _('time')),
|
|
|
|
(stats.parts, _('time')),
|
|
|
|
(stats.quits, _('time')),
|
|
|
|
(stats.kicks, _('time')),
|
|
|
|
(stats.kicked, _('time')),
|
|
|
|
(stats.topics, _('time')),
|
|
|
|
(stats.modes, _('time')))
|
2005-02-02 08:18:23 +01:00
|
|
|
irc.reply(s)
|
|
|
|
except KeyError:
|
2010-10-09 11:36:22 +02:00
|
|
|
irc.error(format(_('I have no stats for that %s in %s.'),
|
2005-02-02 08:18:23 +01:00
|
|
|
name, channel))
|
|
|
|
stats = wrap(stats, ['channeldb', additional('something')])
|
|
|
|
|
2010-10-10 14:45:25 +02:00
|
|
|
@internationalizeDocstring
|
2007-10-23 05:33:37 +02:00
|
|
|
def rank(self, irc, msg, args, channel, expr):
|
2010-10-10 14:45:25 +02:00
|
|
|
"""[<channel>] <stat expression>
|
|
|
|
|
|
|
|
Returns the ranking of users according to the given stat expression.
|
|
|
|
Valid variables in the stat expression include 'msgs', 'chars',
|
|
|
|
'words', 'smileys', 'frowns', 'actions', 'joins', 'parts', 'quits',
|
|
|
|
'kicks', 'kicked', 'topics', and 'modes'. Any simple mathematical
|
|
|
|
expression involving those variables is permitted.
|
|
|
|
"""
|
2020-04-07 21:17:52 +02:00
|
|
|
if channel != '#':
|
|
|
|
# Skip this check if databases.plugins.channelspecific is False.
|
|
|
|
if msg.nick not in irc.state.channels[channel].users:
|
|
|
|
irc.error(format('You must be in %s to use this command.', channel))
|
|
|
|
return
|
2007-10-23 05:33:37 +02:00
|
|
|
expr = expr.lower()
|
|
|
|
users = []
|
|
|
|
for ((c, id), stats) in self.db.items():
|
2010-05-11 23:50:43 +02:00
|
|
|
if ircutils.strEqual(c, channel) and \
|
|
|
|
(id == 0 or ircdb.users.hasUser(id)):
|
2020-01-26 20:42:38 +01:00
|
|
|
e = {}
|
2007-10-23 05:33:37 +02:00
|
|
|
for attr in stats._values:
|
|
|
|
e[attr] = float(getattr(stats, attr))
|
|
|
|
try:
|
2020-01-26 20:42:38 +01:00
|
|
|
v = safe_eval(expr, allow_ints=True, variables=e)
|
2007-10-23 06:44:53 +02:00
|
|
|
except ZeroDivisionError:
|
|
|
|
v = float('inf')
|
2014-01-20 15:49:15 +01:00
|
|
|
except NameError as e:
|
2020-01-26 20:42:38 +01:00
|
|
|
irc.errorInvalid(_('stat variable'), str(e))
|
|
|
|
except InvalidNode as e:
|
|
|
|
irc.error(_('Invalid syntax: %s') % e.args[0], Raise=True)
|
2014-01-20 15:49:15 +01:00
|
|
|
except Exception as e:
|
2007-10-23 06:59:49 +02:00
|
|
|
irc.error(utils.exnToString(e), Raise=True)
|
2020-01-26 20:42:38 +01:00
|
|
|
else:
|
|
|
|
v = float(v)
|
2010-05-11 23:50:43 +02:00
|
|
|
if id == 0:
|
|
|
|
users.append((v, irc.nick))
|
|
|
|
else:
|
|
|
|
users.append((v, ircdb.users.getUser(id).name))
|
2007-10-23 05:33:37 +02:00
|
|
|
users.sort()
|
|
|
|
users.reverse()
|
2009-08-20 16:48:41 +02:00
|
|
|
s = utils.str.commaAndify(['#%s %s (%.3g)' % (i+1, u, v)
|
2007-10-23 06:44:53 +02:00
|
|
|
for (i, (v, u)) in enumerate(users)])
|
2007-10-23 05:33:37 +02:00
|
|
|
irc.reply(s)
|
|
|
|
rank = wrap(rank, ['channeldb', 'text'])
|
|
|
|
|
2010-10-10 14:45:25 +02:00
|
|
|
@internationalizeDocstring
|
2005-02-02 08:18:23 +01:00
|
|
|
def channelstats(self, irc, msg, args, channel):
|
2010-10-10 14:45:25 +02:00
|
|
|
"""[<channel>]
|
|
|
|
|
|
|
|
Returns the statistics for <channel>. <channel> is only necessary if
|
|
|
|
the message isn't sent on the channel itself.
|
|
|
|
"""
|
2013-11-18 21:44:56 +01:00
|
|
|
if channel not in irc.state.channels:
|
2014-01-22 13:46:42 +01:00
|
|
|
irc.error(_('I am not in %s.') % channel, Raise=True)
|
2013-11-18 21:44:56 +01:00
|
|
|
elif msg.nick not in irc.state.channels[channel].users:
|
|
|
|
irc.error(_('You must be in %s to use this command.') % channel,
|
|
|
|
Raise=True)
|
2005-02-02 08:18:23 +01:00
|
|
|
try:
|
2013-05-09 12:47:53 +02:00
|
|
|
channeldb = conf.supybot.databases.plugins.channelSpecific. \
|
|
|
|
getChannelLink(channel)
|
|
|
|
stats = self.db.getChannelStats(channeldb)
|
2009-10-28 00:28:34 +01:00
|
|
|
curUsers = len(irc.state.channels[channel].users)
|
2010-10-09 11:36:22 +02:00
|
|
|
s = format(_('On %s there %h been %i messages, containing %i '
|
2005-02-02 08:18:23 +01:00
|
|
|
'characters, %n, %n, and %n; '
|
|
|
|
'%i of those messages %s. There have been '
|
2009-10-28 00:28:34 +01:00
|
|
|
'%n, %n, %n, %n, %n, and %n. There %b currently %n '
|
2010-10-09 11:36:22 +02:00
|
|
|
'and the channel has peaked at %n.'),
|
2009-10-28 00:28:34 +01:00
|
|
|
channel, stats.msgs, stats.msgs, stats.chars,
|
2010-10-09 11:36:22 +02:00
|
|
|
(stats.words, _('word')),
|
|
|
|
(stats.smileys, _('smiley')),
|
|
|
|
(stats.frowns, _('frown')),
|
|
|
|
stats.actions, stats.actions == 1 and _('was an ACTION')
|
|
|
|
or _('were ACTIONs'),
|
|
|
|
(stats.joins, _('join')),
|
|
|
|
(stats.parts, _('part')),
|
|
|
|
(stats.quits, _('quit')),
|
|
|
|
(stats.kicks, _('kick')),
|
|
|
|
(stats.modes, _('mode'), _('change')),
|
|
|
|
(stats.topics, _('topic'), _('change')),
|
2009-10-28 00:28:34 +01:00
|
|
|
curUsers,
|
2010-10-09 11:36:22 +02:00
|
|
|
(curUsers, _('user')),
|
|
|
|
(stats.users, _('user')))
|
2005-02-02 08:18:23 +01:00
|
|
|
irc.reply(s)
|
|
|
|
except KeyError:
|
2010-10-09 11:36:22 +02:00
|
|
|
irc.error(format(_('I\'ve never been on %s.'), channel))
|
2013-05-09 12:47:53 +02:00
|
|
|
channelstats = wrap(channelstats, ['channel'])
|
2005-02-02 08:18:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
Class = ChannelStats
|
|
|
|
|
2006-02-11 16:52:51 +01:00
|
|
|
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|