penelope

created pr with 114.1 on 2026-02-25T00:32:19Z · by ba3031e9
added 114.2 on 2026-02-25T00:34:17Z · by ba3031e9
1: 3c7cbc2 = 1: 3c7cbc2 convert to environment variables
-: ------- > 2: 5798fe8 change port env name to avoid collision
cmds
checkout latest patchset:
ssh pr.pico.sh print 114 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print 114.[rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 114

Patchset 114.2 on 2026-02-25T00:34:17Z · commit 3c7cbc2

convert to environment variables
Melanie Kat 2026-02-25T00:26:38Z
Semantic diff summary
0 added, 0 modified, 0 signature changed, 0 removed across 0 analyzed files (2 files skipped: unsupported file type)
+8 -7 bot.php #
......@@ -3,17 +3,18 @@
33 // The omg.lol generic IRC bot framework lol
44 // Based on https://github.com/Hammster/php-irc-bot/tree/master
55
6-// Configure your bot's details here
7-$nickname = 'your-bot';
8-$hostname = 'example.com';
9-$password = 'correct-horse-battery-stapler';
10-$server = 'irc.example.com';
11-$port = 6697;
6+// Configure your bot's details
7+// with environment variables
8+$nickname = $_ENV["NICKNAME"];
9+$hostname = $_ENV["HOSTNAME"];
10+$password = $_ENV["PASSWORD"];
11+$server = $_ENV["SERVER"];
12+$port = $_ENV["PORT"];
1213
1314 // In order to update the bot's code while it's connected to IRC, we need a separate "functions" script.
1415 // This script will receive a stream of the IRC activity, and then it'll "do stuff" and send the response
1516 // back to *this* script. If that makes sense. I hope it does.
16-$functions_script_command = '/usr/bin/php /path/to/bot_functions.php';
17+$functions_script_command = 'NICKNAME=$nickname /usr/bin/php -d variables_order=EGPCS ./bot_functions.php';
1718
1819 // Finally, you can plop a URL to an avatar image here for IRCv3 avatars, or set to 'false' to disable
1920 $avatar_url = false;
+1 -1 bot_functions.php #
......@@ -3,7 +3,7 @@
33 // Penelope Bot Functions
44
55 // eventually we can make the nickname be handed off from the main script, but for now, set it here too
6-$nickname = 'your-bot';
6+$nickname = $_ENV["NICKNAME"];
77
88 // you can configure channels to join here
99 $channels = array(
Back to top