From fd1a0ea78b261f2ff90823f676f4515e32e4e8ae Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Wed, 23 Oct 2013 16:31:57 +0100 Subject: [PATCH 1/3] add !pil it links to the Programming in Lua manual for users who do not or plainly understand (the oddities) of Lua --- shortutils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shortutils.py b/shortutils.py index b98444b..b3e2cea 100644 --- a/shortutils.py +++ b/shortutils.py @@ -38,3 +38,13 @@ def next(phenny, input): phenny.say("Another satisfied customer. Next!") next.commands = ['next'] + +def pil(phenny, input): + """Lua Manual link""" + for x in phenny.bot.commands["high"].values(): + if x[0].__name__ == "aa_hook": + if x[0](phenny, input): + return + phenny.say("Someone thinks you need to brush up on or learn Lua, please go to: http://lua.org/pil/") + +pil.commands = ['pil'] From e6873e3f44e75c7bcf63303a27c896d2dfc70079 Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Wed, 23 Oct 2013 16:35:39 +0100 Subject: [PATCH 2/3] forgot something :P --- COMMANDS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/COMMANDS.md b/COMMANDS.md index ec13f42..5a7cd6f 100644 --- a/COMMANDS.md +++ b/COMMANDS.md @@ -91,4 +91,5 @@ Required arguments are enclosed in { and }, optional arguments are enclosed in \ !rtfm Give links to wiki and dev wiki Anyone !questions Link to ESR's "How to ask smart questions" Anyone !next Say: "Another satisfied customer. Next!" Anyone + !pil Say: "Someone thinks you need to brush up on or learn Lua, please go to: http://lua.org/pil/" Anyone From 610271364f7c4d5d7af7a550fbd27e35e38a3491 Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Wed, 23 Oct 2013 16:40:06 +0100 Subject: [PATCH 3/3] formatting fix --- COMMANDS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COMMANDS.md b/COMMANDS.md index 5a7cd6f..084d4a6 100644 --- a/COMMANDS.md +++ b/COMMANDS.md @@ -91,5 +91,5 @@ Required arguments are enclosed in { and }, optional arguments are enclosed in \ !rtfm Give links to wiki and dev wiki Anyone !questions Link to ESR's "How to ask smart questions" Anyone !next Say: "Another satisfied customer. Next!" Anyone - !pil Say: "Someone thinks you need to brush up on or learn Lua, please go to: http://lua.org/pil/" Anyone + !pil Say: "Link to: http://lua.org/pil/" Anyone