From 2c80baac08003c0ddb2df4db661dd631897c7cf2 Mon Sep 17 00:00:00 2001 From: Matias Date: Tue, 25 Jun 2013 17:04:20 -0400 Subject: Fixing an issue with "@channel ban" not allowing you to ban a character with a space after the first char of their name --- src/map/atcommand.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a1bc52924..224aede5a 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9045,11 +9045,17 @@ ACMD(channel) { return false; } - if( sub2[0] == '\0' || ( pl_sd = iMap->nick2sd(sub2) ) == NULL ) { - sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found - clif->message(fd, atcmd_output); - return false; + if (!message || !*message || sscanf(message, "%s %s %24[^\n]", key, sub1, sub2) < 1) { + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; } + + if( sub2[0] == '\0' || ( pl_sd = map_nick2sd(sub2) ) == NULL ) { + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; + } if( pc_has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) { clif->message(fd, msg_txt(1464)); // Ban failed, not possible to ban this user. -- cgit v1.2.3-70-g09d2