Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ++ b/src/server/authserver/Main.cpp
- @@ -33,6 +33,10 @@
- #include "RealmList.h"
- #include "RealmAcceptor.h"
- #include <ace/Event_Handler.h>
- #include <ace/Time_Value.h>
- #include "AuthSocket.h"
- #ifndef _TRINITY_REALM_CONFIG
- # define _TRINITY_REALM_CONFIG "authserver.conf"
- #endif
- @@ -60,6 +64,21 @@ public:
- }
- };
- class LauncherTimer : public ACE_Event_Handler
- {
- public:
- int handle_timeout(const ACE_Time_Value &CurrentTime, const void *ACT = NULL)
- {
- LauncherChecker::IpSet Ips = sLauncherChecker->GetIpList();
- for(LauncherChecker::IpSet::const_iterator itr = Ips.begin(); itr != Ips.end(); ++itr)
- {
- if((*itr)->AddTime < (time(NULL) - 30)) // 1/2 minute
- sLauncherChecker->DeleteIp((*itr)->Ip);
- }
- return 0;
- }
- };
- /// Print out the usage string for this program on the console.
- void usage(const char *prog)
- {
Add Comment
Please, Sign In to add comment