mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Support for Elixir configuration file #1208
Contribution for Google Summer of code 2016 by Gabriel Gatu
This commit is contained in:
parent
e6f7233351
commit
803270fc6b
28 changed files with 1914 additions and 12 deletions
31
test/elixir-config/shared/ejabberd.exs
Normal file
31
test/elixir-config/shared/ejabberd.exs
Normal file
|
@ -0,0 +1,31 @@
|
|||
defmodule Ejabberd.ConfigFile do
|
||||
use Ejabberd.Config
|
||||
|
||||
def start do
|
||||
[loglevel: 4,
|
||||
language: "en",
|
||||
hosts: ["localhost"],
|
||||
shaper: shaper]
|
||||
end
|
||||
|
||||
defp shaper do
|
||||
[normal: 1000,
|
||||
fast: 50000,
|
||||
max_fsm_queue: 1000]
|
||||
end
|
||||
|
||||
listen :ejabberd_c2s do
|
||||
@opts [
|
||||
port: 5222,
|
||||
max_stanza_size: 65536,
|
||||
shaper: :c2s_shaper,
|
||||
access: :c2s]
|
||||
end
|
||||
|
||||
module :mod_adhoc do
|
||||
end
|
||||
|
||||
hook :register_user, [host: "localhost"], fn(user, server) ->
|
||||
info("User registered: #{user} on #{server}")
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue