diff --git a/DCC.py b/DCC.py index 042b8a8..85ca1ec 100644 --- a/DCC.py +++ b/DCC.py @@ -22,6 +22,7 @@ import re import socket import sys import time +import threading import traceback import message @@ -202,7 +203,7 @@ class DCC(server.Server): if self.realname in self.srv.dcc_clients: del self.srv.dcc_clients[self.realname] - print ("Close connection with", self.nick) + print ("Closing connection with", self.nick) self.stopping.set() #Rearm Thread threading.Thread.__init__(self) diff --git a/IRCServer.py b/IRCServer.py index 2ae85da..93d482d 100644 --- a/IRCServer.py +++ b/IRCServer.py @@ -194,7 +194,8 @@ class IRCServer(server.Server): def disconnect(self): """Close the socket with the server and all DCC client connections""" #Close all DCC connection - for clt in self.dcc_clients: + clts = [c for c in self.dcc_clients] + for clt in clts: self.dcc_clients[clt].disconnect() return server.Server.disconnect(self)