Make Censoring a User Option 1.0 This mod allows members to choose in their profile whether or not they want censoring enabled. MADD Hatter http://www.ghostcdr.com Sources\Profile.pl unlink("$memberdir/$member{'username'}.imconfig"); unlink("$memberdir/$member{'username'}.mh"); unlink("$memberdir/$username.imconfig"); unlink("$memberdir/$username.mh"); if ($memsettings[17] == 6) { $tsl6 = ' selected'; } if ($censoropt[0] == 1) { $censorchecked = 'checked'; } print <<"EOT"; $txt{'486'}:
print <<"EOT"; $cnstxt{'01'} $txt{'486'}:
foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $message =~ s~\Q$tmpa\E~$tmpb~gi; $msub =~ s~\Q$tmpa\E~$tmpb~gi; } if (-e "$memberdir/$username.mh") { fopen(FILE, "$memberdir/$username.mh"); @censopt = ; chomp $censopt[0]; fclose(FILE); $censoropt = $censopt[0]; } else { $censoropt = ''; } if ($censoropt != 1) { foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $message =~ s~\Q$tmpa\E~$tmpb~gi; $msub =~ s~\Q$tmpa\E~$tmpb~gi; } } fopen(FILE, "$memberdir/$INFO{'username'}.dat"); @memsettings=; fclose(FILE); fopen(FILE, "$memberdir/$INFO{'username'}.mh"); @censoropt=; fclose(FILE); if($newpassemail) { # Write log fopen( FILE, ">$memberdir/$member{'username'}.mh"); print FILE "$member{'censor'}\n"; fclose(FILE); Sources\MessageIndex.pl # Censor the subject of the thread. foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $msub =~ s~\Q$tmpa\E~$tmpb~gi; } # Censor the subject of the thread if user has not disabled censoring if (-e "$memberdir/$username.mh") { fopen(FILE, "$memberdir/$username.mh"); @censopt = ; chomp $censopt[0]; fclose(FILE); $censoropt = $censopt[0]; } else { $censoropt = ''; } if ($censoropt != 1) { foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $msub =~ s~\Q$tmpa\E~$tmpb~gi; } } Sources\Display.pl # Censor the subject and message. foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $postmessage =~ s~\Q$tmpa\E~$tmpb~gi; $msub =~ s~\Q$tmpa\E~$tmpb~gi; } # Censor the subject and message unless user has censoring disabled if (-e "$memberdir/$username.mh") { fopen(FILE, "$memberdir/$username.mh"); @censopt = ; chomp $censopt[0]; fclose(FILE); $censoropt = $censopt[0]; } else { $censoropt = ''; } if ($censoropt != 1) { foreach (@censored) { ($tmpa,$tmpb) = @{$_}; $postmessage =~ s~\Q$tmpa\E~$tmpb~gi; $msub =~ s~\Q$tmpa\E~$tmpb~gi; } } english.lng 1; $cnstxt{'01'} = "Disable Censoring?"; Sources/Admin.pl unlink("$memberdir/$currentmem.imconfig"); unlink("$memberdir/$currentmem.mh");