From 580e7be1a6280fa76c25386fc94975a57e74fe07 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 8 Aug 2006 12:51:52 +0000 Subject: Dont try and write to a user after theyve parted git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@4785 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_remove.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules/m_remove.cpp') diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 22d2945b6..d6c3314ad 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -126,9 +126,10 @@ class cmd_remove : public command_t /* For now, we'll let everyone remove their level and below, eg ops can remove ops, halfops, voices, and those with no mode (no moders actually are set to 1) */ if ((ulevel >= tlevel && tlevel != 5) && (!Srv->IsUlined(target->server))) { - Srv->PartUserFromChannel(target,std::string(parameters[1]), "Removed by "+std::string(user->nick)+":"+result); Srv->SendTo(NULL,user,"NOTICE "+std::string(channel->name)+" : "+std::string(user->nick)+" removed "+std::string(target->nick)+ " from the channel"); Srv->SendTo(NULL,target,"NOTICE "+std::string(target->nick)+" :*** "+std::string(user->nick)+" removed you from "+std::string(channel->name)+" with the message:"+std::string(result)); + /* Fix by brain: If the user removes themselves, theres nobody to send those notices to, so this must come last! */ + Srv->PartUserFromChannel(target,std::string(parameters[1]), "Removed by "+std::string(user->nick)+":"+result); } else { -- cgit v1.3.1-10-gc9f91