| 133 |
|
send_message_remote(struct Client *to, struct Client *from, struct dbuf_block *buf) |
| 134 |
|
{ |
| 135 |
|
assert(MyConnect(to)); |
| 136 |
+ |
assert(!IsMe(to)); |
| 137 |
+ |
assert(to->from == to); |
| 138 |
|
|
| 139 |
< |
/* Optimize by checking if (from && to) before everything */ |
| 138 |
< |
/* we set to->from up there.. */ |
| 139 |
< |
|
| 140 |
< |
if (!MyClient(from) && IsClient(to) && (to == from->from)) |
| 139 |
> |
if (!MyConnect(from) && to == from->from) |
| 140 |
|
{ |
| 142 |
– |
if (IsServer(from)) |
| 143 |
– |
{ |
| 144 |
– |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
| 145 |
– |
"Send message to %s [%s] dropped from %s(Fake Dir)", |
| 146 |
– |
to->name, to->from->name, from->name); |
| 147 |
– |
return; |
| 148 |
– |
} |
| 149 |
– |
|
| 141 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
| 142 |
< |
"Ghosted: %s[%s@%s] from %s[%s@%s] (%s)", |
| 143 |
< |
to->name, to->username, to->host, |
| 153 |
< |
from->name, from->username, from->host, |
| 154 |
< |
to->from->name); |
| 155 |
< |
|
| 156 |
< |
sendto_server(NULL, NOCAPS, NOCAPS, |
| 157 |
< |
":%s KILL %s :%s (%s[%s@%s] Ghosted %s)", |
| 158 |
< |
me.id, to->id, me.name, to->name, |
| 159 |
< |
to->username, to->host, to->from->name); |
| 160 |
< |
|
| 161 |
< |
AddFlag(to, FLAGS_KILLED); |
| 162 |
< |
|
| 163 |
< |
if (IsClient(from)) |
| 164 |
< |
sendto_one_numeric(from, &me, ERR_GHOSTEDCLIENT, to->name, |
| 165 |
< |
to->username, to->host, to->from); |
| 166 |
< |
|
| 167 |
< |
exit_client(to, "Ghosted client"); |
| 142 |
> |
"Send message to %s dropped from %s (Fake Dir)", |
| 143 |
> |
to->name, from->name); |
| 144 |
|
return; |
| 145 |
|
} |
| 146 |
|
|