aboutsummaryrefslogtreecommitdiffstats
path: root/README.org
diff options
context:
space:
mode:
authorjason2016-08-17 15:52:43 -0600
committerjason2016-08-17 15:52:43 -0600
commitb5322db38973661b08be27185420163291a1766a (patch)
tree91198f948756ad98c0cb09f1cb959d9dbfc2bf33 /README.org
parent1c123d6f199e1d0b88019d56a4bb1da082bdc79f (diff)
downloadwarmachine-ng-b5322db38973661b08be27185420163291a1766a.tar.gz
warmachine-ng-b5322db38973661b08be27185420163291a1766a.zip
Commit updates that i haven't commited yet
Diffstat (limited to 'README.org')
-rw-r--r--README.org12
1 files changed, 9 insertions, 3 deletions
diff --git a/README.org b/README.org
index 238e929..a968cbf 100644
--- a/README.org
+++ b/README.org
@@ -24,7 +24,7 @@ Simply run the command:
24* Writing a Connection 24* Writing a Connection
25To write a new connection protocol you must inherit from 25To write a new connection protocol you must inherit from
26~warmachine.connections.base.Connection~. This class defines an interface you 26~warmachine.connections.base.Connection~. This class defines an interface you
27must implement to support the plugins plugins. 27must implement to support the plugins.
28** ~__config_prefix__~ 28** ~__config_prefix__~
29This global is used to decide which connection to use when it is found in the 29This global is used to decide which connection to use when it is found in the
30config file. E.g. IRC uses ~'irc'~ and Slack uses ~'slack'~. It should be 30config file. E.g. IRC uses ~'irc'~ and Slack uses ~'slack'~. It should be
@@ -47,9 +47,12 @@ return value should be formatted in the following format:
47 'message': 'The message that was received', 47 'message': 'The message that was received',
48} 48}
49#+END_SRC 49#+END_SRC
50** ~say(message, destination)~
51This method is used by plugins to send a message to a channel or user.
50** ~id~ 52** ~id~
51This should return a unique id used to identify this particular connection. As 53This should return a unique id used to identify this particular connection. This
52an example, the IRC connection uses something like this: 54is used by plugins when saving state. As an example, the IRC connection uses
55something like this:
53 56
54#+BEGIN_SRC python 57#+BEGIN_SRC python
55@property 58@property
@@ -60,3 +63,6 @@ def id(self):
60 value = '{}-{}'.format(self.host, self.nick) 63 value = '{}-{}'.format(self.host, self.nick)
61 return md5(value.encode()).hexdigest() 64 return md5(value.encode()).hexdigest()
62#+END_SRC 65#+END_SRC
66** ~get_users_by_channel(channel)~
67This method should return a list of all users (including the bot) for the
68connection.