diff options
Diffstat (limited to 'src/java/com/juick/http/www/Main.java')
-rw-r--r-- | src/java/com/juick/http/www/Main.java | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java index c84a2f8c..c6c4f1b8 100644 --- a/src/java/com/juick/http/www/Main.java +++ b/src/java/com/juick/http/www/Main.java @@ -36,11 +36,11 @@ import ru.sape.Sape; * @author Ugnich Anton */ @WebServlet(name = "Main", urlPatterns = {"/"}) -public class Main extends HttpServlet implements XmppListener { +public class Main extends HttpServlet { Connection sql; Connection sqlSearch; - XmppConnection xmpp; + Stream xmpp; Blogs blogs; Login login = new Login(); Help help = new Help(); @@ -97,21 +97,6 @@ public class Main extends HttpServlet implements XmppListener { } } - @Override - public void onAuth(String resource) { - log("XMPP AUTH: " + resource); - } - - @Override - public void onAuthFailed(String message) { - log("XMPP AUTH FAILED: " + message); - } - - @Override - public void onConnectionFailed(String message) { - log("XMPP CONNECTION FAILED: " + message); - } - /** * Handles the HTTP <code>GET</code> method. * @param request servlet request @@ -175,7 +160,7 @@ public class Main extends HttpServlet implements XmppListener { } response.sendError(404); } else if (uri.matches("^/[^/]+$")) { - com.juick.User user = com.juick.server.UserQueries.getUserByNick(sql, request.getRequestURI().substring(1)); + com.juick.User user = com.juick.server.UserQueries.getUserByName(sql, request.getRequestURI().substring(1)); if (user != null) { Utils.sendPermanentRedirect(response, "/" + user.UName + "/"); } else { @@ -183,7 +168,7 @@ public class Main extends HttpServlet implements XmppListener { } } else if (uri.matches("^/.+/.*")) { String uriparts[] = uri.split("/"); - com.juick.User user = com.juick.server.UserQueries.getUserByNick(sql, uriparts[1]); + com.juick.User user = com.juick.server.UserQueries.getUserByName(sql, uriparts[1]); if (user != null && user.UName.equals(uriparts[1])) { if (uriparts.length == 2) { // http://juick.com/username/ pagesUser.doGetBlog(sql, sqlSearch, request, response, user); |