From e97bdaac2141df18552451ca93b656726cd69cb5 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 25 May 2011 16:21:36 +1000 Subject: custom tripcodes --- inc/functions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'inc/functions.php') diff --git a/inc/functions.php b/inc/functions.php index 35a88aec..bb729857 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1423,10 +1423,16 @@ $salt = strtr ( $salt, ':;<=>?@[\]^_`', 'ABCDEFGabcdef' ); if ( isset ( $t[2] ) ) { // secure - $trip = '!!' . substr ( crypt ( $trip, $config['secure_trip_salt'] ), ( -1 * $length ) ); + if(isset($config['custom_tripcode']["##{$trip}"])) + $trip = $config['custom_tripcode']["##{$trip}"]; + else + $trip = '!!' . substr ( crypt ( $trip, $config['secure_trip_salt'] ), ( -1 * $length ) ); } else { // insecure - $trip = '!' . substr ( crypt ( $trip, $salt ), ( -1 * $length ) ); + if(isset($config['custom_tripcode']["#{$trip}"])) + $trip = $config['custom_tripcode']["#{$trip}"]; + else + $trip = '!' . substr ( crypt ( $trip, $salt ), ( -1 * $length ) ); } } if ( isset ( $trip ) ) { -- cgit v1.3