Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Quote:
Originally Posted by
GheddoMonsta
speech not work -.-
fix for speech:
put this in your LanguageLocale.cs:
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, "subba");
}
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)
{
}
}
}
}
Quote:
Originally Posted by
BoomHotel
butterfly have a diffrent sso then phoenix
so if you use a cms withe the phoenix sso it doesn't work
you need to fix it for butterfly ;p
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Quote:
Originally Posted by
jordynegen11
fix for speech:
put this in your LanguageLocale.cs:
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, "subba");
}
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)
{
}
}
}
}
butterfly have a diffrent sso then phoenix
so if you use a cms withe the phoenix sso it doesn't work
you need to fix it for butterfly ;p
But what do I change it too?
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Whats up with the name of the server? ButterStorm is an evolution of Butterfly, where they added lots of stuff so it became fat, slow and buggy, at the same time there's lots of it => Storm of butter (Butter = fat) => ButterStorm? Kinda funny speculations though.
- Martin
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Quote:
Originally Posted by
maritnmine
Whats up with the name of the server? ButterStorm is an evolution of Butterfly, where they added lots of stuff so it became fat, slow and buggy, at the same time there's lots of it => Storm of butter (Butter = fat) => ButterStorm? Kinda funny speculations though.
- Martin
Evolution? You mean re-name, just like Butterfly is a re-name of Uber.
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Quote:
Originally Posted by
BoomHotel
But what do I change it too?
you need too replace the original LanguageLocale.cs with this
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
My group badge images not working, how can I fix it?
- Whriten
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
I am not able to see your point. Butterfly is totally different from Uber. If I named it UberFly it would have been different, but that just sounds nasty, haha!
- Martin
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Quote:
Originally Posted by
maritnmine
I am not able to see your point. Butterfly is totally different from Uber. If I named it UberFly it would have been different, but that just sounds nasty, haha!
- Martin
Why did you stole DONG ?!?!
Anyway Martin is true, the currently releases from butterfly/stormwhatever are pretty.... bad?
Butterfly r104 (don't know the current version) but its fast like DONG o.O
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Someone works JukeBox in his hotel?
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Quote:
Originally Posted by
Ryan
Why did you stole DONG ?!?!
Anyway Martin is true, the currently releases from butterfly/stormwhatever are pretty.... bad?
Butterfly r104 (don't know the current version) but its fast like DONG o.O
It is true that its hard to get something as fast as the speed of DONG. Only software from DONG Inc. is able to do that.
- Martin
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
ButterStorm is Butter9494 ^^
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
If I is my page views as more brb. how can this be done away? and excuse for my bad English
Re: BCStorm [R63B] CHAT BUBBLES / GROUPS / MULTIPLE MORE FEATURES
Personally I would recommend closing this thread, and redirecting everyone to the newer version of this emulator. This emulator contains exploit, the newer version has these fixed.