Mute user
1.0
This allows the administrator to "mute" a user.
On the profile of any user the admin can mute the user and specify a text the
user sees when trying to post/reply.
cae
Modified to SP1 by Ken Ault
g-a-p@gmx.li
Sources/Profile.pl
~;
### mute mod
if( $settings[7] ne 'Administrator' ) {
$member{'username'} = $username;
$member{'settings6'} = $settings[6];
$member{'settings7'} = $settings[7];
}
#### mute mod
if ($member{'muteuser'}) {$member{'muteuser'} = "checked";} else {$member{'muteuser'} = "";}
fopen(FILE, ">$memberdir/$member{'username'}.mute", 1);
print FILE "$member{'muteuser'}\n";
print FILE "$member{'mutereason'}";
fclose(FILE);
#### mute mod
Sources/Post.pl
sub Post {
### mute mod
my ($mutereason,@mutesettings);
fopen(FILE, "$memberdir/$username.mute");
@mutesettings=;
fclose(FILE);
chomp($mutesettings[0]);
if ($mutesettings[0] eq 'checked') {
$mutereason = $mutesettings[1] ? $mutesettings[1] : $mute{'3'};
&fatal_error($mutereason);
}
#### mute mod
english.lng
1;
$mute{'1'} = "Mute user";
$mute{'2'} = "User will not be allowed to post or reply and instead see the message";
$mute{'3'} = "Sorry, you are not allowed to post/reply. Please contact the administrator.";
1;