Skip to content
Browse files

Really fix rate limiter logging

  • Loading branch information...
1 parent a8703c8 commit c56c24ff3c92202135ef3b3b30a96e46af8e8c3a Glen D Sanford committed Aug 14, 2012
View
2 src/main/scala/nu/glen/followbackbot/RateLimiter.scala
@@ -36,7 +36,7 @@ object RateLimiter {
class SimpleRateLimiter(resolution: Duration, maxValue: Int, size: Int)
extends RateLimiter with SimpleLogger
{
- override lazy val name = "RateLimit(%s/%s)".format(maxValue, resolution)
+ override lazy val name = "RateLimiter(%s/%s)".format(maxValue, resolution).replaceAll(".", "_")
private[this] val cache =
CacheBuilder.newBuilder.asInstanceOf[CacheBuilder[Long, AtomicInteger]]
View
2 src/main/scala/nu/glen/yourmombot/YourMomResponder.scala
@@ -3,9 +3,11 @@ package nu.glen.yourmombot
import nu.glen.followbackbot.{GerrundKeywordPrefixResponder, PastTenseKeywordPrefixResponder}
object YourMomGerrundResponder extends GerrundKeywordPrefixResponder {
+ override def name = "YourMomGerrundResponder"
override def combine(gerrund: String, rest: String) = "Your mom's %s%s".format(gerrund, rest)
}
object YourMomPastTenseResponder extends PastTenseKeywordPrefixResponder {
+ override def name = "YourMomPastTenseResponder"
override def combine(verb: String, rest: String) = "Your mom %s%s".format(verb, rest)
}

0 comments on commit c56c24f

Please sign in to comment.
Something went wrong with that request. Please try again.