| 15 |
|
* |
| 16 |
|
* You should have received a copy of the GNU General Public License |
| 17 |
|
* along with this program; if not, write to the Free Software |
| 18 |
< |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 18 |
> |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 |
| 19 |
|
* USA |
| 20 |
|
*/ |
| 21 |
|
|
| 130 |
|
me.id, lsender, me.name); |
| 131 |
|
} |
| 132 |
|
|
| 133 |
– |
/* cancel_clients() |
| 134 |
– |
* |
| 135 |
– |
* inputs - |
| 136 |
– |
* output - |
| 137 |
– |
* side effects - |
| 138 |
– |
*/ |
| 139 |
– |
static void |
| 140 |
– |
parse_cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd) |
| 141 |
– |
{ |
| 142 |
– |
if (IsServer(source_p) || IsMe(source_p)) |
| 143 |
– |
{ |
| 144 |
– |
sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE, |
| 145 |
– |
"Message for %s[%s] from %s", |
| 146 |
– |
source_p->name, source_p->from->name, |
| 147 |
– |
get_client_name(client_p, SHOW_IP)); |
| 148 |
– |
sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE, |
| 149 |
– |
"Message for %s[%s] from %s", |
| 150 |
– |
source_p->name, source_p->from->name, |
| 151 |
– |
get_client_name(client_p, MASK_IP)); |
| 152 |
– |
sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE, |
| 153 |
– |
"Not dropping server %s (%s) for Fake Direction", |
| 154 |
– |
client_p->name, source_p->name); |
| 155 |
– |
return; |
| 156 |
– |
} |
| 157 |
– |
|
| 158 |
– |
sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE, |
| 159 |
– |
"Message for %s[%s@%s!%s] from %s (TS, ignored)", |
| 160 |
– |
source_p->name, source_p->username, source_p->host, |
| 161 |
– |
source_p->from->name, get_client_name(client_p, SHOW_IP)); |
| 162 |
– |
sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE, |
| 163 |
– |
"Message for %s[%s@%s!%s] from %s (TS, ignored)", |
| 164 |
– |
source_p->name, source_p->username, source_p->host, |
| 165 |
– |
source_p->from->name, get_client_name(client_p, MASK_IP)); |
| 166 |
– |
} |
| 167 |
– |
|
| 133 |
|
/* |
| 134 |
|
* |
| 135 |
|
* parc number of arguments ('sender' counted as one!) |
| 201 |
|
} |
| 202 |
|
else |
| 203 |
|
sendto_channel_butone(source_p, source_p, chptr, 0, "%u %s %s", |
| 204 |
< |
numeric, chptr->chname, parv[2]); |
| 204 |
> |
numeric, chptr->name, parv[2]); |
| 205 |
|
} |
| 206 |
|
|
| 207 |
|
/* handle_command() |
| 250 |
|
if (IsDefunct(client_p)) |
| 251 |
|
return; |
| 252 |
|
|
| 253 |
< |
assert(client_p->localClient->fd.flags.open); |
| 253 |
> |
assert(client_p->connection->fd.flags.open); |
| 254 |
|
assert((bufend - pbuffer) < IRCD_BUFSIZE); |
| 255 |
|
|
| 256 |
|
for (ch = pbuffer; *ch == ' '; ++ch) /* Skip spaces */ |
| 262 |
|
* Copy the prefix to 'sender' assuming it terminates |
| 263 |
|
* with SPACE (or NULL, which is an error, though). |
| 264 |
|
*/ |
| 265 |
< |
const char *sender = ++ch; |
| 265 |
> |
const char *const sender = ++ch; |
| 266 |
|
|
| 267 |
|
if ((s = strchr(ch, ' '))) |
| 268 |
|
{ |
| 290 |
|
if (from->from != client_p) |
| 291 |
|
{ |
| 292 |
|
++ServerStats.is_wrdi; |
| 293 |
< |
parse_cancel_clients(client_p, from, pbuffer); |
| 293 |
> |
sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE, |
| 294 |
> |
"Fake direction: dropped message from %s[%s] via %s", |
| 295 |
> |
from->name, from->from->name, |
| 296 |
> |
get_client_name(client_p, SHOW_IP)); |
| 297 |
> |
sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE, |
| 298 |
> |
"Fake direction: dropped message fro %s[%s] via %s", |
| 299 |
> |
from->name, from->from->name, |
| 300 |
> |
get_client_name(client_p, MASK_IP)); |
| 301 |
|
return; |
| 302 |
|
} |
| 303 |
|
} |
| 332 |
|
} |
| 333 |
|
else |
| 334 |
|
{ |
| 335 |
< |
unsigned int ii = 0; |
| 335 |
> |
unsigned int length = 0; |
| 336 |
|
|
| 337 |
|
if ((s = strchr(ch, ' '))) |
| 338 |
|
*s++ = '\0'; |
| 361 |
|
assert(msg_ptr->cmd); |
| 362 |
|
|
| 363 |
|
paramcount = msg_ptr->args_max; |
| 364 |
< |
ii = bufend - ((s) ? s : ch); |
| 365 |
< |
msg_ptr->bytes += ii; |
| 364 |
> |
length = bufend - ((s) ? s : ch); |
| 365 |
> |
msg_ptr->bytes += length; |
| 366 |
|
} |
| 367 |
|
|
| 368 |
|
/* |
| 399 |
|
|
| 400 |
|
if (*s == ':') |
| 401 |
|
{ |
| 402 |
< |
/* The rest is a single parameter */ |
| 402 |
> |
/* The rest is single parameter--can include blanks also. */ |
| 403 |
|
para[++parc] = s + (!numeric); /* Keep the colon if it's a numeric */ |
| 404 |
|
break; |
| 405 |
|
} |
| 618 |
|
void |
| 619 |
|
report_messages(struct Client *source_p) |
| 620 |
|
{ |
| 621 |
< |
const struct MessageTree *mtree = &msg_tree; |
| 621 |
> |
const struct MessageTree *const mtree = &msg_tree; |
| 622 |
|
|
| 623 |
|
for (unsigned int i = 0; i < MAXPTRLEN; ++i) |
| 624 |
|
if (mtree->pointers[i]) |