From a45bb6858e057e55927235a2048a436fdcf11b03 Mon Sep 17 00:00:00 2001 From: HarHar Date: Thu, 24 Jan 2013 19:21:46 -0200 Subject: [PATCH] Small, inefficient (and maybe unnecessary) flood protection --- syncplay/ircBot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syncplay/ircBot.py b/syncplay/ircBot.py index 6b15e8b..4ea5e53 100644 --- a/syncplay/ircBot.py +++ b/syncplay/ircBot.py @@ -5,6 +5,7 @@ import socket import threading from syncplay import utils +from time import sleep class Bot(object): def __init__(self, server='irc.rizon.net', serverPassword='', port=6667, nick='SyncBot', nickservPass='', channel='', channelPassword='', functions=[]): @@ -85,6 +86,7 @@ class Bot(object): self.sockSend('NICK ' + newnick) self.nick = newnick def irc_onMsg(self, nickFrom, host, to, msg): + sleep(0.5) if to[0] == '#': #channel split = msg.split(' ')