diff --git a/index.html b/index.html new file mode 100644 index 0000000..23e596b --- /dev/null +++ b/index.html @@ -0,0 +1,21 @@ + + + + jabber.adastra7.net + + +

But what is a jabber?

+
+

+ Extensible Messaging and Presence Protocol (XMPP, originally named Jabber) is an open communication protocol designed for instant messaging (IM), presence information, and contact list maintenance. +

+

What's a good client for it?

+

+ Generally speaking, Gajim is the most modern one, Dyno is the most stable one, and Conversations (or forks like Blabber.im) are the most stable and feature rich ones for Android. +

+

How do i log in?

+

+ First, you need to register your account. Then you can log in with your credentials, such as username@adastra7.net (this is what is called a JID, not an email address) and your password of choice. Your client shuold automatically connect to adastra7.net at port 5222. +

+ + diff --git a/sentry.rb b/sentry.rb index d0c288d..2bc1629 100644 --- a/sentry.rb +++ b/sentry.rb @@ -6,8 +6,9 @@ require 'uri' require 'openssl' norxondor_gorgonax = URI::MailTo::EMAIL_REGEXP - -CONFIG = JSON.load_file(Dir.pwd+"/.config.json") +config_file = File.new Dir.pwd+"/.config.json", "r" +CONFIG = JSON.load(config_file) +config_file.close SERVER_NAME = CONFIG["service_name"] SMTP_SERVER = CONFIG["server"] @@ -15,7 +16,6 @@ SMTP_PORT = CONFIG["port"] SMTP_USER = CONFIG["user"] SMTP_PASS = CONFIG["pass"] SMTP_TLS = CONFIG["tls"] -SMTP_STARTTLS = CONFIG["starttls"] SMTP_AUTH = CONFIG["auth"].to_sym JABBER_SERVER = CONFIG["jabber-server"] JABBER_HOST = CONFIG['jabber-host'] @@ -48,13 +48,15 @@ def sendmail(code,email) msg_headers << "Date: "+Time.now.to_s+"\r\n" msg = msg_headers + "\r\nTo finish your account registration, enter the following code: \"#{code}\"\r\n" SMTP_TLS ? smtp.enable_tls : smtp.disable_tls - SMTP_STARTTLS ? smtp.enable_starttls : smtp.disable_starttls puts(smtp.start "localhost", SMTP_USER, SMTP_PASS, SMTP_AUTH) puts(smtp.send_message msg, SMTP_USER, [email]) end # Main API server -server = Hyde::Server.new Port: HTTP_PORT do +server = Hyde::Server.new Host: "192.168.1.27", Port: HTTP_PORT do + remap Dir.pwd + index ['index.html'] + serve "index.html" # Serve static shit path "register" do preprocess do |ctx|