[pybot-commits] CVS: pybot/pybot/modules infopack.py,1.2,1.3 social.py,1.4,1.5
Brought to you by:
niemeyer
From: Gustavo N. <nie...@us...> - 2002-06-17 20:33:44
|
Update of /cvsroot/pybot/pybot/pybot/modules In directory usw-pr-cvs1:/tmp/cvs-serv19863 Modified Files: infopack.py social.py Log Message: - Ignore case when compiling infopack triggers. - Social had a wrong "thanks" regular expression. Index: infopack.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/infopack.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** infopack.py 4 Dec 2001 00:57:38 -0000 1.2 --- infopack.py 17 Jun 2002 20:33:40 -0000 1.3 *************** *** 54,58 **** values.append(value) elif line[0] == "T": ! pattern = re.compile(line[2:].rstrip()) self.__triggers.append(pattern) elif line[0] == "M": --- 54,58 ---- values.append(value) elif line[0] == "T": ! pattern = re.compile(line[2:].rstrip(), re.I) self.__triggers.append(pattern) elif line[0] == "M": *************** *** 73,77 **** if line and line[0] != "#": if line[0] == "T": ! pattern = re.compile(line[2:].rstrip()) self.__triggers.append(pattern) elif line[0] == "M": --- 73,77 ---- if line and line[0] != "#": if line[0] == "T": ! pattern = re.compile(line[2:].rstrip(), re.I) self.__triggers.append(pattern) elif line[0] == "M": Index: social.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/social.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** social.py 4 Dec 2001 16:10:57 -0000 1.4 --- social.py 17 Jun 2002 20:33:41 -0000 1.5 *************** *** 34,38 **** # Match '[thank[']s|thank you|thx|tnk[']s] [!|.]' ! self.re3 = re.compile(r'(?:thank|thx|tnk)(?:\'?s|\s+you)(?:\s+(?P<nick>\w+))\s*[!.]*', re.I) # Match 'are you ok?|how are you [doing]?' --- 34,38 ---- # Match '[thank[']s|thank you|thx|tnk[']s] [!|.]' ! self.re3 = re.compile(r'(?:thank|thx|tnk)(?:\'?s|\s+you)(?:\s+(?P<nick>\w+))?\s*[!.]*', re.I) # Match 'are you ok?|how are you [doing]?' *************** *** 77,81 **** m = self.re3.match(msg.line) if m and (msg.forme or m.group("nick") == usernick): ! msg.answer("%:", ["No problems", "You're welcome", "I'm glad to help you", "I'm here for things like this..."], ["!", "."]) return 0 --- 77,81 ---- m = self.re3.match(msg.line) if m and (msg.forme or m.group("nick") == usernick): ! msg.answer("%:", ["No problems", "You're welcome", "I'm glad to help you", "I'm here for things like this", "Not at all"], ["!", "."]) return 0 |