def format(self, args): if not args.input: return project = XML.dig(args.message.xml, "message", "source", "project") if project: from LibCIA.IRC.Formatting import format prefix = format("%s:" % XML.shallowText(project), 'bold') + " " return "\n".join([prefix + line for line in args.input.split("\n")]) else: return args.input
def format(self, args): if not args.input: return project = XML.dig(args.message.xml, "message", "source", "project") if project: from LibCIA.IRC.Formatting import format prefix = format("%s:" % XML.shallowText(project), 'bold') + " " return "\n".join( [prefix + line for line in args.input.split("\n")]) else: return args.input
def format(self, args): if input: from LibCIA.IRC.Formatting import format return format(args.input, self.formattingCode)