exit(4);
}
+// Set the permissions so someone else doesn't jump into our connection.
+chmod($sockname, 0600);
+
// We need to get a connection to the Citadel server going now.
$ctdlsock = fsockopen("uncensored.citadel.org", 504, $errno, $errstr, 30);
if (substr($talkback, 0, 1) == "1") do {
$buf = fgets($ctdlsock, 4096);
- socket_write($msgsock, $buf, strlen($buf));
+ if (!$buf) {
+ $buf = "000\n" ;
+ }
+ else {
+ socket_write($msgsock, $buf,
+ strlen($buf));
+ }
} while ($buf != "000\n");
}