Allow targeting people with !rtfm, !questions and !pil

master
Sfan5 2013-10-23 17:56:33 +02:00
parent 8bd87fa977
commit 20391c836e
2 changed files with 18 additions and 6 deletions

View File

@ -88,8 +88,8 @@ Required arguments are enclosed in { and }, optional arguments are enclosed in \
<tr> <td><b>devwiki.py</b></td> <td></td> <td></td> </tr>
<tr> <td>!dev {term}</td> <td>Query dev.minetest.net for term</td> <td>Anyone</td> </tr>
<tr> <td><b>shortutils.py</b></td> <td></td> <td></td> </tr>
<tr> <td>!rtfm</td> <td>Give links to wiki and dev wiki</td> <td>Anyone</td> </tr>
<tr> <td>!questions</td> <td>Link to ESR's "How to ask smart questions"</td> <td>Anyone</td> </tr>
<tr> <td>!rtfm [nick]</td> <td>Give links to wiki and dev wiki</td> <td>Anyone</td> </tr>
<tr> <td>!questions [nick]</td> <td>Link to ESR's "How to ask smart questions"</td> <td>Anyone</td> </tr>
<tr> <td>!next</td> <td>Say: "Another satisfied customer. Next!"</td> <td>Anyone</td> </tr>
<tr> <td>!pil</td> <td>Say: "Link to: http://lua.org/pil/"</td> <td>Anyone</td> </tr>
<tr> <td>!pil [nick]</td> <td>Link to Lua PIL</td> <td>Anyone</td> </tr>
</table>

View File

@ -15,7 +15,11 @@ def rtfm(phenny, input):
if x[0].__name__ == "aa_hook":
if x[0](phenny, input):
return
phenny.say("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. ")
if input.group(2).strip():
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. ")
rtfm.commands = ['rtfm']
@ -25,7 +29,11 @@ def questions(phenny, input):
if x[0].__name__ == "aa_hook":
if x[0](phenny, input):
return
phenny.say("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")
if input.group(2).strip():
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")
questions.commands = ['questions']
@ -45,6 +53,10 @@ def pil(phenny, input):
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/")
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 Lua, please go to: http://lua.org/pil/")
pil.commands = ['pil']