slightly better instructions
1 parent bc84780 commit aa7d014e1e993387a3f0e1400e41b410bed2fed0
root authored on 5 Aug 2021
Showing 2 changed files
View
1
■■■■
README.md
 
Bot to connect badge to IRC for sharing and validating codes
 
simply git clone this repo
make sure you have the correct interface at top of script (default is /dev/ttyACM0)
 
````
php bot.php
 
View
13
bot.php
}
 
$rand = substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil(8/strlen($x)) )),1,8);
 
// announce self to channel
$myCode = get_own_code();
if(!isset($myCode) || $myCode == "")
die("Please contact 0xRoM on discord for help fixing this issue!");
 
$socket = fsockopen("ice.uplinkcorp.net", 6667);
// Send auth info
// fputs($socket, "PASS " . $password . "\n");
fputs($socket, "NICK Badge-" . $rand . "\n");
fputs($socket, "USER Badge-" . $rand . " 0 * :DC29 Badge Bot\n");
fputs($socket, "JOIN #theSignal\n"); // Join channel
 
// announce self to channel
$myCode = get_own_code();
if(!isset($myCode) || $myCode == "")
die("Please contact 0xRoM on discord for help fixing this issue!");
 
 
fputs($socket, "PRIVMSG #theSignal :!req " . $rand . " " . $myCode . "\n");
 
// Force an endless while
Buy Me A Coffee