From 600ccdbd3e58b4b5f4af5d9659caa919c28f5ce8 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 26 Jan 2014 22:07:51 +0100 Subject: [PATCH] Document plugins' __init__() and die(). --- develop/events.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/develop/events.rst b/develop/events.rst index b66555b..4a4201f 100644 --- a/develop/events.rst +++ b/develop/events.rst @@ -15,6 +15,17 @@ In case multiple plugins implement the same special methods, the order they are called depends on the ``callAfter`` and ``callBefore`` (lists of plugin names) attributes of the plugins, if they are set. +Loading and unloading +===================== + +The ``__init__`` method gets called with an Irc object as a parameter +when a plugin is loaded (or has just been reloaded). +Make sure you always call the parent's ``__init__``. + +When a plugin is unloaded (or is to be reloaded), the ``die`` +method is called (with no parameter). +Also make sure you always call the parent's ``__init__``. + Commands and numerics =====================