Hi, Dark Times - or others!
Again I have a little problem to be solved:
I can connect to every host specified in a dictionary and then I can send a message to the host.
But what I would like to do is to send a message to every host in my dictionary every lets say 5 minutes...
I tryed doing it with a timer but it only works for the last connected server - but the message is not sent to all connected servers, it is sent e.g. twice to the last server if I have 2 Server in mx Dictionary:
an other way I tried was:
but here it only connects to the last server - which is sounding quite logical because the program has an endless loop...
Again I have a little problem to be solved:
I can connect to every host specified in a dictionary and then I can send a message to the host.
But what I would like to do is to send a message to every host in my dictionary every lets say 5 minutes...
I tryed doing it with a timer but it only works for the last connected server - but the message is not sent to all connected servers, it is sent e.g. twice to the last server if I have 2 Server in mx Dictionary:
def timer_message():
for socket in sockets:
sendmessage('/msg Welcome'
timer = threading.Timer(300, timer_message)
timer.start()
an other way I tried was:
a=0
for socket in sockets:
if socket.Connected == True:
socket.SendP(Pyinsim.Packet(Pyinsim.ISP_ISI, Admin=Adminpass,
IName='^3app', ReqI=1))
while a == 0:
SendMessage('/unban ' + unbans)
time.sleep(300)
a = 0
but here it only connects to the last server - which is sounding quite logical because the program has an endless loop...