170 self.__currentDataType = Connection.Undefined |
170 self.__currentDataType = Connection.Undefined |
171 self.__numBytesForCurrentDataType = 0 |
171 self.__numBytesForCurrentDataType = 0 |
172 self.__buffer.clear() |
172 self.__buffer.clear() |
173 |
173 |
174 if not self.isValid(): |
174 if not self.isValid(): |
|
175 self.abort() |
|
176 return |
|
177 |
|
178 bannedName = "{0}@{1}".format( |
|
179 user, |
|
180 self.peerAddress().toString() |
|
181 ) |
|
182 Preferences.syncPreferences() |
|
183 if bannedName in Preferences.getCooperation("BannedUsers"): |
|
184 self.rejected.emit( |
|
185 self.trUtf8("* Connection attempted by banned user '{0}'.")\ |
|
186 .format(bannedName)) |
175 self.abort() |
187 self.abort() |
176 return |
188 return |
177 |
189 |
178 if self.__serverPort != self.peerPort() and \ |
190 if self.__serverPort != self.peerPort() and \ |
179 not Preferences.getCooperation("AutoAcceptConnections"): |
191 not Preferences.getCooperation("AutoAcceptConnections"): |