Official Soldat Forums

Soldat Fans => Fan Apps => Topic started by: zakath on April 30, 2010, 05:27:25 am

Title: Public Streambot 2.06
Post by: zakath on April 30, 2010, 05:27:25 am
Thought I might release this as it might be useful now when BE is in jeopardy. Its what I use to manage my publics servers and makes it easier to manage a large amount of servers as you can keep track what is happening in all servers at the same time.
What it does is basically onnects to multiple servers and echos the action going on there to irc if you want to check out it in action check #soldat.nordic.live or #purectf on quakenet and http://www.soldatnordic.net/ and http://server.nandt.org for the stats page in action. its quite similar to my gatherbot if you have used that one.

Features:
- Generates stats stored in a mysql database for all normal gamemodes, you can specify if a server should have stats or not.
- Echos whats happening on server to irc.
- Teambalances if you want to.
- webpage template to show the stats.
- Ingame Advertising specified in config file

Requirements:
- Its written in c++ for *nix server and you need libmysqclient to compile it.

Ingame Commands:
- !admin - calls for a admin(it echoes that it needs an admin on the server at irc)
- !stats - shows stats

Irc Commands:
- !say <server> <msg> - says a message to the specified server
- !status - shows status of the servers
- !players - show the players on the servers
- !ban <server> <player> - bans a player from the server
- !stats <mode> <nick> - shows statistics for mode and nick.
Title: Re: Public Streambot 1.0
Post by: Beowulf Agate on July 28, 2010, 09:08:43 am
I have a problem with running Streambot under linux (Debian). After ./streambot i have an error message:

Code: [Select]
Starting Bot
terminate called after throwing an instance of 'GSQL::GSQLException'
  what():  MySQL ERROR : Failed to connect to database : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
Aborted

I don't have MySQL server installed on my vps, but its only needed for stats. zakath didn't add an option to disable mysql connecting, so he suggested to comment out part of a code from streambot.cpp file, but it still showing an error:

Code: [Select]
    readcfg("streambot.cfg");
      if(config.mysqlhost != "")
        {
/*setStatsInfo(config.mysqluser, config.mysqlpass,config.mysqlhost,config.mysqlport,config.mysqldb,config.inactivedays,config.mingames,config.degradation);
initStats();*/
}

    runConfig();

Any idea why should i do to run this bot without MySQL server?
Full streambot.cpp file (in txt format) attached.
Title: Re: Public Streambot 1.0
Post by: zakath on July 28, 2010, 09:28:56 am
you need to comment out the calls to setStatsInfo as well which is called on two places in that file on line 847 and on line 936 afaik
Title: Re: Public Streambot 1.0
Post by: Beowulf Agate on July 28, 2010, 09:47:56 am
Now Streambot works fine. Thank you very much.
Title: Re: Public Streambot 1.0
Post by: zakath on July 28, 2010, 09:54:42 am
np ;)
Title: Re: Public Streambot 2.03
Post by: zakath on September 14, 2011, 04:03:18 am
Updated it to support 1.6 remember to drop tables.
Title: Re: Public Streambot 2.04
Post by: zakath on November 25, 2011, 07:39:31 am
Update:
- Fixed rejoining errors related to nick already taken
- Added smart teambalancing which uses stats to make more even teams
- Changed stats collecting to be more accurate and reliable
Title: Re: Public Streambot 2.04
Post by: gol on January 17, 2013, 10:39:51 am
Thank you very much.
Title: Re: Public Streambot 2.04
Post by: Leo on February 05, 2014, 07:55:50 am
Guys, if you are in Ubuntu you have to edit the Makefile and change:

MAIN = streambot
to
MAIN = streambot`mysql_config --cflags --libs`

for this to work. The same goes for gatherbot, just change "streambot" to "gatherbot". Thanks to zakath for fixing this  :)
Title: Re: Public Streambot 2.06
Post by: zakath on February 05, 2014, 12:19:28 pm
New update:
Added option to filter out chatonly on per server basis so another YES/NO at the end of the SERVER lines.