🏡 index : ~doyle/dave.git

author Jordan Doyle <jordan@doyle.wf> 2017-07-31 19:42:43.0 +01:00:00
committer GitHub <noreply@github.com> 2017-07-31 19:42:43.0 +01:00:00
commit
3cf92ed056fbfd076d025a61dd4ef539baa5b643 [patch]
tree
6595a477b8b7f8c4745e12554a51728e14216015
parent
6a4cf06518b72dfe5438e31b9db89df7b7d0866d
download
3cf92ed056fbfd076d025a61dd4ef539baa5b643.tar.gz

Only match /r/ and /u/, not r/ and u/



Diff

 dave/modules/reddit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dave/modules/reddit.py b/dave/modules/reddit.py
index e3520bc..65fc2e0 100644
--- a/dave/modules/reddit.py
+++ a/dave/modules/reddit.py
@@ -44,7 +44,7 @@
        ]
    ))

@dave.module.match(r'.*(?:^| )(?:https?://(?:www\.)?reddit.com)?/?r/(([^\s/]+))/?(?: |$).*')
@dave.module.match(r'.*(?:^| )(?:https?://(?:www\.)?reddit.com)?/r/(([^\s/]+))/?(?: |$).*')
@dave.module.ratelimit(1, 1)
@dave.module.dont_always_run_if_run()
def subreddit(bot, args, sender, source):
@@ -84,7 +84,7 @@
    ))


@dave.module.match(r'.*(?:^| )(?:https?://(?:www\.)?reddit.com)?/?(?:u|user)/(([^\s]+)/?)(?: |$).*')
@dave.module.match(r'.*(?:^| )(?:https?://(?:www\.)?reddit.com)?/(?:u|user)/(([^\s]+)/?)(?: |$).*')
@dave.module.ratelimit(1, 1)
@dave.module.dont_always_run_if_run()
def user(bot, args, sender, source):