package org.softeg.slartus.forpdaplus.controls;

import org.softeg.slartus.forpdaplus.Client;

/**
 * Created by isanechek on 08.01.16.
 */
public class Surprise {
    private static String[] inBlock = { "Googleoff", "Stealth3001", "shpatelman" };

    public static boolean isBlocked() {
        String user = Client.getInstance().getUser();
        for (String obj : inBlock) {
            if (user.equals(obj)) {
                return true;
            }
        }
        return false;
    }
}

@@ -86,16 +86,102 @@
 .Client;
+%0Aimport org.softeg.slartus.forpdaplus.utils.LogUtil;%0A%0Aimport java.nio.charset.Charset;
 %0A%0A/**%0A *
@@ -266,72 +266,451 @@
 tic 
-String%5B%5D inBlock = %7B %22Googleoff%22, %22Stealth3001%22, %22shpatelman%22
+final Charset UTF_8 = Charset.forName(%22UTF-8%22);%0A    private static String%5B%5D inBlock = %7B%0A            %22%5Cu0047%5Cu006F%5Cu006F%5Cu0067%5Cu006C%5Cu0065%5Cu006F%5Cu0066%5Cu0066%22,%0A            %22%5Cu0053%5Cu0074%5Cu0065%5Cu0061%5Cu006C%5Cu0074%5Cu0068%5Cu0033%5Cu0030%5Cu0030%5Cu0031%22,%0A            %22%5Cu0073%5Cu0068%5Cu0070%5Cu0061%5Cu0074%5Cu0065%5Cu006C%5Cu006D%5Cu0061%5Cu006E%22%0A    %7D;%0A%0A    private static String forceUtf8Coding(String input) %7B%0A        return new String(input.getBytes(UTF_8), UTF_8);%0A   
  %7D
-;
 %0A%0A  
@@ -854,24 +854,66 @@
     
-if (user
+String m = forceUtf8Coding(obj);%0A            if (m
 .equals(
 obj)
@@ -908,19 +908,20 @@
 .equals(
-obj
+user
 )) %7B%0A   

update surprise