"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/core/m_kill.c" between
ircd-hybrid-8.2.27.tgz and ircd-hybrid-8.2.28.tgz

About: IRCD-Hybrid is a Internet Relay Chat server.

m_kill.c  (ircd-hybrid-8.2.27.tgz):m_kill.c  (ircd-hybrid-8.2.28.tgz)
skipping to change at line 24 skipping to change at line 24
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
*/ */
/*! \file m_kill.c /*! \file m_kill.c
* \brief Includes required functions for processing the KILL command. * \brief Includes required functions for processing the KILL command.
* \version $Id: m_kill.c 9102 2020-01-01 09:58:57Z michael $ * \version $Id: m_kill.c 9199 2020-01-23 17:49:06Z michael $
*/ */
#include "stdinc.h" #include "stdinc.h"
#include "list.h" #include "list.h"
#include "client.h" #include "client.h"
#include "hash.h" #include "hash.h"
#include "ircd.h" #include "ircd.h"
#include "numeric.h" #include "numeric.h"
#include "log.h" #include "log.h"
#include "server.h" #include "server.h"
skipping to change at line 75 skipping to change at line 75
char *reason = parv[2]; /* Either defined or NULL (parc >= 2!!) */ char *reason = parv[2]; /* Either defined or NULL (parc >= 2!!) */
if (!EmptyString(reason)) if (!EmptyString(reason))
{ {
if (strlen(reason) > (size_t)REASONLEN) if (strlen(reason) > (size_t)REASONLEN)
reason[REASONLEN] = '\0'; reason[REASONLEN] = '\0';
} }
else else
reason = def_reason; reason = def_reason;
struct Client *target_p; struct Client *target_p = hash_find_client(parv[1]);
if ((target_p = hash_find_client(parv[1])) == NULL) if (target_p == NULL)
{ {
/* /*
* If the user has recently changed nick, automatically * If the user has recently changed nick, automatically
* rewrite the KILL for this new nickname--this keeps * rewrite the KILL for this new nickname--this keeps
* servers in synch when nick change and kill collide * servers in synch when nick change and kill collide
*/ */
if ((target_p = whowas_get_history(parv[1], ConfigGeneral.kill_chase_time_li target_p = whowas_get_history(parv[1], ConfigGeneral.kill_chase_time_limit);
mit)) == NULL) if (target_p == NULL)
{ {
sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, parv[1]); sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, parv[1]);
return; return;
} }
sendto_one_notice(source_p, &me, ":KILL changed from %s to %s", sendto_one_notice(source_p, &me, ":KILL changed from %s to %s",
parv[1], target_p->name); parv[1], target_p->name);
} }
if (!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_KILL_REMOTE)) if (!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_KILL_REMOTE))
skipping to change at line 175 skipping to change at line 176
{ {
char buf[IRCD_BUFSIZE] = ""; char buf[IRCD_BUFSIZE] = "";
char def_reason[] = CONF_NOREASON; char def_reason[] = CONF_NOREASON;
if (parc < 3 || EmptyString(parv[2])) if (parc < 3 || EmptyString(parv[2]))
{ {
sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, "KILL"); sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, "KILL");
return; return;
} }
struct Client *target_p; struct Client *target_p = find_person(source_p, parv[1]);
if ((target_p = find_person(source_p, parv[1])) == NULL) if (target_p == NULL)
return; return;
char *reason = strchr(parv[2], ' '); char *reason = strchr(parv[2], ' ');
if (reason) if (reason)
*reason++ = '\0'; *reason++ = '\0';
else else
reason = def_reason; reason = def_reason;
if (IsServer(target_p) || IsMe(target_p)) if (IsServer(target_p) || IsMe(target_p))
{ {
skipping to change at line 274 skipping to change at line 275
} }
static void static void
module_exit(void) module_exit(void)
{ {
mod_del_cmd(&kill_msgtab); mod_del_cmd(&kill_msgtab);
} }
struct module module_entry = struct module module_entry =
{ {
.version = "$Revision: 9102 $", .version = "$Revision: 9199 $",
.modinit = module_init, .modinit = module_init,
.modexit = module_exit, .modexit = module_exit,
.is_core = true .is_core = true
}; };
 End of changes. 5 change blocks. 
8 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)