diff options
author | Matias <matiassw@gmail.com> | 2013-06-25 17:04:20 -0400 |
---|---|---|
committer | Matias <matiassw@gmail.com> | 2013-06-25 17:04:20 -0400 |
commit | 2c80baac08003c0ddb2df4db661dd631897c7cf2 (patch) | |
tree | 6f888c79ed27df35af905cad96ce51a0c972cd43 /src | |
parent | b40371d3a0772031d12f2782c10976413c6f34b9 (diff) | |
download | hercules-2c80baac08003c0ddb2df4db661dd631897c7cf2.tar.gz hercules-2c80baac08003c0ddb2df4db661dd631897c7cf2.tar.bz2 hercules-2c80baac08003c0ddb2df4db661dd631897c7cf2.tar.xz hercules-2c80baac08003c0ddb2df4db661dd631897c7cf2.zip |
Fixing an issue with "@channel ban" not allowing you to ban a character with a space after the first char of their name
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 14 |
1 files changed, 10 insertions, 4 deletions
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. |