From be293b018b3a113891284f682a503e0ae02b23bf Mon Sep 17 00:00:00 2001 From: "B.Greenham" Date: Mon, 22 Nov 2010 11:14:44 -0500 Subject: [PATCH] Don't segfault if someone tries to OACCEPT a server for some inane reason. --- extensions/m_oaccept.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/m_oaccept.c b/extensions/m_oaccept.c index f24012b..268d443 100644 --- a/extensions/m_oaccept.c +++ b/extensions/m_oaccept.c @@ -31,6 +31,13 @@ mo_oaccept(struct Client *client_p, struct Client *source_p, int parc, const cha 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); /* Provide a nice error message if you try to OACCEPT someone