not guaranteed users silenced on chat room
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 17 Dec 2014 06:59:16 +0000 (07:59 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 17 Dec 2014 06:59:16 +0000 (07:59 +0100)
web/Obj/brisk.phh

index 54d39f4..6bf400b 100644 (file)
@@ -2139,10 +2139,27 @@ class Brisk
         $to_user = sprintf('chatt_sub("%s",[%d,"%s"],"%s");', $dt, $user->flags, xcape($user->name), xcape("== chat ban =="));
       }
       else {
-        $to_user = sprintf('chatt_sub("%s",[%d,"%s"],"%s");', $dt, $user->flags, xcape($user->name), xcape($msg));
-        // temporary silentiation for troll (will became array check)
-        // if (strcasecmp($user->name,'JackRokka') != 0 && $user->sess != '47ea653f602e8')
-        $to_room = $to_user;
+          if ( TRUE && (! $user->is_auth()) ) {
+              $to_user = nickserv_msg($dt, xcape("Visto l'elevato numero di molestatori che ultimamente hanno preso dimora su Brisk abbiamo deciso"));
+              $to_user .= nickserv_msg($dt, xcape("di disattivare temporaneamente la chat in room per i non registrati, non ce ne vogliate e buone feste."));
+              $aug_head = array("Tanti", "Tantissimi", "Un enormità", "Un milione", "Un' esagerazione");
+              $aug_body = array("a tutti gli utenti", "a tutti gli uomini", "a tutte le donne", "a tutti gli utenti");
+              $aug_tail = array("di Brisk", "del sito", "della ciurma", "della comitiva", "del gruppo");
+
+              $auguri = sprintf("%s auguri %s %s.",
+                                $aug_head[mt_rand(0, count($aug_head)-1)],
+                                $aug_body[mt_rand(0, count($aug_body)-1)],
+                                $aug_tail[mt_rand(0, count($aug_tail)-1)]);
+
+              $to_room = sprintf('chatt_sub("%s",[%d,"%s"],"%s");', $dt, $user->flags, xcape($user->name),
+                                 xcape($auguri));
+          }
+          else {
+              $to_user = sprintf('chatt_sub("%s",[%d,"%s"],"%s");', $dt, $user->flags, xcape($user->name), xcape($msg));
+              // temporary silentiation for troll (will became array check)
+              // if (strcasecmp($user->name,'JackRokka') != 0 && $user->sess != '47ea653f602e8')
+              $to_room = $to_user;
+          }
       }
 
       log_legal($curtime, $user->ip, $user,