comparison plugins/xxooc.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 d02e9197c066
comparison
equal deleted inserted replaced
-1:000000000000 0:4385a7d0efd1
1 import os
2 import orpg.pluginhandler
3
4 class Plugin(orpg.pluginhandler.PluginHandler):
5 # Initialization subroutine.
6 #
7 # !self : instance of self
8 # !chat : instance of the chat window to write to
9 def __init__(self, plugindb, parent):
10 orpg.pluginhandler.PluginHandler.__init__(self, plugindb, parent)
11
12 # The Following code should be edited to contain the proper information
13 self.name = 'OOC Comments Tool'
14 self.author = 'mDuo13'
15 self.help = "Type '/ooc *message*' to send '(( *message* ))' -- it just preformats\n"
16 self.help += "out of character comments for you."
17
18 def plugin_enabled(self):
19 #This is where you set any variables that need to be initalized when your plugin starts
20
21 self.plugin_addcommand('/ooc', self.on_ooc, 'message - This puts (( message )) to let other players know you are talking out of character')
22
23
24 def plugin_disabled(self):
25 #Here you need to remove any commands you added, and anything else you want to happen when you disable the plugin
26 #such as closing windows created by the plugin
27
28 self.plugin_removecmd('/ooc')
29
30 def on_ooc(self, cmdargs):
31 #this is just an example function for a command you create create your own
32 self.chat.ParsePost('(( ' + cmdargs + ' ))', 1, 1)