Warning: session_start(): open(/var/lib/php/sessions/sess_6vkpcgvaop3g3jv5kq3kf5p79c, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static S sendToLocalBot(S bot, S text, O... args) {
text = format3(text, args);
DialogIO channel = findBot(bot);
if (channel == null)
fail(quote(bot) + " not found");
try {
channel.readLine();
print(bot + "> " + shorten(text, 80));
channel.sendLine(text);
S s = channel.readLine();
print(bot + "< " + shorten(s, 80));
return s;
} catch (Throwable e) {
e.printStackTrace();
return null;
} finally {
channel.close();
}
}
static S sendToLocalBot(int port, S text, O... args) {
text = format3(text, args);
DialogIO channel = talkTo(port);
try {
channel.readLine();
print(port + "> " + shorten(text, 80));
channel.sendLine(text);
S s = channel.readLine();
print(port + "< " + shorten(s, 80));
return s;
} catch (Throwable e) {
e.printStackTrace();
return null;
} finally {
if (channel != null)
channel.close();
}
}