random wait message support

This commit is contained in:
Gordon Shumway 2019-04-17 20:55:54 -04:00 committed by GitHub
parent 0da55ec470
commit cb73e0737f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -23,6 +23,7 @@ import re
import pexpect
import urllib
import time
import random as random
try:
from supybot.i18n import PluginInternationalization
@ -324,7 +325,8 @@ class ASCII(callbacks.Plugin):
os.remove(filename)
except:
pass
waitmsg = self.registryValue('waitMessage', msg.args[0])
waitmsgs = self.registryValue("randWait", msg.args[0])
waitmsg = random.choice(waitmsgs)
irc.reply(waitmsg)
# store dimensions
W, H = image.size[0], image.size[1]
@ -447,7 +449,8 @@ class ASCII(callbacks.Plugin):
os.remove(filename)
except:
pass
waitmsg = self.registryValue('waitMessage', msg.args[0])
waitmsgs = self.registryValue("randWait", msg.args[0])
waitmsg = random.choice(waitmsgs)
irc.reply(waitmsg)
# store dimensions
W, H = image.size[0], image.size[1]