93 |
|
* lookup (USERHOST) to figure out what the clients' local IP |
94 |
|
* is. Useful for things like NAT, and dynamic dial-up users. |
95 |
|
*/ |
96 |
< |
/* |
97 |
< |
* If a lazyleaf relayed us this request, we don't know |
98 |
< |
* the clients real IP. |
99 |
< |
* So, if you're on a lazyleaf, and you send a userhost |
100 |
< |
* including your nick and the nick of someone not known to |
101 |
< |
* the leaf, you'll get your spoofed IP. tough. |
102 |
< |
*/ |
96 |
> |
/* |
97 |
> |
* If a lazyleaf relayed us this request, we don't know |
98 |
> |
* the clients real IP. |
99 |
> |
* So, if you're on a lazyleaf, and you send a userhost |
100 |
> |
* including your nick and the nick of someone not known to |
101 |
> |
* the leaf, you'll get your spoofed IP. tough. |
102 |
> |
*/ |
103 |
|
if (MyClient(target_p) && (target_p == source_p)) |
104 |
|
{ |
105 |
|
rl = ircsprintf(response, "%s%s=%c%s@%s ", |
109 |
|
target_p->username, |
110 |
|
target_p->sockhost); |
111 |
|
} |
112 |
< |
else |
112 |
> |
else |
113 |
|
{ |
114 |
|
rl = ircsprintf(response, "%s%s=%c%s@%s ", |
115 |
|
target_p->name, |
120 |
|
} |
121 |
|
|
122 |
|
if ((rl + cur_len) < (IRCD_BUFSIZE-10)) |
123 |
< |
{ |
124 |
< |
ircsprintf(t,"%s",response); |
125 |
< |
t += rl; |
126 |
< |
cur_len += rl; |
127 |
< |
} |
123 |
> |
{ |
124 |
> |
ircsprintf(t,"%s",response); |
125 |
> |
t += rl; |
126 |
> |
cur_len += rl; |
127 |
> |
} |
128 |
|
else |
129 |
|
break; |
130 |
|
} |
131 |
< |
else if ( !ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL) ) |
131 |
> |
else if ( !ServerInfo.hub && uplink && IsCapable(uplink, CAP_LL) ) |
132 |
> |
{ |
133 |
> |
t = buf; |
134 |
> |
for ( n = 0; n < 5; n++ ) |
135 |
> |
{ |
136 |
> |
if( parv[n+1] ) |
137 |
|
{ |
138 |
< |
t = buf; |
139 |
< |
for( n = 0; n < 5; n++ ) |
135 |
< |
{ |
136 |
< |
if( parv[n+1] ) |
137 |
< |
{ |
138 |
< |
rl = ircsprintf(t, "%s ", parv[n+1]); |
139 |
< |
t += rl; |
140 |
< |
} |
141 |
< |
else |
142 |
< |
break; |
143 |
< |
} |
144 |
< |
/* Relay upstream, and let hub reply */ |
145 |
< |
sendto_one(uplink, ":%s USERHOST %s", parv[0], buf ); |
146 |
< |
return; |
138 |
> |
rl = ircsprintf(t, "%s ", parv[n+1]); |
139 |
> |
t += rl; |
140 |
|
} |
141 |
+ |
else |
142 |
+ |
break; |
143 |
+ |
} |
144 |
+ |
/* Relay upstream, and let hub reply */ |
145 |
+ |
sendto_one(uplink, ":%s USERHOST %s", parv[0], buf ); |
146 |
+ |
return; |
147 |
|
} |
148 |
+ |
} |
149 |
|
|
150 |
|
sendto_one(source_p, "%s", buf); |
151 |
|
} |