Depending on which version you downloaded there's also one in changing a bots name and searching rooms by owner:name.
Printable View
Yeah, i know about on these exploits...
@Marlon
Well, if you want add me on skype and together we can fix the presents more quickly !
Post Edited, and Removed.
Post Edited, and Removed.. Sorry
Well.. Here a improving of "Filter Words"... Put this and you will not have problems with filter!
#5# FilterWord
[QUOTE]
1° Go to Core > LanguageLocale.cs and replace for this:
For people that not has the Filter enabled... Make this:Code:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Database_Manager.Database.Session_Details.Interfaces;
using System.Data;
using System.Text.RegularExpressions;
namespace Butterfly.Core
{
class LanguageLocale
{
private static Dictionary<string, string> values;
internal static bool welcomeAlertEnabled;
internal static string welcomeAlert;
private static List<string> swearwords;
internal static void Init()
{
values = IniReader.ReadFile(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, @"System/locale.ini"));
InitWelcomeMessage();
}
internal static void InitSwearWord()
{
swearwords = new List<string>();
DataTable dTable;
using (IQueryAdapter dbClient = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
dbClient.setQuery("SELECT word FROM room_swearword_filter");
dTable = dbClient.getTable();
}
string swearWord;
foreach (DataRow dRow in dTable.Rows)
{
swearWord = (string)dRow[0];
swearwords.Add(swearWord);
}
}
private static void InitWelcomeMessage()
{
Dictionary<string, string> configFile = IniReader.ReadFile(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, @"System/welcome_config.ini"));
welcomeAlertEnabled = configFile["welcome.alert.enabled"] == "true";
if (welcomeAlertEnabled)
{
welcomeAlert = File.ReadAllText(System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, @"System/welcome_message.ini"));
}
}
private static string ReplaceEx(string original,
string pattern, string replacement)
{
int count, position0, position1;
count = position0 = position1 = 0;
string upperString = original.ToUpper();
string upperPattern = pattern.ToUpper();
int inc = (original.Length / pattern.Length) *
(replacement.Length - pattern.Length);
char[] chars = new char[original.Length + Math.Max(0, inc)];
while ((position1 = upperString.IndexOf(upperPattern,
position0)) != -1)
{
for (int i = position0; i < position1; ++i)
chars[count++] = original[i];
for (int i = 0; i < replacement.Length; ++i)
chars[count++] = replacement[i];
position0 = position1 + pattern.Length;
}
if (position0 == 0) return original;
for (int i = position0; i < original.Length; ++i)
chars[count++] = original[i];
return new string(chars, 0, count);
}
internal static string FilterSwearwords(string original)
{
foreach (string word in swearwords)
{
original = ReplaceEx(original, word, "bobba");
}
return original;
}
internal static string GetValue(string value)
{
if (!values.ContainsKey(value))
{
throw new MissingLocaleException("Missing language locale for [" + value + "]");
}
return values[value];
}
class MissingLocaleException : Exception
{
public MissingLocaleException(string message)
: base(message)
{
}
}
}
}
2° Go to HabboHotel > Rooms > RoomUser.cs and search for this:
3° Make sure the code above is equal to this: (Just uncomment this line ;)Code://Message = LanguageLocale.FilterSwearwords(Message);
Of if you don't have this line in emulator...Code:Message = LanguageLocale.FilterSwearwords(Message);
Go to HabboHotel > Rooms > RoomUser.cs , and place before:
Now it's only add the words in your table: room_swearword_filterCode:TimeSpan span = (TimeSpan) (DateTime.Now - habbo.spamFloodTime);
MAIN THREAD UPDATED ##
Please make an code for register the chatlogs in the table off the database (chat Private message, whisper, normal chat) look like phoenix please !
If you have time could you glance at consignments of gifts?
Well people need of chatlog i'll post the 1° part of it... I have not finished the code of chatlog on modtools.. but you will see this with your cms until i post the 2° part!
#6# Chatlog (Not Finished) 1° Part
Obs: If you have fixed the modtools share with us.. Remember I am new in Projects with "C#" so don't push me, i'll make my best for bring the bests fix's for everyone :xQuote:
1° Go to your HabboHotel > Rooms > RoomUser.cs and put this:
Above of this:Code:if (!this.IsPet && !this.IsBot)
{
using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
adapter.setQuery("INSERT INTO chatlogs (user_id, room_id, message, timestamp, user_name) VALUES (@user, @room, @message, @time, @username)");
adapter.addParameter("user", Session.GetHabbo().Id);
adapter.addParameter("room", RoomId);
adapter.addParameter("message", Message);
adapter.addParameter("time", ButterflyEnvironment.GetUnixTimestamp());
adapter.addParameter("username", Session.GetHabbo().Username);
adapter.runQuery();
}
}
And now all chats will be stored.. i'll make to the console too.. But i'm working on the code of modtools ;)Code:Message = LanguageLocale.FilterSwearwords(Message);
MAIN THREAD UPDATED ##
@Gift-UPDATE!
Well i'm working in all bugs related here.. And the gifts too!
I fixed eerrm.. 80% Now to finish i need fix the "Open Gift"... You need a prove to belive? Well..
http://hostr.co/file/sRRUFoVXZhQk/prove.png
I'll try to finish tomorrow.. But I do not promise anything, if i can i post.. ;)
There's an error in your chatlog code. (not really an error but...)
If you add it, the room will crash when a pet or bot sends a message (since 'user' isn't defined). A simple check will fix it.
Code:if (!this.IsPet && !this.IsBot)
{
using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
adapter.setQuery("INSERT INTO chatlogs (user_id, room_id, message, timestamp, user_name) VALUES (@user, @room, @message, @time, @username)");
adapter.addParameter("user", Session.GetHabbo().Id);
adapter.addParameter("room", RoomId);
adapter.addParameter("message", Message);
adapter.addParameter("time", ButterflyEnvironment.GetUnixTimestamp());
adapter.addParameter("username", Session.GetHabbo().Username);
adapter.runQuery();
}
}