From d90941dfd991d46e818501c8031702744d23eed0 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Wed, 17 Dec 2014 07:59:16 +0100 Subject: [PATCH] not guaranteed users silenced on chat room --- web/Obj/brisk.phh | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 54d39f4..6bf400b 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -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, -- 2.17.1