Prevent empty OOC name
This commit is contained in:
parent
27375ffa84
commit
6de72085af
@ -52,7 +52,6 @@ class Server : public QObject {
|
||||
void broadcast(AOPacket packet, int area_index);
|
||||
void broadcast(AOPacket packet);
|
||||
QString getServerName();
|
||||
QString getMOTD();
|
||||
int getDiceValue(QString value_type);
|
||||
int getCharID(QString char_name);
|
||||
|
||||
|
@ -174,7 +174,7 @@ void AOClient::pktOocChat(AreaData* area, int argc, QStringList argv, AOPacket p
|
||||
{
|
||||
ooc_name = dezalgo(argv[0]).replace(QRegExp("\\[|\\]|\\{|\\}|\\#|\\$|\\%|\\&"), ""); // no fucky wucky shit here
|
||||
|
||||
if (ooc_name == server->getServerName()) // impersonation prevention
|
||||
if (ooc_name == server->getServerName() || "") // impersonation & empty name protection
|
||||
return;
|
||||
|
||||
QString message = dezalgo(argv[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user