mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Broadcast message function
This commit is contained in:
@@ -59,6 +59,11 @@ print &ui_table_row($text{'cmds_weather'},
|
||||
&ui_textbox("secs", 5, 5)." ".
|
||||
&ui_submit($text{'cmds_weatherb'}, 'weather'));
|
||||
|
||||
# Broadcast message
|
||||
print &ui_table_row($text{'cmds_say'},
|
||||
&ui_textbox("text", undef, 40)." ".
|
||||
&ui_submit($text{'cmds_sayb'}, 'say'));
|
||||
|
||||
print &ui_table_end();
|
||||
print &ui_form_end();
|
||||
|
||||
|
||||
@@ -234,6 +234,9 @@ cmds_etimeadd=Time to add must be a number between 0 and 24000
|
||||
cmds_timedone=Changed game time
|
||||
cmds_gamemodedone=Changed default game mode to $1
|
||||
cmds_difficultydone=Changed game difficulty
|
||||
cmds_say=Broadcast message
|
||||
cmds_sayb=Send
|
||||
cmds_msgdone=Sent message to all players
|
||||
|
||||
manual_title=Edit Configuration File
|
||||
manual_desc=This page allows you to manually edit the Minecraft server configuration file <tt>$1</tt>. Be careful, as no validation will be done on your input. Any changes will not be activated until the server is restarted.
|
||||
|
||||
@@ -67,6 +67,12 @@ elsif ($in{'weather'}) {
|
||||
&error(&html_escape($out));
|
||||
$msg = &text('cmds_weatherdone', $in{'wtype'}, $in{'secs'});
|
||||
}
|
||||
elsif ($in{'say'}) {
|
||||
# Broadcast message
|
||||
$in{'text'} =~ /\S/ || &error($text{'conn_etext'});
|
||||
&send_server_command("/say $in{'text'}");
|
||||
$msg = $text{'cmds_msgdone'};
|
||||
}
|
||||
else {
|
||||
&error($text{'conn_ebutton'});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user