Do not use regex for chat bot bans.

This commit is contained in:
lotodore
2010-07-14 17:55:49 +00:00
parent 6c997ca21a
commit b4d02f4cb0
3 changed files with 35 additions and 5 deletions
+2
View File
@@ -34,6 +34,7 @@ public:
ServerBanManager(boost::shared_ptr<boost::asio::io_service> ioService);
virtual ~ServerBanManager();
void BanPlayerName(const std::string &playerName, unsigned durationHours = 0);
void BanPlayerRegex(const std::string &playerRegex, unsigned durationHours = 0);
void BanIPAddress(const std::string &ipAddress, unsigned durationHours);
bool UnBan(unsigned banId);
@@ -47,6 +48,7 @@ protected:
struct TimedPlayerBan
{
boost::shared_ptr<boost::asio::deadline_timer> timer;
std::string nameStr;
boost::regex nameRegex;
};
struct TimedIPBan