All pastes #914061 Raw Edit

Mine

public text v1 · immutable
·published 2008-02-22 16:22 UTC
rendered paste body
                        # If it's just a get, spit it out
                        if trigger.name == '__Query_Get':
                                # <reply> and <action> check
                                m = REPLY_ACTION_RE.match(value)
                                if m:
                                        typ = m.group('type').lower()
                                        if typ == 'reply':
                                                replytext = m.group('value')
                                        elif typ == 'action':
                                                replytext = '\x01ACTION %s\x01' % m.group('value')
                                        self.sendReply(trigger, replytext, process=0)

                                else:
                                        replytext = '%s is %s' % (row['name'], value)
                                        self.sendReply(trigger, replytext)

                        # If it's really a 'tell', msg the requester and his target
                        elif trigger.name == '__Query_Tell':
                                tellnick = trigger.match.group('nick')

                                msgtext = "Told %s that %s is %s" % (tellnick, row['name'], value)
                                self.privmsg(trigger.wrap, trigger.userinfo.nick, msgtext)

                                msgtext = "%s wants you to know: %s is %s" % (trigger.userinfo.nick, row['name'], value)
                                self.privmsg(trigger.wrap, tellnick, msgtext)