mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
The new /SET dcc_port range didn't work properly..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1795 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
50eae89a96
commit
20e26554cd
@ -193,7 +193,7 @@ void dcc_str2ip(const char *str, IPADDR *ip)
|
|||||||
GIOChannel *dcc_listen(GIOChannel *iface, IPADDR *ip, int *port)
|
GIOChannel *dcc_listen(GIOChannel *iface, IPADDR *ip, int *port)
|
||||||
{
|
{
|
||||||
GIOChannel *handle;
|
GIOChannel *handle;
|
||||||
const char *dcc_port;
|
const char *dcc_port, *p;
|
||||||
int first, last;
|
int first, last;
|
||||||
|
|
||||||
if (net_getsockname(iface, ip, NULL) == -1)
|
if (net_getsockname(iface, ip, NULL) == -1)
|
||||||
@ -209,8 +209,10 @@ GIOChannel *dcc_listen(GIOChannel *iface, IPADDR *ip, int *port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* get last port */
|
/* get last port */
|
||||||
dcc_port = strchr(dcc_port, ' ');
|
p = strchr(dcc_port, ' ');
|
||||||
if (dcc_port == NULL) dcc_port = strchr(dcc_port, '-');
|
if (p == NULL) p = strchr(dcc_port, '-');
|
||||||
|
|
||||||
|
dcc_port = p;
|
||||||
if (dcc_port == NULL)
|
if (dcc_port == NULL)
|
||||||
last = first;
|
last = first;
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user