… | |
… | |
248 | } |
248 | } |
249 | |
249 | |
250 | client * |
250 | client * |
251 | client::create (int fd, const char *peername) |
251 | client::create (int fd, const char *peername) |
252 | { |
252 | { |
253 | if (checkbanned (NULL, peername)) |
|
|
254 | { |
|
|
255 | LOG (llevInfo, "Banned host tried to connect: [%s]\n", peername); |
|
|
256 | return 0; |
|
|
257 | } |
|
|
258 | else |
|
|
259 | { |
|
|
260 | client *ns = new client (dup (fd), peername); |
253 | client *ns = new client (dup (fd), peername); |
261 | |
|
|
262 | ns->instantiate (); // effectively a nop right now |
254 | ns->instantiate (); // effectively a nop right now |
263 | |
|
|
264 | INVOKE_CLIENT (CONNECT, ns); |
255 | INVOKE_CLIENT (CONNECT, ns); |
265 | |
|
|
266 | return ns; |
256 | return ns; |
267 | } |
|
|
268 | } |
257 | } |
269 | |
258 | |