IrcMiRCARTBot.py:_dispatchPrivmsg(): lower rate limit to once every 5 seconds (via aaa, alghazi, amomp, anji, arab, astra, astra`, biobag, biobag__, bj0rn, blomp, boomp, bromp, brr, butts, buttvomit, c003y, Caku, chomp, chrono_, cooey, CosbyX, darkmage_, dboard, deh uman, dOm3r, eddb, efukt, ep^, er, era, eraser, erratic, erratic_, gnomp, gromp, interdom3, JEWS, kobach, l1tup, Lions, lul, lulz, lulzee, lulzy, Matthew, MercyX, moomp, mr_vile, muff, munki, n0v, nk9k, ooomp, OVH, pcap, pinchy, plop, pngbot, poccri, poomp, promp, pump-, pu mpbull, pyrex, rain, rObOtNiK, rondito, scd, SEEEEN, Shapes, snadge, spidy, spinsane, spoke, spomp, stomp, TACO, tetedupet, toohighto, tromp, twomp, vap0r, vapor, venus, virtuald, vixen, whomp, wreathman, wromp, yoomp, z0z0, zen_, and zoomp.)

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-05-24 08:59:00 +02:00
parent 19b29d1714
commit 7011dc91dd

View File

@ -110,7 +110,7 @@ class IrcMiRCARTBot(IrcClient.IrcClient):
def _dispatchPrivmsg(self, message): def _dispatchPrivmsg(self, message):
if message[2].lower() == self.clientChannel.lower() \ if message[2].lower() == self.clientChannel.lower() \
and message[3].startswith("!pngbot "): and message[3].startswith("!pngbot "):
if (int(time.time()) - self.clientLastMessage) < 30: if (int(time.time()) - self.clientLastMessage) < 5:
self._log("Ignoring request on {} from {} due to rate limit: {}".format(message[2].lower(), message[0], message[3])) self._log("Ignoring request on {} from {} due to rate limit: {}".format(message[2].lower(), message[0], message[3]))
return return
elif message[0].split("!")[0].lower() not in self.clientChannelOps: elif message[0].split("!")[0].lower() not in self.clientChannelOps: