diff options
author | shennetsind <notind@gmail.com> | 2013-06-27 10:30:43 -0700 |
---|---|---|
committer | shennetsind <notind@gmail.com> | 2013-06-27 10:30:43 -0700 |
commit | f98484699e820d8a6cd2eb656244a9178b1ecc61 (patch) | |
tree | a01601e7398c20e5c77b2da5ef78100a79796394 | |
parent | b97cbaf1a988370cb8cadc3d0108c19d14593b94 (diff) | |
parent | 2c80baac08003c0ddb2df4db661dd631897c7cf2 (diff) | |
download | hercules-f98484699e820d8a6cd2eb656244a9178b1ecc61.tar.gz hercules-f98484699e820d8a6cd2eb656244a9178b1ecc61.tar.bz2 hercules-f98484699e820d8a6cd2eb656244a9178b1ecc61.tar.xz hercules-f98484699e820d8a6cd2eb656244a9178b1ecc61.zip |
Merge pull request #54 from MatiasSW/channelban
Channel banning characters with a space in their name
-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 13519c804..ae65d46b0 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. |