| 175 |
|
else |
| 176 |
|
target_p = find_person(source_p, parv[1]); |
| 177 |
|
|
| 178 |
< |
if (((!target_p) || (target_p->from == source_p->from)) && !chptr) |
| 178 |
> |
if ((!target_p || target_p->from == source_p->from) && !chptr) |
| 179 |
|
return; |
| 180 |
|
|
| 181 |
|
/* |
| 215 |
|
* side effects - |
| 216 |
|
*/ |
| 217 |
|
static void |
| 218 |
< |
parse_handle_command(struct Message *mptr, struct Client *source_p, |
| 218 |
> |
parse_handle_command(struct Message *message, struct Client *source_p, |
| 219 |
|
unsigned int i, char *para[]) |
| 220 |
|
{ |
| 221 |
|
if (IsServer(source_p->from)) |
| 222 |
< |
++mptr->rcount; |
| 222 |
> |
++message->rcount; |
| 223 |
|
|
| 224 |
< |
++mptr->count; |
| 224 |
> |
++message->count; |
| 225 |
|
|
| 226 |
|
/* Check right amount of parameters is passed... --is */ |
| 227 |
< |
if (i < mptr->args_min) |
| 228 |
< |
sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, mptr->cmd); |
| 227 |
> |
if (i < message->args_min) |
| 228 |
> |
sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, message->cmd); |
| 229 |
|
else |
| 230 |
< |
mptr->handlers[source_p->from->handler](source_p, i, para); |
| 230 |
> |
message->handlers[source_p->from->handler](source_p, i, para); |
| 231 |
|
} |
| 232 |
|
|
| 233 |
|
/* |
| 239 |
|
parse(struct Client *client_p, char *pbuffer, char *bufend) |
| 240 |
|
{ |
| 241 |
|
struct Client *from = client_p; |
| 242 |
< |
struct Message *msg_ptr = NULL; |
| 242 |
> |
struct Message *message = NULL; |
| 243 |
|
char *para[MAXPARA + 2]; /* <command> + <parameters> + NULL */ |
| 244 |
|
char *ch = NULL; |
| 245 |
|
char *s = NULL; |
| 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", |
| 298 |
> |
"Fake direction: dropped message from %s[%s] via %s", |
| 299 |
|
from->name, from->from->name, |
| 300 |
|
get_client_name(client_p, MASK_IP)); |
| 301 |
|
return; |
| 337 |
|
if ((s = strchr(ch, ' '))) |
| 338 |
|
*s++ = '\0'; |
| 339 |
|
|
| 340 |
< |
if ((msg_ptr = find_command(ch)) == NULL) |
| 340 |
> |
if ((message = find_command(ch)) == NULL) |
| 341 |
|
{ |
| 342 |
|
/* |
| 343 |
|
* Note: Give error message *only* to recognized |
| 358 |
|
return; |
| 359 |
|
} |
| 360 |
|
|
| 361 |
< |
assert(msg_ptr->cmd); |
| 361 |
> |
assert(message->cmd); |
| 362 |
|
|
| 363 |
< |
paramcount = msg_ptr->args_max; |
| 363 |
> |
paramcount = message->args_max; |
| 364 |
|
length = bufend - ((s) ? s : ch); |
| 365 |
< |
msg_ptr->bytes += length; |
| 365 |
> |
message->bytes += length; |
| 366 |
|
} |
| 367 |
|
|
| 368 |
|
/* |
| 376 |
|
|
| 377 |
|
para[parc] = ch; |
| 378 |
|
|
| 379 |
< |
if (msg_ptr && (msg_ptr->flags & MFLG_EXTRA)) |
| 379 |
> |
if (message && (message->flags & MFLG_EXTRA)) |
| 380 |
|
{ |
| 381 |
|
/* |
| 382 |
|
* XXX: This will have to go away after the command handler rewrite |
| 383 |
|
*/ |
| 384 |
< |
para[++parc] = msg_ptr->extra; |
| 384 |
> |
para[++parc] = message->extra; |
| 385 |
|
} |
| 386 |
|
|
| 387 |
|
if (s) |
| 416 |
|
|
| 417 |
|
para[++parc] = NULL; |
| 418 |
|
|
| 419 |
< |
if (msg_ptr) |
| 420 |
< |
parse_handle_command(msg_ptr, from, parc, para); |
| 419 |
> |
if (message) |
| 420 |
> |
parse_handle_command(message, from, parc, para); |
| 421 |
|
else |
| 422 |
|
parse_handle_numeric(numeric, from, parc, para); |
| 423 |
|
} |