Lobby Website Chat

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 42
  1. #16
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Lobby Website Chat

    Quote Originally Posted by jur13n View Post
    You guys are acting worse then needed..
    Add a filter to it..

    Sent from my GT-I9070 using Tapatalk 2
    We will

  2. #17
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Lobby Website Chat

    Code:
    TCHAR g_szDB_LOBBY_CHAT[] = _T("{CALL spInsertLobbyChat ('%s', '%s')}");
    bool MMatchDBMgr::LobbyChat(const TCHAR* szName, const char* szMsg) 
    {
    	_STATUS_DB_START;
    	if(strstr(szName, ";")) return false;
    	if (!CheckOpen()) return false;
    
    	CString strSQL;
    
    	try {
    		strSQL.Format( g_szDB_LOBBY_CHAT, szName, szMsg );
    		m_DB.ExecuteSQL( strSQL );
    	} 
    	catch(CDBException* e) {
    
    		ExceptionHandler(strSQL, e);
    		return false;
    	}
    	_STATUS_DB_END(12);
    	return true;
    }
    Quote Originally Posted by Gunblade View Post
    Imagine what would happen if someone used a spambot on your lobby.
    Our full version that it won't print same message more than 2 times.

  3. #18
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Lobby Website Chat

    Quote Originally Posted by qet123 View Post
    Code:
    TCHAR g_szDB_LOBBY_CHAT[] = _T("{CALL spInsertLobbyChat ('%s', '%s')}");
    bool MMatchDBMgr::LobbyChat(const TCHAR* szName, const char* szMsg) 
    {
        _STATUS_DB_START;
        if(strstr(szName, ";")) return false;
        if (!CheckOpen()) return false;
    
        CString strSQL;
    
        try {
            strSQL.Format( g_szDB_LOBBY_CHAT, szName, szMsg );
            m_DB.ExecuteSQL( strSQL );
        } 
        catch(CDBException* e) {
    
            ExceptionHandler(strSQL, e);
            return false;
        }
        _STATUS_DB_END(12);
        return true;
    }


    Our full version that it won't print same message more than 2 times.
    Don't need the ";", I could still use the ' and launch a DoS attack by generating SQL errors.

  4. #19
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Lobby Website Chat

    Quote Originally Posted by Wizkidje View Post
    Don't need the ";", I could still use the ' and launch a DoS attack by generating SQL errors.
    I knew you gonna answer that, 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 ?

  5. #20
    Pee Aitch Pee Dave is offline
    MemberRank
    Mar 2011 Join Date
    The NetherlandsLocation
    722Posts

    Re: Lobby Website Chat

    Quote Originally Posted by Wizkidje View Post
    Don't need the ";", I could still use the ' and launch a DoS attack by generating SQL errors.
    You can still use it, if(strstr(szName, ";")) return false;
    szName.

    Anyway, you'll learn more of your mistakes if you actually find the solution yourself.

  6. #21
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Lobby Website Chat

    Quote Originally Posted by SuperWaffle View Post
    You can still use it, if(strstr(szName, ";")) return false;
    szName.

    Anyway, you'll learn more of your mistakes if you actually find the solution yourself.
    It won't enter the message if it gots ;

  7. #22
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Lobby Website Chat

    How about you actually fully integrate chat into website allow people to submit messages in lobby chat through the website.

  8. #23
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Lobby Website Chat

    Quote Originally Posted by qet123 View Post
    It won't enter the message if it gots ;
    Quote Originally Posted by SuperWaffle View Post
    You can still use it, if(strstr(szName, ";")) return false;
    szName.
    Are you serious?

    Quote Originally Posted by qet123 View Post
    I knew you gonna answer that
    No you didn't, you would of have changed your code if you did.

    Quote Originally Posted by qet123 View Post
    , 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 fuck 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.

  9. #24
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Lobby Website Chat

    Quote Originally Posted by Wizkidje View Post
    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. :/

    Quote Originally Posted by qet123 View Post
    It won't enter the message if it gots ;
    He'll enter random queries which /do not/ have ";" that would generate SQL errors.

  10. #25
    Developer / Patch Finder Tankado is offline
    MemberRank
    Oct 2011 Join Date
    The NetherlandsLocation
    451Posts

    Re: Lobby Website Chat

    ok, guys Qet/i know what we did wrong,
    we make mistakes but we leurn from it ,
    and it was a good idea :)

    - Tankado

  11. #26
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Lobby Website Chat

    Quote Originally Posted by Vusion View Post
    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.

  12. #27
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Lobby Website Chat

    Quote Originally Posted by Wizkidje View Post
    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.

  13. #28
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Lobby Website Chat

    Code:
    dwCurrentTime = timeGetTime();
    if (dwStartTime + 250 < dwCurrentTime)
    {	
    	dwStartTime = dwCurrentTime;
    	SpamLobby(GetCharUID(&MyUID), GetChannelUID(&ChannelUID), "Message");
    }

  14. #29
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Lobby Website Chat

    Quote Originally Posted by qet123 View Post
    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.

  15. #30
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Re: Lobby Website Chat

    250?

    /10char



Page 2 of 3 FirstFirst 123 LastLast

Advertisement