From 957c1f850644e6bd2ba918fcc9755b843669bc1f Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Wed, 23 Oct 2013 17:11:52 +0100 Subject: [PATCH 1/3] add !git [nick] --- COMMANDS.md | 1 + shortutils.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/COMMANDS.md b/COMMANDS.md index e253ff5..3cc25e4 100644 --- a/COMMANDS.md +++ b/COMMANDS.md @@ -92,4 +92,5 @@ Required arguments are enclosed in { and }, optional arguments are enclosed in \ !questions [nick] Link to ESR's "How to ask smart questions" Anyone !next Say: "Another satisfied customer. Next!" Anyone !pil [nick] Link to Lua PIL Anyone + !git [nick] Link to Git manual Anyone diff --git a/shortutils.py b/shortutils.py index a475bfc..9f93dda 100644 --- a/shortutils.py +++ b/shortutils.py @@ -60,3 +60,17 @@ def pil(phenny, input): phenny.say(u + "Someone thinks you need to brush up on or learn Lua, please go to: http://lua.org/pil/") pil.commands = ['pil'] + +def git(phenny, input): + """Git Manual link""" + for x in phenny.bot.commands["high"].values(): + if x[0].__name__ == "aa_hook": + if x[0](phenny, input): + return + if input.group(2).strip(): + u = input.group(2).strip() + ", " + else: + u = "" + phenny.say(u + "Someone thinks you need to brush up on or learn Git, please go to: http://git-scm.com/book/") + +git.commands = ['git'] \ No newline at end of file From fd7174161f23d2ac6f54c0732b1eda7959fbf8f1 Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Wed, 23 Oct 2013 17:27:18 +0100 Subject: [PATCH 2/3] fix typos --- shortutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shortutils.py b/shortutils.py index 9f93dda..577e582 100644 --- a/shortutils.py +++ b/shortutils.py @@ -57,7 +57,7 @@ def pil(phenny, input): u = input.group(2).strip() + ", " else: u = "" - phenny.say(u + "Someone thinks you need to brush up on or learn Lua, please go to: http://lua.org/pil/") + phenny.say(u + "someone thinks you need to brush up on or learn Lua, please go to: http://lua.org/pil/") pil.commands = ['pil'] @@ -71,6 +71,6 @@ def git(phenny, input): u = input.group(2).strip() + ", " else: u = "" - phenny.say(u + "Someone thinks you need to brush up on or learn Git, please go to: http://git-scm.com/book/") + phenny.say(u + "someone thinks you need to brush up on or learn Git, please go to: http://git-scm.com/book/") git.commands = ['git'] \ No newline at end of file From c0b95a148b3445e23612b233447b2f1d40d7bd30 Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Wed, 23 Oct 2013 17:28:44 +0100 Subject: [PATCH 3/3] fix typos and make !rtfm consistent with the others --- shortutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shortutils.py b/shortutils.py index 577e582..523ab0f 100644 --- a/shortutils.py +++ b/shortutils.py @@ -19,7 +19,7 @@ def rtfm(phenny, input): u = input.group(2).strip() + ", " else: u = "" - phenny.say(u + "Somebody thinks you should read the manual. The wiki for dev related questions is at http://dev.minetest.net , the regular wiki is at http://wiki.minetest.net. ") + phenny.say(u + "someone thinks you should read the manual. The wiki for dev related questions is at http://dev.minetest.net , the regular wiki is at http://wiki.minetest.net. ") rtfm.commands = ['rtfm'] @@ -33,7 +33,7 @@ def questions(phenny, input): u = input.group(2).strip() + ", " else: u = "" - phenny.say(u + "Someone thinks that your question is inaccurate or doesn't follow the guidelines. Read here how to make it right: http://catb.org/~esr/faqs/smart-questions.html") + phenny.say(u + "someone thinks that your question is inaccurate or doesn't follow the guidelines. Read here how to make it right: http://catb.org/~esr/faqs/smart-questions.html") questions.commands = ['questions']