mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -05:00
TextArt: Add cacheColors config.
This commit is contained in:
parent
d131d966f3
commit
26066b55e6
@ -66,6 +66,10 @@ conf.registerChannelValue(
|
||||
registry.Boolean(False, _("""Turns on and off paste.ee support""")),
|
||||
)
|
||||
|
||||
conf.registerGlobalValue(
|
||||
TextArt, "cacheColors", registry.Boolean(True, _("""Cache color calculations""")),
|
||||
)
|
||||
|
||||
conf.registerChannelValue(
|
||||
TextArt,
|
||||
"showStats",
|
||||
|
@ -83,6 +83,7 @@ class TextArt(callbacks.Plugin):
|
||||
self.old_color = None
|
||||
self.source_colors = 0
|
||||
self.agents = self.registryValue("userAgents")
|
||||
self.matches = {}
|
||||
|
||||
def doPrivmsg(self, irc, msg):
|
||||
channel = msg.args[0]
|
||||
@ -798,8 +799,9 @@ class TextArt(callbacks.Plugin):
|
||||
image2 = image2.quantize(dither=None)
|
||||
image2 = image2.convert("RGB")
|
||||
colormap = np.array(image2)
|
||||
self.matches = {}
|
||||
self.labmatches = {}
|
||||
if not self.registryValue("cacheColors"):
|
||||
self.matches = {}
|
||||
# ascii image is a list of character strings
|
||||
aimg = []
|
||||
if type == "1/2":
|
||||
|
Loading…
x
Reference in New Issue
Block a user