[pybot-commits] CVS: pybot/pybot/modules google.py,1.5,1.6 messages.py,1.12,1.13 notes.py,1.4,1.5 re
Brought to you by:
niemeyer
From: Gustavo N. <nie...@us...> - 2003-08-24 20:06:51
|
Update of /cvsroot/pybot/pybot/pybot/modules In directory sc8-pr-cvs1:/tmp/cvs-serv24587 Modified Files: google.py messages.py notes.py repeat.py testadora.py Log Message: Replaced some regex("...\s*...") by regexp("... *..."). Index: google.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/google.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** google.py 24 Aug 2003 19:30:53 -0000 1.5 --- google.py 24 Aug 2003 19:40:24 -0000 1.6 *************** *** 46,50 **** # [search] google [<n>]: <search> ! self.re1 = regexp(r"(?:search )?google(?: (?P<n>\d+))?:\s*(?P<search>.+)") mm.register_help("(?:search )?google(?: search)?", HELP, --- 46,50 ---- # [search] google [<n>]: <search> ! self.re1 = regexp(r"(?:search )?google(?: (?P<n>\d+))?: *(?P<search>.+)") mm.register_help("(?:search )?google(?: search)?", HELP, Index: messages.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/messages.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** messages.py 24 Aug 2003 19:30:53 -0000 1.12 --- messages.py 24 Aug 2003 19:40:24 -0000 1.13 *************** *** 45,49 **** # [priv[ate]] message (to|for) <nick>: <message> ! self.re1 = regexp(r"(?P<private>priv(?:ate)? )?message (?:to|for) (?P<nick>\S+?)\s*: (?P<message>.*)") # [any] message[s]? --- 45,49 ---- # [priv[ate]] message (to|for) <nick>: <message> ! self.re1 = regexp(r"(?P<private>priv(?:ate)? )?message (?:to|for) (?P<nick>\S+?) *: (?P<message>.*)") # [any] message[s]? Index: notes.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/notes.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** notes.py 24 Aug 2003 19:30:53 -0000 1.4 --- notes.py 24 Aug 2003 19:40:24 -0000 1.5 *************** *** 49,56 **** # [add|new|create|include] note [about] <topic>: <note> ! self.re1 = regexp(r"(?:add |new |create |include )?note(?: about)? (?P<topic>[^:]+):\s*(?P<note>.+)") # [del|delete|remove] note[s] [about] <topic> [: <num> [, ...]] ! self.re2 = regexp(r"(?:del|delete|remove) notes?(?: about)? (?P<topic>[^:]+)(?:\s*:\s*(?P<nums>.+))?") # [show] note[s] [[about] <topic> [?]] --- 49,56 ---- # [add|new|create|include] note [about] <topic>: <note> ! self.re1 = regexp(r"(?:add |new |create |include )?note(?: about)? (?P<topic>[^:]+): *(?P<note>.+)") # [del|delete|remove] note[s] [about] <topic> [: <num> [, ...]] ! self.re2 = regexp(r"(?:del|delete|remove) notes?(?: about)? (?P<topic>[^:]+)(?: *: *(?P<nums>.+))?") # [show] note[s] [[about] <topic> [?]] Index: repeat.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/repeat.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** repeat.py 24 Aug 2003 19:30:53 -0000 1.6 --- repeat.py 24 Aug 2003 19:40:24 -0000 1.7 *************** *** 54,58 **** # [don[']t|do not] repeat [each <n>[ ](s[econds]|m[inutes]|h[ours])] (to|at|on) [channel|user] <target> [[on|at] server <server>]: [/me|/notice] ... ! self.re1 = regexp(r"(?:(?P<dont>don'?t|do not) )?repeat(?: each (?P<interval>[0-9]+)\s*(?P<intervalunit>se?c?o?n?d?s?|mi?n?u?t?e?s?|ho?u?r?s?))?(?: (?:to|at|on)(?: (?:channel|user))? (?P<target>\S+))?(?: (?:on|at)? server (?P<server>\S+))?\s*: (?P<action>/me\s)?(?P<notice>/notice\s)?(?P<phrase>.*)") # repeat --- 54,58 ---- # [don[']t|do not] repeat [each <n>[ ](s[econds]|m[inutes]|h[ours])] (to|at|on) [channel|user] <target> [[on|at] server <server>]: [/me|/notice] ... ! self.re1 = regexp(r"(?:(?P<dont>don'?t|do not) )?repeat(?: each (?P<interval>[0-9]+) *(?P<intervalunit>se?c?o?n?d?s?|mi?n?u?t?e?s?|ho?u?r?s?))?(?: (?:to|at|on)(?: (?:channel|user))? (?P<target>\S+))?(?: (?:on|at)? server (?P<server>\S+))? *: (?P<action>/me\s)?(?P<notice>/notice\s)?(?P<phrase>.*)") # repeat Index: testadora.py =================================================================== RCS file: /cvsroot/pybot/pybot/pybot/modules/testadora.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** testadora.py 24 Aug 2003 19:30:53 -0000 1.4 --- testadora.py 24 Aug 2003 19:40:24 -0000 1.5 *************** *** 44,48 **** # [show] (compiletime|compile time) [for] <package> ! self.re1 = regexp(r"(?:show )?compile\s*time (?:for )?(?P<package>\S+)") # testadora --- 44,48 ---- # [show] (compiletime|compile time) [for] <package> ! self.re1 = regexp(r"(?:show )?compile *time (?:for )?(?P<package>\S+)") # testadora *************** *** 50,54 **** # (compiletime|compile time) ! mm.register_help("compile\s*time", HELP_COMPILETIME) mm.register_perm("compiletime", PERM_COMPILETIME) --- 50,54 ---- # (compiletime|compile time) ! mm.register_help("compile *time", HELP_COMPILETIME) mm.register_perm("compiletime", PERM_COMPILETIME) |