def user_correct(bot, event, irc, args):
match = re.match(r"^u[/]([\w]+)[/](.*)[/](.*)[/]?$", " ".join(args))
if match is not None:
nick = match.group(1)
channel = event.target
for i in bot.userdb[channel][nick]['seen']:
msg = i['message']
output = msg.replace(match.group(2), match.group(3))
if msg == output:
pass
else:
break
irc.reply(event, '<{0}> {1}'.format(nick, output))
log.info('Changing %s to %s', args, output)
else:
pass
评论列表
文章目录