mirror of
https://github.com/progval/Limnoria.git
synced 2025-05-02 00:11:04 -05:00
Removed set and unset, since they're not used at all by anyone.
This commit is contained in:
parent
a61b5b8dca
commit
d33c5333c5
@ -1,3 +1,5 @@
|
|||||||
|
* Removed Owner.{set,unset} since they matter not.
|
||||||
|
|
||||||
* Made the smileys and frowns configurable in ChannelDB.
|
* Made the smileys and frowns configurable in ChannelDB.
|
||||||
|
|
||||||
* Added an INVITE handler in Admin, allowing users with the admin
|
* Added an INVITE handler in Admin, allowing users with the admin
|
||||||
|
23
src/Owner.py
23
src/Owner.py
@ -348,29 +348,6 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
else:
|
else:
|
||||||
irc.reply('%s collected.' % utils.nItems('object', collected))
|
irc.reply('%s collected.' % utils.nItems('object', collected))
|
||||||
|
|
||||||
def set(self, irc, msg, args):
|
|
||||||
"""<name> <value>
|
|
||||||
|
|
||||||
Sets the runtime variable <name> to <value>. Currently used variables
|
|
||||||
include "noflush" which, if set to true value, will prevent the
|
|
||||||
periodic flushing that normally occurs.
|
|
||||||
"""
|
|
||||||
(name, value) = privmsgs.getArgs(args, optional=1)
|
|
||||||
world.tempvars[name] = value
|
|
||||||
irc.replySuccess()
|
|
||||||
|
|
||||||
def unset(self, irc, msg, args):
|
|
||||||
"""<name>
|
|
||||||
|
|
||||||
Unsets the value of variables set via the 'set' command.
|
|
||||||
"""
|
|
||||||
name = privmsgs.getArgs(args)
|
|
||||||
try:
|
|
||||||
del world.tempvars[name]
|
|
||||||
irc.replySuccess()
|
|
||||||
except KeyError:
|
|
||||||
irc.error('That variable wasn\'t set.')
|
|
||||||
|
|
||||||
def load(self, irc, msg, args):
|
def load(self, irc, msg, args):
|
||||||
"""<plugin>
|
"""<plugin>
|
||||||
|
|
||||||
|
@ -83,13 +83,6 @@ class OwnerTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
def testUpkeep(self):
|
def testUpkeep(self):
|
||||||
self.assertNotError('upkeep')
|
self.assertNotError('upkeep')
|
||||||
|
|
||||||
def testSetUnset(self):
|
|
||||||
self.assertNotError('set foo bar')
|
|
||||||
self.failUnless(world.tempvars['foo'] == 'bar')
|
|
||||||
self.assertNotError('unset foo')
|
|
||||||
self.failIf('foo' in world.tempvars)
|
|
||||||
self.assertError('unset foo')
|
|
||||||
|
|
||||||
def testLoad(self):
|
def testLoad(self):
|
||||||
self.assertError('load Owner')
|
self.assertError('load Owner')
|
||||||
self.assertError('load owner')
|
self.assertError('load owner')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user