Symbiosis
Contributeur-
Compteur de contenus
220 -
Inscription
-
Dernière visite
-
Jours gagnés
9
Type de contenu
Profils
Forums
Boutique
Calendrier
Tout ce qui a été posté par Symbiosis
-
Normal ça ne se met pas dans filezilla mdr
-
Je comprends pas ta requête
-
RewriteRule ^game/habbo-imaging/badge/(.*).gif$ .game/habbo-imaging/badge.php?badge=$1 essaye avec ça
-
Car il manque le game l'habbo-imaging dans le lien du htaccess
-
^^ ça arrive
-
HabbXmlEditor éditeur d'image ? Vu le nom j'ai du mal à y croire quand même
-
@Solife @Calypso C'est réglé
-
tutoriel Fixer les badges groupes de son hôtel
Symbiosis a répondu à un(e) sujet de Symbiosis dans Tutoriels
Viens privé -
tutoriel Fixer les badges groupes de son hôtel
Symbiosis a répondu à un(e) sujet de Symbiosis dans Tutoriels
Je veux bien que tu me montres oui -
Les ports le pare feu etc sont biens config ?
-
héhé <3
-
Merci à toi mais bon le but c'est de me faire une liste que je pourrais mettre sans prise de tête pas une avec qui je devrais me battre aha
-
Merci
-
Merci beau gosse
-
Tu me fais une petite liste un privé des rétros qu'il manque aha
-
ça serait sympa !
-
Pas tellement mon travail ça .. Je vais pas m'amuser à rajouter les nouveaux rétros existant ^^
-
Comment ça ?
-
no soucis aha merci
-
Salut à tous, aujourd'hui je vous partage mon anti pub ! Tout d'abord rendez-vous dans la class WordFilterManager.cs et remplacer y tout le code suivant: using System; using System.Linq; using System.Text; using System.Data; using System.Collections.Generic; using System.Text.RegularExpressions; using Plus.Database.Interfaces; using System.Globalization; using Plus.HabboHotel.GameClients; using Plus.HabboHotel.Rooms.Chat.Commands.Administrator; namespace Plus.HabboHotel.Rooms.Chat.Filter { public sealed class WordFilterManager { private List<WordFilter> _filteredWords; internal static string[] liendeshotels; public WordFilterManager() { this._filteredWords = new List<WordFilter>(); } public void Init() { if (this._filteredWords.Count > 0) this._filteredWords.Clear(); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("SELECT * FROM wordfilter"); DataTable Table = dbClient.GetTable(); liendeshotels = new string[Table.Rows.Count]; int i = 0; foreach (DataRow dataRow in dbClient.GetTable().Rows) { liendeshotels[i] = (dataRow[0].ToString()); i++; } } } public static bool AntiPUB(string PopFixedString) { PopFixedString = PopFixedString.Replace("Ή", "h"); var bytes = Encoding.Default.GetBytes(PopFixedString); var text = Encoding.UTF8.GetString(bytes); string msgnoaccent = RemoveDiacritics(text); msgnoaccent = msgnoaccent.ToLower().Replace(" ", ""). Replace(">", ""). Replace("<", ""). Replace("-", ""). Replace("_", ""). Replace("~", ""). Replace("^", ""). Replace("!", ""). Replace(":", ""). Replace(";", ""). Replace("*", ""). Replace("¨", ""). Replace("^^", ""). Replace("#", ""). Replace("\"", ""). Replace("(", ""). Replace(")", ""). Replace("\\", ""). Replace("1", ""). Replace("2", ""). Replace("3", ""). Replace("5", ""). Replace("6", ""). Replace("7", ""). Replace("8", ""). Replace("9", ""). Replace("@", ""). Replace("{", ""). Replace("[", ""). Replace("$", ""). Replace("]", ""). Replace("+", ""). Replace(".", ""). Replace("?", "h"). Replace("/", ""). Replace("?", ""). Replace("¥", ""). Replace("|", ""). Replace("º", ""). Replace("¬", ""). Replace("«", ""). Replace("»", ""). Replace("‡", ""). Replace("ª", ""). Replace("•", ""). Replace("Õ", ""). Replace("Ã", "a"). Replace("Ø", "o"). Replace("Á", "a"). Replace("˜", ""). Replace("ß", "b"). Replace("ð", "d"). Replace("'", ""). Replace("4", "a"). Replace("+", ""); msgnoaccent = Regex.Replace(msgnoaccent, "[^a-zA-Z0-9_]", ""); string msgnoaccent2 = msgnoaccent; msgnoaccent = msgnoaccent.Replace("0", "o") .Replace("4", "a"); msgnoaccent2 = msgnoaccent2.Replace("4", "") .Replace("0", ""); if (liendeshotels.Any(msgnoaccent.Contains) || liendeshotels.Any(msgnoaccent2.Contains)) { return true; } return false; } static string RemoveDiacritics(string stIn) { string stFormD = stIn.Normalize(NormalizationForm.FormD); StringBuilder sb = new StringBuilder(); for (int ich = 0; ich < stFormD.Length; ich++) { UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(stFormD[ich]); if (uc != UnicodeCategory.NonSpacingMark) { sb.Append(stFormD[ich]); } } return (sb.ToString().Normalize(NormalizationForm.FormC)); } public string CheckMessage(string Message) { foreach (WordFilter Filter in this._filteredWords.ToList()) { if (Message.ToLower().Contains(Filter.Word) && Filter.IsStrict || Message == Filter.Word) { Message = Regex.Replace(Message, Filter.Word, Filter.Replacement, RegexOptions.IgnoreCase); } else if (Message.ToLower().Contains(Filter.Word) && !Filter.IsStrict || Message == Filter.Word) { string[] Words = Message.Split(' '); Message = ""; foreach (string Word in Words.ToList()) { if (Word.ToLower() == Filter.Word) Message += Filter.Replacement + " "; else Message += Word + " "; } } } return Message.TrimEnd(' '); } public bool CheckBannedWords(string Message) { Message = Message.Replace(" ", "").Replace(".", "").Replace("_", "").ToLower(); foreach (WordFilter Filter in this._filteredWords.ToList()) { if (!Filter.IsBannable) continue; if (Message.Contains(Filter.Word)) return true; } return false; } public bool IsFiltered(string Message) { foreach (WordFilter Filter in this._filteredWords.ToList()) { if (Message.Contains(Filter.Word)) return true; } return false; } } } Une fois ceci fait allez dans GameClient.cs Et ajoutez internal byte PublicistaCount; Dans public class GameClient { ... internal byte PublicistaCount; Puis sous public void StartConnection() { if (_connection == null) return; this.PingCount = 0; (_connection.parser as InitialPacketParser).PolicyRequest += PolicyRequest; (_connection.parser as InitialPacketParser).SwitchParserRequest += SwitchParserRequest; _connection.startPacketProcessing(); } Ajoutez internal void HandlePublicista(string Message, string joueur) { if (this.PublicistaCount <= 1) { } else if (this.PublicistaCount == 2) { this.SendPacket(new RoomNotificationComposer("Alerte pub !", "Ton message n'a pas été envoyé en public car il contient de la publicité pour un autre rétro serveur.<br><br>1/3 Avant le ban.", "pub", "")); } else if (this.PublicistaCount == 3) { this.SendPacket(new RoomNotificationComposer("Alerte pub !", "Ton message n'a pas été envoyé en public car il contient de la publicité pour un autre rétro serveur.<br><br>2/3 Avant le ban.", "pub", "")); } else if (this.PublicistaCount >= 4) { this.SendPacket(new RoomNotificationComposer("Alerte pub !", "Ton message n'a pas été envoyé en public car il contient de la publicité pour un autre rétro serveur.<br><br>3/3 Avant le ban.", "pub", "")); PlusEnvironment.GetGame().GetModerationManager().BanUser("System", ModerationBanType.USERNAME, joueur, "PUB", (PlusEnvironment.GetUnixTimestamp() + 78892200)); GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(joueur); TargetClient.GetConnection().Dispose(); return; } } Maintenant dans WhisperEvent.cs Sous string Params = Packet.PopString(); string ToUser = Params.Split(' ')[0]; string Message = Params.Substring(ToUser.Length + 1); int Colour = Packet.PopInt(); Ajoutez if (WordFilterManager.AntiPUB(Message)) { if (!Session.GetHabbo().GetPermissions().HasRight("mod_tool")) Session.PublicistaCount++; Session.HandlePublicista(Message, Session.GetHabbo().Username); return; } Dans HabboMessenger.cs Sous if (!FriendshipExists(ToId)) { GetClient().SendMessage(new InstantMessageErrorComposer(MessengerMessageErrors.YOUR_NOT_FRIENDS, ToId)); return; } Ajoutez if (WordFilterManager.AntiPUB(Message)) { if (!GetClient().GetHabbo().GetPermissions().HasRight("mod_tool")) GetClient().PublicistaCount++; GetClient().HandlePublicista(Message, GetClient().GetHabbo().Username); return; } Dernier code à ajouter dans l'ému ! Allez dans RoomUser.cs Sous public void OnChat(int Colour, string Message, bool Shout) { if (GetClient() == null || GetClient().GetHabbo() == null || mRoom == null) return; if (mRoom.GetWired().TriggerEvent(Items.Wired.WiredBoxType.TriggerUserSays, this, Message)) { GetClient().SendWhisper(Message, GetClient().GetHabbo().Preferences.Ints["last.chat.bubble"]); return; } Ajoutez if (WordFilterManager.AntiPUB(Message)) { if (!GetClient().GetHabbo().GetPermissions().HasRight("mod_tool")) GetClient().PublicistaCount++; GetClient().HandlePublicista(Message, GetClient().GetHabbo().Username); return; } Maintenant côté db ! Supprimez votre table wordfilter Ajoutez /* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50711 Source Host : localhost:3306 Source Database : plusemu Target Server Type : MYSQL Target Server Version : 50711 File Encoding : 65001 Date: 2017-10-15 22:30:31 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `wordfilter` -- ---------------------------- DROP TABLE IF EXISTS `wordfilter`; CREATE TABLE `wordfilter` ( `word` varchar(100) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL, PRIMARY KEY (`word`), UNIQUE KEY `word` (`word`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of wordfilter -- ---------------------------- INSERT INTO `wordfilter` VALUES ('abofr'); INSERT INTO `wordfilter` VALUES ('ado hotel'); INSERT INTO `wordfilter` VALUES ('ado-lite'); INSERT INTO `wordfilter` VALUES ('adors'); INSERT INTO `wordfilter` VALUES ('adow'); INSERT INTO `wordfilter` VALUES ('bbocity'); INSERT INTO `wordfilter` VALUES ('bobba'); INSERT INTO `wordfilter` VALUES ('bobbalive'); INSERT INTO `wordfilter` VALUES ('bobbaworld'); INSERT INTO `wordfilter` VALUES ('cokedev'); INSERT INTO `wordfilter` VALUES ('habbalha'); INSERT INTO `wordfilter` VALUES ('habbo et city'); INSERT INTO `wordfilter` VALUES ('habbo-alpha'); INSERT INTO `wordfilter` VALUES ('habboalpha'); INSERT INTO `wordfilter` VALUES ('habboc'); INSERT INTO `wordfilter` VALUES ('habbocity'); INSERT INTO `wordfilter` VALUES ('habbod'); INSERT INTO `wordfilter` VALUES ('habboetcity'); INSERT INTO `wordfilter` VALUES ('habbogo'); INSERT INTO `wordfilter` VALUES ('habbono'); INSERT INTO `wordfilter` VALUES ('habbosee'); INSERT INTO `wordfilter` VALUES ('habbosky'); INSERT INTO `wordfilter` VALUES ('habboteens'); INSERT INTO `wordfilter` VALUES ('habbow'); INSERT INTO `wordfilter` VALUES ('habbox'); INSERT INTO `wordfilter` VALUES ('habboz'); INSERT INTO `wordfilter` VALUES ('habbozone'); INSERT INTO `wordfilter` VALUES ('HABBQSITY'); INSERT INTO `wordfilter` VALUES ('habbux'); INSERT INTO `wordfilter` VALUES ('hbeta'); INSERT INTO `wordfilter` VALUES ('hobbu'); INSERT INTO `wordfilter` VALUES ('hubba'); INSERT INTO `wordfilter` VALUES ('hubox'); INSERT INTO `wordfilter` VALUES ('hzone'); INSERT INTO `wordfilter` VALUES ('jabb'); INSERT INTO `wordfilter` VALUES ('jabbo'); INSERT INTO `wordfilter` VALUES ('jabo'); INSERT INTO `wordfilter` VALUES ('jobbiz'); INSERT INTO `wordfilter` VALUES ('jxaxbxbxo'); INSERT INTO `wordfilter` VALUES ('kabbo'); INSERT INTO `wordfilter` VALUES ('kobba'); INSERT INTO `wordfilter` VALUES ('kobba.ml'); INSERT INTO `wordfilter` VALUES ('krabbo'); INSERT INTO `wordfilter` VALUES ('libbo'); INSERT INTO `wordfilter` VALUES ('Lybbo'); INSERT INTO `wordfilter` VALUES ('lyddo'); INSERT INTO `wordfilter` VALUES ('mabbo'); INSERT INTO `wordfilter` VALUES ('mibbo'); INSERT INTO `wordfilter` VALUES ('mojitocity'); INSERT INTO `wordfilter` VALUES ('wibbo'); INSERT INTO `wordfilter` VALUES ('wobba'); Bonne utilisation
-
juste sous: if (!string.IsNullOrWhiteSpace(DBConfigData.DBData["welcome_message"])) SendMessage(new MOTDNotificationComposer(DBConfigData.DBData["welcome_message"])); tu mets: ServerPacket notif = new ServerPacket(ServerPacketHeader.NuxAlertMessageComposer); notif.WriteString("habbopages/bienvenue.txt"); SendMessage(notif);
-
Pour fixer l'heure changer cette ligne b.Append(UnixTimeStampToDateTime((double)PlusEnvironment.GetUnixTimestamp()) + "\n"); par b.Append(UnixTimeStampToDateTime((double)r["timestamp"]) + "\n");
-
D'accord
-
Si tu trouves vraiment pas, je peux t'aider via teamviewer ou que sais-je
-
Oui mais faut pas oublier qu'à l'intérieur de ces fichiers il y a aussi des liens