mirror of
https://github.com/abakh/nbsdgames
synced 2026-06-15 14:55:56 -04:00
293 lines
8.6 KiB
HTML
293 lines
8.6 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Pragma" content="no-cache">
|
|
<meta http-equiv="Cache-Control" content="no-cache">
|
|
<meta http-equiv="Expires" content="0">
|
|
<title>The Bub's Brothers</title>
|
|
</head>
|
|
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#000099" alink="#FF0000">
|
|
|
|
<center><table cellspacing=0 cellpadding=0 border=0 width="95%%">
|
|
|
|
%(
|
|
externaltarget = running and ' target="new"' or ''
|
|
)s
|
|
|
|
|
|
<tr>
|
|
<td width="6%%" bgcolor="#000000"> </td>
|
|
<td bgcolor="#000000"> </td>
|
|
<td width="6%%" bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#FFFFFF"><a href="stop.html?time=%(tim)s"><img src="close.png" width=17 height=17> <font color="#FF0000" size=+1>Stop this program</font></a></td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#F0E0E0"> </td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#E0C0C0" align="center"><font size=+3><strong>The Bub's Brothers</strong></font></td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#F0E0E0"> </td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#FFFFFF"> </td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#FFFFFF" align="right">
|
|
<a href="http://bub-n-bros.sourceforge.net"%(externaltarget)s>Web Home page</a> -
|
|
<a href="name.html">Player Names & Teams</a> -
|
|
<a href="options.html?time=%(tim)s">Configuration</a>
|
|
</td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#FFFFFF" background="wave1.png"><font size=+3> </font></td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td>
|
|
<table width="100%%" cellpadding=7>
|
|
<tr>
|
|
<td width="20%%" bgcolor="#000080" align="center"><font size=+1 color="#FFFF00"><strong>New game</strong></font></td>
|
|
<td bgcolor="#C0C0FF">
|
|
<table border=0>
|
|
<tr>
|
|
<td width=48><img src="%(juststarted and 'sfbob.png' or 'bob.png')s"></td>
|
|
<td>%(
|
|
if running:
|
|
print '<form name="S" action="index.html" method="get">'
|
|
print '<input type=hidden name="time" value="%s">' % tim
|
|
print '<table width="100%" border=0><tr><td><p><strong>'
|
|
if juststarted:
|
|
print 'Server started!'
|
|
elif justconnected:
|
|
print 'Playing'
|
|
elif count == 0:
|
|
print 'No client is connected to your server at the moment.'
|
|
elif count == 1:
|
|
print 'One connected client.'
|
|
else:
|
|
print '%d connected clients.' % count
|
|
print '</strong></p></td>'
|
|
print '<td align="center"><input type=submit value="Update on connected clients"></td>'
|
|
print '</tr></table></form>'
|
|
print '<p><strong><a href="join.html?host=%s&port=%s&httpport=%s&time=%s">' % (running[0][0], running[0][1], self.httpport, tim),
|
|
print 'Join your own game now</a></strong> at <strong>%s:%s</strong></p>' % (
|
|
running[0])
|
|
##if metapublish:
|
|
## import time
|
|
## print '<p><a href="register.html?a=%s">' % time.time()
|
|
## if self.globaloptions.metapublish == 'y':
|
|
## self.has_been_published = 1
|
|
## metaquery = metaquery or []
|
|
## metaquery.insert(0, 'desc='+fndesc)
|
|
## s = 'a=' + metapublish
|
|
## if s not in metaquery:
|
|
## metaquery.insert(0, s)
|
|
## print 'Register again',
|
|
## else:
|
|
## print 'Register (after all)',
|
|
## print 'your server to the SourceForge meta-server</a><br>'
|
|
## print '<a href="register.html?d=%s">' % time.time()
|
|
## print 'Unregister your server</a>',
|
|
## print '<font size=-1>(it is unregistered automatically after some time',
|
|
## print 'when other people cannot find it, or',
|
|
## print 'if you stop it with the link <font color="#FF2000">Stop this program</font> at the top of the page)</font></p>'
|
|
)s
|
|
<form name="n" action="new.html" method="get">
|
|
<input type=hidden name="time" value="%(tim)s">
|
|
%(
|
|
if self.Game:
|
|
print '<input type=submit',
|
|
if running:
|
|
print 'value="Start another game">'
|
|
else:
|
|
print 'value="Start a new game">'
|
|
else:
|
|
print 'You need the <a href="http://bub-n-bros.sourceforge.net/download.html">complete version</a> to start a new game.<br><font size=-1>With this version you can only connect to existing servers and <font color="#FF0000">only over fast links!</font></font>'
|
|
)s
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#FFFFFF"> </td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#FFFFFF" background="wave3.png"><font size=+3> </font></td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td>%(
|
|
servers = self.getlocalservers()[:]
|
|
|
|
found = []
|
|
def show((addr, (info, ping)), found=found):
|
|
import socket
|
|
infolst = info.split(':') or ['?']
|
|
if len(infolst) >= 3:
|
|
httpport = infolst.pop(2)
|
|
else:
|
|
httpport = 'off'
|
|
print '<a href="join.html?host=%s&port=%d&httpport=%s&time=%s">' % (
|
|
addr[0], addr[1], httpport, tim)
|
|
host, port = addr
|
|
#host = socket.gethostbyaddr(host)[0]
|
|
if ping is not None:
|
|
infolst.append('ping: %dms' % int(ping*1000))
|
|
if (addr, infolst[0]) == running:
|
|
infolst.append('this is your own server')
|
|
found.append(1)
|
|
infolst = map(htmlquote, infolst)
|
|
print '<strong>%s:%s</strong></a> playing <strong>%s</strong>' % (
|
|
host, port, infolst[0])
|
|
if len(infolst) > 1:
|
|
print ' (%s)' % ' · · '.join(infolst[1:])
|
|
|
|
if servers is None:
|
|
rowspan = 1
|
|
else:
|
|
rowspan = (len(servers) or 1)+1
|
|
)s
|
|
<table width="100%%" cellpadding=7><tr>
|
|
<td width="20%%" bgcolor="#FF0080" align="center" rowspan="%(rowspan)s">
|
|
<font size=+1 color="#FFFF00">
|
|
<strong>Local games</strong>
|
|
</font>
|
|
</td>
|
|
<td bgcolor="#FFC0C0">
|
|
%(
|
|
if servers is not None:
|
|
if servers:
|
|
show(servers[0])
|
|
else:
|
|
print "(no server found)"
|
|
print '</td></tr>'
|
|
for s in servers[1:]:
|
|
print '<tr><td bgcolor="#FFC0C0">'
|
|
show(s)
|
|
print '</td></tr>'
|
|
print '<tr><td bgcolor="#FFC0C0">'
|
|
)s
|
|
<table border=0><tr>
|
|
<td width=48><img src="boob.png"></td>
|
|
<td>
|
|
%(
|
|
if running and not found:
|
|
import hostchooser, gamesrv
|
|
if gamesrv.displaysockport(gamesrv.openpingsocket()) != hostchooser.UDP_PORT:
|
|
print '<p><font size=-1>Note: your server does not appear in this list'
|
|
print 'because the UDP port %d is already in use (is another Bub & Bob server running on this machine?).' % hostchooser.UDP_PORT
|
|
print 'Use the full server address <strong>%s:%s</strong></font></p>' % running[0]
|
|
)s
|
|
<form name="L" action="index.html" method="get">
|
|
<input type=hidden name="time" value="%(tim)s">
|
|
<input type=submit value="Search again for local servers">
|
|
</form>
|
|
</td>
|
|
</tr></table>
|
|
<p><form name="J" action="join.html" method="get">
|
|
<input type=hidden name="time" value="%(tim)s">
|
|
Or connect to server:
|
|
<input type=text name="host" size=25>
|
|
(<code>host</code> or <code>host:port</code>)
|
|
<input type=submit value="Go">
|
|
</form></p>
|
|
</td>
|
|
</tr></table>
|
|
</td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#FFFFFF"> </td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#FFFFFF" background="wave2.png"><font size=+3> </font></td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td>
|
|
<table width="100%%" cellpadding=7>
|
|
<tr>
|
|
<td width="20%%" bgcolor="#008000" align="center"><font size=+1 color="#FFFF00"><strong>Internet games</strong></font></td>
|
|
<td bgcolor="#C0FFCC">
|
|
<table border=0>
|
|
<tr>
|
|
<td width=48><img src="bub.png"></td>
|
|
<td><p><a href="%(self.metaserverpage(headers))s">Go to the Internet servers page</a></p>
|
|
<p><font size=-1>Don't forget to <a href="name.html">give a name</a>
|
|
to your dragons before you join a server!
|
|
</font></p></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#000000" align="center"><img src="header.png"></td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#000000"> </td>
|
|
<td bgcolor="#000000"> </td>
|
|
</tr>
|
|
|
|
|
|
</table></center>
|
|
|
|
|
|
</body>
|
|
</html>
|