diff --git a/Bantracker/plugin.py b/Bantracker/plugin.py index d7ae270..8b20b92 100644 --- a/Bantracker/plugin.py +++ b/Bantracker/plugin.py @@ -254,4 +254,34 @@ class Bantracker(callbacks.Plugin): btlogin = wrap(btlogin) + def mark(self, irc, msg, args, channel, target, kickmsg): + """ [] [] + + Creates an entry in the Bantracker as if was kicked from with the comment , + if is given it will be uses as the comment on the Bantracker, is only needed when send in /msg + """ + if not msg.tagged('identified'): + irc.error(conf.supybot.replies.incorrectAuthentication()) + return + try: + user = ircdb.users.getUser(msg.prefix[:msg.prefix.find('!')]) + except: + irc.error(conf.supybot.replies.incorrectAuthentication()) + return + + user.addAuth(msg.prefix) + ircdb.users.setUser(user, flush=False) + if not channel: + irc.error(' must be given if not in a channel') + return + if not kickmsg: + kickmsg = '**MARK**' + else: + kickmsg = "**MARK** - %s" % kickmsg + self.doLog(irc, channel, '*** %s requested a mark for %s\n' % (msg.nick, target)) + self.doKickban(irc, channel, msg.nick, target, kickmsg) + irc.replySuccess() + + mark = wrap(mark, [optional('channel'), 'something', additional('text')]) + Class = Bantracker diff --git a/Encyclopedia/plugin.py b/Encyclopedia/plugin.py index 37f1a27..7436716 100644 --- a/Encyclopedia/plugin.py +++ b/Encyclopedia/plugin.py @@ -205,8 +205,8 @@ class Encyclopedia(callbacks.Plugin): factoids = FactoidSet() factoids.global_primary = self.get_single_factoid(channel, name) factoids.global_secondary = self.get_single_factoid(channel, name + '-also') - factoids.channel_primary = self.get_single_factoid(channel, name + '-' + channel) - factoids.channel_secondary = self.get_single_factoid(channel, name + '-' + channel + '-also') + factoids.channel_primary = self.get_single_factoid(channel, name + '-' + channel.lower()) + factoids.channel_secondary = self.get_single_factoid(channel, name + '-' + channel.lower() + '-also') if resolve: factoids.global_primary = self.resolve_alias(channel, factoids.global_primary) factoids.global_secondary = self.resolve_alias(channel, factoids.global_secondary)