comparison plugins/server/examplePlugin.py @ 0:4385a7d0efd1 grumpy-goblin

Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
author sirebral
date Tue, 14 Jul 2009 16:41:58 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4385a7d0efd1
1 import os
2 import sys
3 from base_plugin import BasePluginClass
4
5 class Plugin(BasePluginClass):
6 def __init__(self):
7 BasePluginClass.__init__(self)
8
9 self.Name = "examplePlugin"
10 self.File = __file__
11 self.Author = "Dj Gilcrease"
12 self.Help = "Help"
13 self.InputPriority = -1 # -1 = not used; 99 = priority doesn't matter
14 # Any other number is priority, lowest number
15 # executes first
16 self.OutputPriority = -1# -1 = not used; 99 = priority doesn't matter
17 # Any other number is priority, lowest number
18 # executes first
19 self.PollPriority = -1 # -1 = not used; 99 = priority doesn't matter
20 # Any other number is priority, lowest number
21 # executes first
22
23 def start(self):
24 #Do you DB connection here
25 pass
26
27 def stop(self):
28 #Close your DB connection here
29 pass
30
31 def preParseIncoming(self, xml_dom, data):
32 #Do something with the Data or Dom, and return it
33
34 return xml_dom, data
35
36 def postParseIncoming(self, data):
37 #Do something with the Data before it gets sent to the room
38
39 return data
40
41 def preParseOutgoing(self):
42 #Fetch messages from somewhere that need to be sent out
43
44 return []