Pytasserver

Pytasserver

Please use this forum to set up matches and discuss played games.

Moderator: Moderators

User avatar
tizbac
Posts: 136
Joined: 19 Jun 2008, 14:05

Pytasserver

Post by tizbac »

I have been working for some months on a new python server and now seems to be almost finished , you can download it from git://tiz.ath.cx/pytasserver.git
Actually also if it is written in python it will NOT work on windozÔé¼ cause it uses some linux only functions and it requires a mysql database.
It has full ChanServless channel management, channel ip-account bans, channel ip-account mutes, ip bans controlled through a separate server and command specific flood limit.
I'd like that it gets deployed at least as backup server for now :-)
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Pytasserver

Post by Neddie »

I say, we alternate uber and pytas every eight hours.
User avatar
tizbac
Posts: 136
Joined: 19 Jun 2008, 14:05

Re: Pytasserver

Post by tizbac »

I think my server is more suitable for backup server, cause it has a special mode that allows users to connect without register and at the same time moderators to register accounts and get moderator flag :-)
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Re: Pytasserver

Post by MelTraX »

Did you host one anywhere so we can test it a bit?
User avatar
tizbac
Posts: 136
Joined: 19 Jun 2008, 14:05

Re: Pytasserver

Post by tizbac »

It' the one that we used for testing tiz.ath.cx:8200 / tizbac.dyndns.org:8200
Andrej
Posts: 176
Joined: 13 Aug 2006, 18:55

Re: Pytasserver

Post by Andrej »

Can you fix indentation please?
Actually i am mot sure if it happens on my side only but i am getting stuff like mixed tabs and spaces..

Example:

What is supposed to be:

Code: Select all

for s in list(self.clients.keys()):
  if s.fileno() == fd[0]:
    newsocket = s
    iR.append(newsocket)
Shows up as:

Code: Select all

for s in list(self.clients.keys()):
  if s.fileno() == fd[0]:
newsocket = s
iR.append(newsocket)
and fails with some variable newsocket referenced before assignment error

Also i was getting crashes in Main.run on:
(stuff like getting different random errors every time)

Code: Select all

self.database.query("SELECT name,founder,operators,accountmutes,topic,password,id,ipmutes,accountbans,ipbans FROM channels")
res = self.database.store_result()
I tried

Code: Select all

db = mysql.connect("localhost", "root", "passwordpassword", "pytasserver")
mysql.query("SELECT name,founder,operators,accountmutes,topic,password,id,ipmutes,accountbans,ipbans FROM channels")
ret = mysql.store_result()
which succeeded every time.

I was raging/messing around a while then i noticed

Code: Select all

thread.start_new_thread(self.connectionpingthread,())
connectionpingthread then calls sd.ping.
Unlike the other methods query and store_result where you mess with synchronisation by lock.acquire/release the ping method has none.

After commenting out the start_new_thread call everything magically worked fine..
Is it possible that there is some weird race condition whatever thing going on?
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Pytasserver

Post by aegis »

MelTraX wrote:Did you host one anywhere so we can test it a bit?
nobody ever volunteered to test mine; I had to at least ask :/
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Re: Pytasserver

Post by MelTraX »

I'm testing yours for days now and posted a bugreport in your thread.. Haven't really been around while you first released uberserver.
User avatar
tizbac
Posts: 136
Joined: 19 Jun 2008, 14:05

Re: Pytasserver

Post by tizbac »

Andrej: the bug on loading is a known mysql bug and i can do nothing about it, just reload 2 times and it'll start

Yes i've used mixed spaces and tabs but doesn't cause any problems on all python enviromnents that i have
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Pytasserver

Post by lurker »

I think a python tab is defined to 8 spaces as part of the language.
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Re: Pytasserver

Post by MelTraX »

By the way: If it stands for "Python TA Spring Server" please find a way to get rid of the TA. :D
User avatar
tizbac
Posts: 136
Joined: 19 Jun 2008, 14:05

Re: Pytasserver

Post by tizbac »

The name is the last thing to fix :P
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Pytasserver

Post by Neddie »

Python Tizbac Adamantium Success Server.
Andrej
Posts: 176
Joined: 13 Aug 2006, 18:55

Re: Pytasserver

Post by Andrej »

i tried to fix it
not 101%% sure if it works because im on windows ;_;

http://www.mediafire.com/?sharekey=5a77 ... f6e8ebb871

if that doesnt work:
[url]git://desu.no-ip.info:6667/var/repos/pytasserver[/url]
branchname "fixident"

you have no excuse for using
tabs followed by spaces followed by tabs
i mean lol what
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Pytasserver

Post by aegis »

  • that's just what happens when he:
  • copies code from me and mixes it with his own code
  • switches operating systems
  • switches text editors
  • codes while drunk
  • lets the cat help
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Pytasserver

Post by SinbadEV »

aegis wrote:
  • lets the cat help
http://www.bitboost.com/pawsense/
User avatar
tizbac
Posts: 136
Joined: 19 Jun 2008, 14:05

Re: Pytasserver

Post by tizbac »

aegis wrote:that's just what happens when he:
# copies code from me and mixes it with his own code
# switches operating systems
# switches text editors
# codes while drunk
# lets the cat help
only one is true, it's because i use both gedit and kate , the first one uses tabs, second one uses spaces
your code is just 0.1% actually and it'll be 0.0 soon
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Pytasserver

Post by Tobi »

Settings->Configure kate->Editing->General, untick 'insert spaces instead of tabulators'.
Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: Pytasserver

Post by Manoa »

how to use your server ? where is the instructions ?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Pytasserver

Post by Forboding Angel »

Get uberserver from aegis.
Post Reply

Return to “Ingame Community”