wooo
This commit is contained in:
@@ -1,18 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# ig give a default optionfuck
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
msg="SHIT'S GOIN ON RN"
|
msg="SHIT'S GOIN ON RN"
|
||||||
else
|
else
|
||||||
msg="$1"
|
msg="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# faggot function
|
||||||
broadcast_important_princess_message () {
|
broadcast_important_princess_message () {
|
||||||
# Check if a message was provided
|
# fuckin hell if yo dont have an arg fuku
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Usage: broadcast_important_princess_message \"Princess' Important Message\"" >&2
|
echo "Usage: broadcast_important_princess_message \"Princess' Important Message\"" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for root/sudo privileges (required to write to other users' PTYs)
|
# am i rootie?
|
||||||
if [ "$EUID" -ne 0 ]; then
|
if [ "$EUID" -ne 0 ]; then
|
||||||
echo "Error: fuckyou dis shit needs root FAIL" >&2
|
echo "Error: fuckyou dis shit needs root FAIL" >&2
|
||||||
return 1
|
return 1
|
||||||
@@ -24,11 +26,11 @@ broadcast_important_princess_message () {
|
|||||||
|
|
||||||
echo "Broadcasting message to all ponies~"
|
echo "Broadcasting message to all ponies~"
|
||||||
|
|
||||||
# Loop through all numeric entries in /dev/pts/
|
# loop throu /dev/pts/
|
||||||
for pty in /dev/pts/[0-9]*; do
|
for pty in /dev/pts/[0-9]*; do
|
||||||
# Ensure it's an actual character device file before writing
|
# Eig check it fuukc
|
||||||
if [ -c "$pty" ]; then
|
if [ -c "$pty" ]; then
|
||||||
# Send the message with a clear broadcast banner
|
# end my IMPORTANT MESSAGE IN RED WITH A BANMNER
|
||||||
{
|
{
|
||||||
echo -e "\033[31m"
|
echo -e "\033[31m"
|
||||||
echo -e "=== PRINCESS BROADCAST SYSTEM ($timestamp) ==="
|
echo -e "=== PRINCESS BROADCAST SYSTEM ($timestamp) ==="
|
||||||
|
|||||||
Reference in New Issue
Block a user