Don't segfault if someone tries to OACCEPT a server for some inane reason.

This commit is contained in:
B.Greenham 2010-11-22 11:14:44 -05:00
parent f5ed1007ba
commit be293b018b
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,13 @@ mo_oaccept(struct Client *client_p, struct Client *source_p, int parc, const cha
return 0; return 0;
} }
/* If we don't check for this, and some idiot tries to OACCEPT a server... */
if(!IsPerson(target_p))
{
sendto_one_notice(source_p, ":That is a server, not a user. What are you doing?");
return 0;
}
rb_snprintf(text, sizeof(text), "O%s", source_p->id); rb_snprintf(text, sizeof(text), "O%s", source_p->id);
/* Provide a nice error message if you try to OACCEPT someone /* Provide a nice error message if you try to OACCEPT someone