1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut-pastebin synced 2025-06-07 14:17:26 -04:00

Prep for move to otehr server

This commit is contained in:
Ryan Voots 2020-11-28 12:45:24 -05:00
parent 4967661e6b
commit 26e0575105
7 changed files with 20 additions and 2 deletions

View file

@ -36,7 +36,7 @@ weight="2.5"
# weight="1.0"
[announce]
host="192.168.196.2"
host="192.168.32.1"
port="1784"
protocol="perlbot"

View file

@ -1 +1 @@
951231
872665

View file

@ -59,10 +59,14 @@ sub get_eval {
} else {
# connect to server
my %futures;
$memd->set($paste_id, {status => 'running', output => {}});
my $server = $self->eval_connect(sub {
my ($loop, $err, $stream) = @_;
print "Error? $err?\n";
my $reader = $self->get_eval_reader($stream);
my %output;

View file

@ -13,6 +13,8 @@ sub announce {
my $self = shift;
my ($channel, $who, $what, $link) = @_;
return if (length($who) > 16);
printf "Sending to %s:%s = %s\n", $self->config->{host}, $self->config->{port}, "$channel\x1E$link\x1E$who\x1E$what\n";
my $socket = IO::Socket::INET->new( PeerAddr => $self->config->{host}, PeerPort => $self->config->{port} )
or die "error: cannot connect to announce server: $! ".$self->config->{host} . ":" .$self->config->{port};

View file

@ -27,3 +27,8 @@ html, body, #content {
.options label:not(:first-child) {
padding-left: 2em;
}
pre {
color: #000;
background-color: #FFF;
}

View file

@ -14,6 +14,7 @@
<link rel="stylesheet" href="/static/bs-336/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<!-- <script src="/static/bs-336/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> -->
<script async defer data-website-id="5051ad97-4619-499d-bce1-d0f676b1f17d" src="https://perl.bot/umami/umami.js"></script>
<title>Perlbot Pastebin</title>
[% PROCESS body_style %]
</head>
@ -22,6 +23,7 @@
[% PROCESS body %]
</div>
</body>
</html>

View file

@ -27,6 +27,11 @@
font-family: "AnonymousPro";
src: url("/static/fonts/AnonymousPro-Regular.woff2") format('woff2');
}
pre {
color: #000;
background-color: #FFF;
}
</style>
[% END %]