summaryrefslogtreecommitdiff
path: root/lib/nickserver/dispatcher.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-08-29 11:59:54 +0200
committerAzul <azul@riseup.net>2016-08-29 12:03:16 +0200
commit0784391a21b75ca52892e992a614b0f927ade00e (patch)
tree4efa7445db3a0521a14d75e626d64f85434a3ea5 /lib/nickserver/dispatcher.rb
parent55006b3ce5967fde08081bfd56d56f76dbaf7c53 (diff)
refactor: split EmailHandler in 3
InvalidEmailHandler - handle emails with an invalid format LocalEmailHandler - handle emails on the local domain EmailHandler - handle all other emails by using hkp This is a preparation to add leap provider email lookup and remove hkp eventually. But for now we keep the behaviour the same and only refactor.
Diffstat (limited to 'lib/nickserver/dispatcher.rb')
-rw-r--r--lib/nickserver/dispatcher.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/nickserver/dispatcher.rb b/lib/nickserver/dispatcher.rb
index 833a2ad..8bcfd05 100644
--- a/lib/nickserver/dispatcher.rb
+++ b/lib/nickserver/dispatcher.rb
@@ -14,6 +14,8 @@
#
require 'nickserver/request'
+require 'nickserver/request_handlers/invalid_email_handler'
+require 'nickserver/request_handlers/local_email_handler'
require 'nickserver/request_handlers/email_handler'
require 'nickserver/request_handlers/fingerprint_handler'
@@ -45,6 +47,8 @@ module Nickserver
def handler_chain
[
+ RequestHandlers::InvalidEmailHandler.new,
+ RequestHandlers::LocalEmailHandler.new,
RequestHandlers::EmailHandler.new,
RequestHandlers::FingerprintHandler.new,
Proc.new { Nickserver::Response.new(404, "Not Found\n") }