mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Example plugin helps.
This commit is contained in:
parent
2431ddb103
commit
4a7e2dba20
@ -54,6 +54,11 @@ class MyFilterProxy(object):
|
|||||||
self.s = s
|
self.s = s
|
||||||
|
|
||||||
class Filter(callbacks.Privmsg):
|
class Filter(callbacks.Privmsg):
|
||||||
|
"""This plugin offers several commands which transform text in some way.
|
||||||
|
It also provides the capability of using such commands to 'filter' the
|
||||||
|
output of the bot -- for instance, you could make everything the bot says
|
||||||
|
be in leetspeak, or morse code, or any number of other kinds of filters.
|
||||||
|
Not very useful, but definitely quite fun :)"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.outFilters = ircutils.IrcDict()
|
self.outFilters = ircutils.IrcDict()
|
||||||
callbacks.Privmsg.__init__(self)
|
callbacks.Privmsg.__init__(self)
|
||||||
|
@ -78,6 +78,8 @@ class WeatherCommand(registry.String):
|
|||||||
# Registry variables moved to the bottom to use Weather.weatherCommands.
|
# Registry variables moved to the bottom to use Weather.weatherCommands.
|
||||||
|
|
||||||
class Weather(callbacks.Privmsg):
|
class Weather(callbacks.Privmsg):
|
||||||
|
"""This should never be seen, because this plugin defines a command by
|
||||||
|
the name of 'weather' which should override this help."""
|
||||||
weatherCommands = ['ham', 'cnn', 'wunder']
|
weatherCommands = ['ham', 'cnn', 'wunder']
|
||||||
threaded = True
|
threaded = True
|
||||||
def callCommand(self, method, irc, msg, *L):
|
def callCommand(self, method, irc, msg, *L):
|
||||||
|
Loading…
Reference in New Issue
Block a user