Hello guys.
Recently , I was helping a friend with butterfly emulator and I thought the problem would be the same as min before , when I was using butterfly emu , but then I noticed something different. Usually , if we changed the user_ticket to auth_ticket , the client would work with butterfly , but this :
From this code I can notice that it's set to get the sso ticket from user_tickets table , and not from the users table , so it's separate.Code:using (IQueryAdapter dbClient = ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) { if (!useSso || !ButterflyEnvironment.useSSO) { dbClient.setQuery("SELECT userid " + "FROM user_tickets " + "WHERE user_tickets.sessionticket = @sso LIMIT 1"); } else { dbClient.setQuery("SELECT userid " + "FROM user_tickets " + "WHERE user_tickets.sessionticket = @sso " + "AND ipaddress = @iPaddress "); } dbClient.addParameter("sso", sessionTicket); dbClient.addParameter("ipaddress", ip); userid = (uint)dbClient.getInteger(); if (userid == 0) { errorCode = 1; return null; //Logging.LogException("No user found. Debug data: [" + sessionTicket + "], [" + ip + "]"); //throw new UserDataNotFoundException(string.Format("No user found with ip {0} and sso {1}. Use SSO: {2} ", ip, sessionTicket, ButterflyEnvironment.useSSO.ToString())); } userData = ButterflyEnvironment.GetGame().GetClientManager().GetHabboData(userid); if (userData == null) { errorCode = 1; return null; } //if (ip != "127.0.0.1") //{ // dbClient.setQuery("DELETE FROM user_tickets WHERE sessionticket = @Sessionticket"); // dbClient.addParameter("sessionticket", sessionTicket); // dbClient.runQuery(); //}
What I can understand is that , if I somehow manage to change the code to make it get the sso from auth_ticket table or edit revcms to enter the ssso ticket into the user_tickets table , the client might start working.
That's the sql for user_tickets , I hope anybody would know how to help. Thanks :)Code:/* Navicat MySQL Data Transfer Source Server : efdsf Source Server Version : 50532 Source Host : localhost:3306 Source Database : jo Target Server Type : MYSQL Target Server Version : 50532 File Encoding : 65001 Date: 2013-12-16 23:29:39 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `user_tickets` -- ---------------------------- DROP TABLE IF EXISTS `user_tickets`; CREATE TABLE `user_tickets` ( `userid` int(10) unsigned NOT NULL, `sessionticket` varchar(100) NOT NULL, `ipaddress` varchar(20) NOT NULL, PRIMARY KEY (`sessionticket`,`ipaddress`), UNIQUE KEY `index_id` (`userid`) USING HASH ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of user_tickets -- ----------------------------



Reply With Quote


