From d9e718d80e8abd0c25b4bc368d87f0dc02e1068f Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 27 Sep 2020 15:55:01 +0200 Subject: [PATCH] Start writing a FAQ for plugin developers. --- develop/faq.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 develop/faq.rst diff --git a/develop/faq.rst b/develop/faq.rst new file mode 100644 index 0000000..4041927 --- /dev/null +++ b/develop/faq.rst @@ -0,0 +1,26 @@ +.. _developer-faq: + +************************** +Frequently Asked Questions +************************** + +This section tries to cover all questions you may have as a plugin developer. +(If you are a user, check out the :ref:`User FAQ ` instead.) + + +Where can I find the user who called a command? +=============================================== + +The ``msg`` object passed to all event method as well as command methods is an +:py:class:`supybot.ircmsgs.IrcMsg` object, which stores the content of the +message, the nick and hostname of its author, etc. Check the documentation of +:py:class:`supybot.ircmsgs.IrcMsg` to see all available attributes.:w + + +Where can I find the hostname from a user's nick? +================================================= + +The ``irc`` object passed to all event method as well as command methods is an +:py:class:`supybot.irclib.Irc` object, use +:py:meth:`irc.state.nickToHostmask ` +