Created
March 6, 2016 18:32
-
-
Save vito-c/6508919ff23586e93fb3 to your computer and use it in GitHub Desktop.
much case very none
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Knocker extends Actor with ActorLogging { | |
import scala.concurrent.ExecutionContext.Implicits.global | |
def receive: Receive = { | |
case imsg:IMessage => | |
KnockKnock(imsg) match { | |
case Some(knock) => | |
knock.target match { | |
case Some(nick) => | |
V2D2.nickMap onSuccess { | |
case nm => | |
nm get (nick.trim) match { | |
case Some(user) => | |
context.parent ! s"Knock, knock @${nick}!" | |
case _ => | |
context.parent ! s"Nice try silly human." | |
} | |
} | |
case _ => None | |
} | |
case _ => None | |
} | |
case _ => None | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment