Skip to content
Browse files

Limitted chat to 20 lines

  • Loading branch information...
1 parent 41a6bb7 commit 842c523b88076f413d31c3aa18b5db6505c4ade2 @dpp dpp committed Jan 21, 2011
Showing with 5 additions and 2 deletions.
  1. +1 −1 project/build.properties
  2. +4 −1 src/main/scala/net/liftweb/seventhings/comet/Chat.scala
View
2 project/build.properties
@@ -1,7 +1,7 @@
#Project properties
#Fri Apr 23 11:24:20 PDT 2010
project.organization=Lift
-project.name=Lift SBT Template
+project.name=seventhings
sbt.version=0.7.4
project.version=0.1
def.scala.version=2.7.7
View
5 src/main/scala/net/liftweb/seventhings/comet/Chat.scala
@@ -38,6 +38,9 @@ object ChatServer extends LiftActor with ListenerManager {
// handle incoming messages
override def lowPriority = {
- case s: String => msgs :+= s; updateListeners()
+ case s: String => {
+ msgs = (msgs :+ s.trim).filter(_.length > 0).take(20)
+ updateListeners()
+ }
}
}

0 comments on commit 842c523

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