diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/server/examplePlugin.py	Tue Jul 14 16:41:58 2009 -0500
@@ -0,0 +1,44 @@
+import os
+import sys
+from base_plugin import BasePluginClass
+
+class Plugin(BasePluginClass):
+    def __init__(self):
+        BasePluginClass.__init__(self)
+
+        self.Name = "examplePlugin"
+        self.File = __file__
+        self.Author = "Dj Gilcrease"
+        self.Help = "Help"
+        self.InputPriority = -1 # -1 = not used; 99 = priority doesn't matter
+                                # Any other number is priority, lowest number
+                                # executes first
+        self.OutputPriority = -1# -1 = not used; 99 = priority doesn't matter
+                                # Any other number is priority, lowest number
+                                # executes first
+        self.PollPriority = -1  # -1 = not used; 99 = priority doesn't matter
+                                # Any other number is priority, lowest number
+                                # executes first
+
+    def start(self):
+        #Do you DB connection here
+        pass
+
+    def stop(self):
+        #Close your DB connection here
+        pass
+
+    def preParseIncoming(self, xml_dom, data):
+        #Do something with the Data or Dom, and return it
+
+        return xml_dom, data
+
+    def postParseIncoming(self, data):
+        #Do something with the Data before it gets sent to the room
+
+        return data
+
+    def preParseOutgoing(self):
+        #Fetch messages from somewhere that need to be sent out
+
+        return []