Small, inefficient (and maybe unnecessary) flood protection
This commit is contained in:
parent
cae753ec56
commit
a45bb6858e
@ -5,6 +5,7 @@
|
|||||||
import socket
|
import socket
|
||||||
import threading
|
import threading
|
||||||
from syncplay import utils
|
from syncplay import utils
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
class Bot(object):
|
class Bot(object):
|
||||||
def __init__(self, server='irc.rizon.net', serverPassword='', port=6667, nick='SyncBot', nickservPass='', channel='', channelPassword='', functions=[]):
|
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.sockSend('NICK ' + newnick)
|
||||||
self.nick = newnick
|
self.nick = newnick
|
||||||
def irc_onMsg(self, nickFrom, host, to, msg):
|
def irc_onMsg(self, nickFrom, host, to, msg):
|
||||||
|
sleep(0.5)
|
||||||
if to[0] == '#': #channel
|
if to[0] == '#': #channel
|
||||||
split = msg.split(' ')
|
split = msg.split(' ')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user