46 end |
46 end |
47 |
47 |
48 eventmanager.add_event_hook("server-starting", load_enabled_hosts); |
48 eventmanager.add_event_hook("server-starting", load_enabled_hosts); |
49 |
49 |
50 function activate(host, host_config) |
50 function activate(host, host_config) |
51 hosts[host] = {type = "local", connected = true, sessions = {}, |
51 hosts[host] = {type = "local", connected = true, sessions = {}, |
52 host = host, s2sout = {}, events = events_new(), |
52 host = host, s2sout = {}, events = events_new(), |
53 disallow_s2s = configmanager.get(host, "core", "disallow_s2s") |
53 disallow_s2s = configmanager.get(host, "core", "disallow_s2s") |
54 or (configmanager.get(host, "core", "anonymous_login") |
54 or (configmanager.get(host, "core", "anonymous_login") |
55 and (configmanager.get(host, "core", "disallow_s2s") ~= false)); |
55 and (configmanager.get(host, "core", "disallow_s2s") ~= false)); |
56 dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen(); |
56 dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen(); |
57 }; |
57 }; |
58 for option_name in pairs(host_config.core) do |
58 for option_name in pairs(host_config.core) do |
59 if option_name:match("_ports$") then |
59 if option_name:match("_ports$") then |