Lobby Website Chat

It won't enter the message if it gots ;
You can still use it, if(strstr(szName, ";")) return false;
szName.

Are you serious?

I knew you gonna answer that

No you didn't, you would of have changed your code if you did.

, all what I want is to develop gunz and making it active again, but you're making it harder for me and for others, Why you don't just release fixes and help each others ?

Because **** GunZ, that's why. Hence I've contributed more to GunZ than you ever have or ever will, so no point in going that way.
 
Don't need the ";", I could still use the ' and launch a DoS attack by generating SQL errors.

I'm probably gonna write an advanced spam filter for the chat since the current one is fucked up as it is. :/

It won't enter the message if it gots ;

He'll enter random queries which /do not/ have ";" that would generate SQL errors.
 
ok, guys Qet/i know what we did wrong,
we make mistakes but we leurn from it ,
and it was a good idea :)

- Tankado
 
I'm probably gonna write an advanced spam filter for the chat since the current one is fucked up as it is.

Been there with Goat ages ago, simply add a variable to MMatchObject holding the last time a chat was submitted (using timeGetTime() or similar), then check if the delay is at least 500 (1000 is default client). You should simply drop the message though, nothing more, considering people may spike and spam 3 messages at once due to 3 seconds of net inactivity.
 
Been there with Goat ages ago, simply add a variable to MMatchObject holding the last time a chat was submitted (using timeGetTime() or similar), then check if the delay is at least 500 (1000 is default client). You should simply drop the message though, nothing more, considering people may spike and spam 3 messages at once due to 3 seconds of net inactivity.

Was talking about something similar with SuperWaffle just before you posted that. I was gonna increment variable x which I'm going to declare and whenever x is divisible by 3, store timeGetTime() and whenever another's message is sent, if the difference between the time stored and the current time is less than 3000, throw a message.
 
Code:
dwCurrentTime = timeGetTime();
if (dwStartTime + 250 < dwCurrentTime)
{	
	dwStartTime = dwCurrentTime;
	SpamLobby(GetCharUID(&MyUID), GetChannelUID(&ChannelUID), "Message");
}

Great, you can apply the maths. Who can't, lmao. You've already shown you hardly can do anything on your own. Every release you've made or contributed to has to be flawed.
 
Was talking about something similar with SuperWaffle just before you posted that. I was gonna increment variable x which I'm going to declare and whenever x is divisible by 3, store timeGetTime() and whenever another's message is sent, if the difference between the time stored and the current time is less than 3000, throw a message.

Here's the checks I had on Goat, should cover most (if not all) of them. The latter part is to verify the same message isn't submitted 3 times in a row (PLS, ME NOOB BR, ME SWAP WIF U), even if they add spaces, alt codes or other bullshit at the end.

Code:
bool MMatchServer::OnChannelChat(struct MUID &uidChar, struct MUID &uidChannel, char *szMessage) {
    GoatObject *pGoatObj = GoatServer::getInstance()->getGoat(&uidChar);
    MMatchServer *pMMatchServer = MMatchServer::GetInstance();
    MMatchObject *pObject = pMMatchServer->GetObjectA(&uidChar);
    MMatchChannel *pChannel = pMMatchServer->FindChannel(uidChannel);

    if (pObject == NULL || pGoatObj == NULL || pChannel == NULL) {
        return false;
    }

    //GoatServer::checkTimeout(pGoatObj, pObject, NULL);
    
    if (pObject->m_AccountInfo.m_nPGrade == GOAT_PENALTY_CHAT || pObject->m_AccountInfo.m_nPGrade == GOAT_PENALTY_CHAT_AND_TAUNT) {
        Logging::writeObjectLog(pObject, "Has attempted to chat in channel [%u-%u] but his goat penalty is set to %i.", uidChannel.LowID, uidChannel.HighID, pObject->m_AccountInfo.m_nPGrade);
        GoatProtection::banHacker(pObject, "Penalty hacking.");
        return false;
    }

    if (pObject->m_nPlace != MMatchObject::CHANNEL) {
        Logging::writeObjectLog(pObject, "Has attempted to chat in channel [%u-%u] but MMatchPlace is set to %i.", uidChannel.LowID, uidChannel.HighID, pObject->m_nPlace);
        GoatProtection::banHacker(pObject, "Channel spamming.");
        return false;
    }

    if (pObject->m_ChannelInfo.m_uidChannel.HighID != uidChannel.HighID) {
        Logging::writeObjectLog(pObject, "Has attempted to channel chat in channel [%u-%u] while he is at channel [%u-%u].", uidChannel.LowID, uidChannel.HighID, pObject->m_ChannelInfo.m_uidChannel.LowID, pObject->m_ChannelInfo.m_uidChannel.HighID);
        GoatProtection::banHacker(pObject, "Channel spamming.");
        return false;
    }
        
    DWORD dwTime = GetTickCount();
        
    if (pGoatObj->m_dwLastChat > (dwTime - 500)) {
        Logging::writeObjectLog(pObject, "Has posted a channel message %u milliseconds after his previous!", (dwTime - pGoatObj->m_dwLastChat));
        pMMatchServer->DisconnectObject(uidChar); //Lucky guy, I'd be better off banning him.
        return false;
    }

    if (pGoatObj->m_dwLastChat != NULL && strncmp(pGoatObj->m_szLastChat, szMessage, strlen(pGoatObj->m_szLastChat)) == 0 && ++pGoatObj->m_nSpamCount >= 3) {
        Logging::writeObjectLog(pObject, "Has posted the same channel chat message three times in a row. Message: %s", szMessage);
        GoatServer::popupPlayer(pObject, "That looks like spam. Your connection to the gameserver will be terminated within 3 seconds.");
        pObject->disconnect(3);
        return false;
    }

    //Logging::writeChannelLog(pObject, pChannel, szMessage);
    strncpy_s(pGoatObj->m_szLastChat, szMessage, 128);
    pGoatObj->m_dwLastChat = dwTime;
    return true;
}
 
Wish Q, you do know Wiz has been deving for probably longer than you have been alive. Stop with the spam ****, it's annoying me.
As for this script, qet coded it, ofc theres gonna be errors <3 Joe

Talking about errors? Gunz is the biggest error.
I can't find any errors in my source, when I code something I code it without thinking about hackers becaue i don't understand a **** about sql and ****. Anyway it was my first coded **** connected with website and i excpect bugs, but you guys making it harder for me lol.
 
Talking about errors? Gunz is the biggest error.
I can't find any errors in my source, when I code something I code it without thinking about hackers becaue i don't understand a **** about sql and ****. Anyway it was my first coded **** connected with website and i excpect bugs, but you guys making it harder for me lol.

This being the first thing you coded connected with website is irrelevant to the fact that you left SQLi open.
 
CSCommonE.lib(MMatchServer_Channel.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall MMatchDBMgr::LobbyChat(char const *,char const *)" (?LobbyChat@MMatchDBMgr@@QAE_NPBD0@Z) referenced in function "protected: bool __thiscall MMatchServer::ChannelChat(struct MUID const &,struct MUID const &,char *)" (?ChannelChat@MMatchServer@@IAE_NABUMUID@@0PAD@Z)
Runtime/theduel.exe : fatal error LNK1120: 1 unresolved externals

Why?.
 
Talking about errors? Gunz is the biggest error.

The biggest error is working on something you call the biggest error. For real, if you like GunZ, admit it, if you hate it, you're in denial.

And, as usual, a copy/pasted snippet from MSDN would suffice.
 
Back