Jump to content


Photo

AssaultCube IRC Relay Bot v0.7


  • Please log in to reply
25 replies to this topic

#1 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 04 June 2011 - 02:38 PM

This was taking too much time and I still wanted to fix/add something, but because I lack time lately, I thought to just release what I've got and update it when I have some time to spare. It's better than the previously released version anyway, so nothing to lose in updating.

Anyway, if you wonder what is this, read this thread: http://www.exoduscom...y-bot-outdated/
as I don't want to write everything again :)/>

Note that some information might be outdated.

You can find a list of changes and instructions on how to run it inside the zip file.


Important notes:

- Because I'm kinda noob at C/C++, the changes I made to the server sources adds some instability to it, meaning that it will crash anytime (Updated: the crashes has been fixed now, just update to the latest beta through "!updatebeta NOW" from IRC). That's not happening as often as it sounds, as sometimes I've seen our servers run for weeks without problems, but it can happen anytime really. I think I know why it does that, but just don't have the time and/or experience to fix it. Anyway, the bot automatically restarts it in case of a crash.

- If you are using the old version I posted in that other thread and want to update, please don't use the !update feature. I've made too many changes so your server would not be working after an automatic update. Nothing big, though, just read the included instructions and you should be ready to go in minutes, through a manual update.

- If I sent you the bot privately in the last year or so, you might want to do an "!updatebeta NOW" to update it to latest build.

- Although you shouldn't need to make any changes to your server config (except the ones noted in the help file), some people reported that the bot isn't working well if you use a configuration in a cfg file. You just need to "convert" it to a command-line version and all should work fine.

EDIT:
Because it seems like some people have problems with the included help file in .chm format, I have converted it into a single html file that you can read with any web browser. I've attached it to this post, so download that if you can't open chm files.


Changes since version 0.3:

v0.7.0
- Now server executable is built-in in the bot executable. This allows for:
--- Starting and stopping of server is handled by the bot
--- If server crashes the bot detects it and automatically restarts it
--- logfile reading is more precise now, as it always checks for end-of-line
- Now only RCON port is needed as IP is always used as 127.0.0.1
- Changed most thread messages from logline() to printf() in ac_server.exe to increase stability
- Changed some RCON debug messages to be more explicative and added others in ac_server.exe
- Added option to save logfile
- Added option to set up server commandline
- Added option to show console output
- Improved GUI log:
--- Now log lines specifies time
--- Now the log window automatically scrolls
- Added !kickban command, to !tempban and !banip with one command
- Added !restartserver command
- Now date is automatically added to ban reason
- Fixed temp-ban message with nicks that starts with a number
- Removed logfile stuff (GUI elements, settings)
- Added support for AC 1.1
- Various other small fixes
- Made a CHM guide instead of a .txt file.


v0.6.0
- Added !tempban
- Added Host Messages system (Advertising)
- Changed the way the RCON command "msg" is sent, so now it supports any kind of message


v0.5.0
- Added RCON support
- Added !msg command
- Added !kick command
- Now all join events collects clientID too
- Now disconnect events are based on clientID
- Now !pl shows ID instead of IP
- Now !pi shows ID too
- Added errorlog filename, forgot to add that in other versions. it wouldnt be able to log crashes without that


v0.4.0
- Added !banlog and !banlogpage commands
- Added support for OPER nickname
- Added support for maintaining a players list array, so new commands can be added
- Added !playerinfo command
- Added support for ADMINLOGIN, PASSLOGIN and UNBANLOGIN events
- Added support for VOTECALLFAIL
- Added Nick Change event support and logging
- Now !players shows all player nicks and IPs
- Now Build number is shown in About tab and when the bot joins the channel
- Added "nick in use" detection and handling for IRC
- Added DisconnectLog code on GUI, as it wasn't properly added in 0.3
- Smarter Browse starting directory now points to the selected file/directory
- !pl now reports "There are no players in-game at this time." if there are no players in-game, instead of reporting 0 players
- Removed some unused code



Have fun and report any bug you may find :)/>

Attached Files



#2 DarKnoT

DarKnoT

    I'm too young to die

  • Members
  • 6 posts

Posted 25 August 2011 - 09:15 AM

Thanks dude, I'll test it right now and I'll feedback

#3 DarKnoT

DarKnoT

    I'm too young to die

  • Members
  • 6 posts

Posted 29 August 2011 - 05:44 PM

Well my bot can't stay on an irc because of excess flood :/


07:40:37°pm (BCFH-Servers) ACIRCBot (for AC 1.1.0.4) v0.7.0 (Build 86) started
07:40:37°pm (BCFH-Servers) server...
07:40:37°pm (BCFH-Servers) started.
07:40:37°pm (BCFH-Servers) Restarting...
07:40:39°pm (BCFH-Servers) restarted.
07:40:41°pm [Quit] BCFH-Servers (~BCFH-Serv@dedicated03.roxservers.com) has quit IRC (Excess Flood)


#4 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 30 August 2011 - 05:13 PM

Do you have IRCOP powers there? That's a common behavior when joining public IRC servers, you can only output a set number of lines per second/minute.

Anyway I also see the output being truncated there (the word "server"), is that a copy/paste problem or what?

#5 DarKnoT

DarKnoT

    I'm too young to die

  • Members
  • 6 posts

Posted 31 August 2011 - 02:46 PM

Yes I am op there, so these bots have been deleted but I've still one bot working good except he only read the primary server IP. The bot should connect to a specify IP

#6 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 01 September 2011 - 02:46 PM

I don't get what you mean. For "server IP" you mean IRC server or AC server?

#7 DarKnoT

DarKnoT

    I'm too young to die

  • Members
  • 6 posts

Posted 01 September 2011 - 03:40 PM

I don't get what you mean. For "server IP" you mean IRC server or AC server?


The AC server, my hoster got a machine with an ip (91.121.223.73:28763) and this machine got other ip or ports and the bot is working on the machine ip and not mine (91.121.49.60:28763)

#8 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 11 September 2011 - 10:28 PM

There should not really be a problem, or none that I can see (so explain it in more details if I just don't get it).
If you need a different IP for your server then you need to setup the server to use that IP, the bot just runs it with the configuration give it, so shouldn't really be a problem of the bot itself.
I forgot if the AC server allows you to set its own IP, but if not there's nothing I can do about it (unless of course the server sources are modified to support that).

So basically the bot runs the server and reads the log from its output (so no connection is made). To allow RCON (used to send !msg !kick and !ban), the bot needs to connect to the server via a specified port, but that's done using the 127.0.0.1 address. Then the bot connects to the IRC server of your choice. That's the only part where the bot actually makes a connection to the internet, and the only part that I can work on if you have IP problems.

#9 gRamps

gRamps

    I'm too young to die

  • Members
  • 1 posts

Posted 16 January 2012 - 02:52 PM

any version for linux?

#10 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 16 January 2012 - 06:26 PM

I have not enough time for that, plus the bot uses some custom server modification to allow some of its features, which would require me to learn how to do that on Linux.
A logging-only bot (without commands like !msg and !kick) would be much easier to port, but again I'm not sure if I'll ever have time for that :<

#11 Jlinkz

Jlinkz

    I'm too young to die

  • Members
  • 1 posts

Posted 18 March 2012 - 04:55 AM

I clicked on the acircbot.zip and my antivirus said it was a trojan

Details:
Web Page: http://www.exoduscom...e&module=att...
Detected viruses: Gen:Trojan.Heur.JP.Lu0@aG0EZaoi



#12 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 18 March 2012 - 08:14 PM

Ah ignore that. For some reason some of my programs are detected as something malicious lol. Report it as safe if your antivirus supports that, and I'm sure they'll remove detection for that executable.
That's also an Heuristic detection, meaning the AV "guessed" it, maybe because that executable contains another one (the server).

#13 K!llerD0G

K!llerD0G

    I'm too young to die

  • Members
  • 1 posts

Posted 20 March 2012 - 12:15 AM

Hi. I love this bot for my server but the config\servercmdline.txt link doesn't work. I've linked it to my server_autoconfigured.bat but the title I have set with -n1 -c6 (and other parameters) do not work. And for some reason if I use the .txt file instead of working directly in the server file, I can't use quotation marks for -n -n1 -n2 because it shows up on the server. The bot works fine but I would like my title to be in the server and the program either erases it or it doesn't get the file. Am I doing this right? Thanks! --K!llerD0G on AssaultCube

#14 VallDiGna

VallDiGna

    I'm too young to die

  • Assault Cube Moderators
  • 46 posts

Posted 03 April 2012 - 05:08 PM

Hi. I love this bot for my server but the config\servercmdline.txt link doesn't work. I've linked it to my server_autoconfigured.bat but the title I have set with -n1 -c6 (and other parameters) do not work. And for some reason if I use the .txt file instead of working directly in the server file, I can't use quotation marks for -n -n1 -n2 because it shows up on the server. The bot works fine but I would like my title to be in the server and the program either erases it or it doesn't get the file. Am I doing this right? Thanks! --K!llerD0G on AssaultCube

Don't use commandline.txt. Try to put put all server parameters on a .bat file and the run it. For example...
myserver.bat
bin_win32\ac_server.exe -n"Test only" -punknown -V -T -Nserver
pause
Or you can just go to windows commandline and execute this over the /bin_win32 folder
ac_server.exe -n"Test only" -punknown -V -T -Nserver
pause

HardeR BetteR FasteR StrongeR
Posted Image

#15 blueberry

blueberry

    I'm too young to die

  • Assault Cube Moderators
  • 28 posts

Posted 13 October 2012 - 10:15 PM

I noticed when a player joins, it says something like this:

<ACIRCBot> Player <username> joined the game. Client version is valid: 1104|840

However, when the client version is 1104|1424 it says suspicious or invalid (I can't remember exactly what it says). Problem is, 1424 is the default OS X client. And similarly, 804 is the default Linux client I believe. The only one that is valid by the bots standards is the Windows client. Please add 1424 and 804 as valid clients as well.

#16 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 13 October 2012 - 10:48 PM

Yeah I only added that quickly and have no chance to check it on Mac as I don't have one. Thanks for the info :)

#17 blueberry

blueberry

    I'm too young to die

  • Assault Cube Moderators
  • 28 posts

Posted 14 October 2012 - 08:05 AM

Yeah I only added that quickly and have no chance to check it on Mac as I don't have one. Thanks for the info :)

No problem. Also, I just realized I posted in the completely wrong thread. Sorry :blush:

Edit: Oh wait... maybe not. I'm not sure :P

#18 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 14 October 2012 - 03:26 PM

Yeah don't worry, it's the right place.

#19 blueberry

blueberry

    I'm too young to die

  • Assault Cube Moderators
  • 28 posts

Posted 15 December 2012 - 10:11 PM

One last fix to the client joins. The first number is the version so 1103|840 would still be a Windows client, but just playing on 1.1.0.3. Therefore, the number before the pipe should be ignored when determining suspicious clients. Clients that are default but outdated are coming up as suspicious client joins.

#20 Cunin

Cunin

    :U

  • Administrators
  • 2,614 posts
  • Steam:
    Cunin
  • Location:
    Italy

Posted 19 December 2012 - 04:16 PM

Yes I made it so anything not latest is defined as suspicious, although that's not always true. I mean, there are cases where, like that one, one player has just not updated to the latest release, which is weird as it has been released years ago anyway.

Also, I'm not sure how that number is made (I did not check sources for that yet), but I guess anyone can just make up their own number when compiling the source for the client?

What I mean with that is that, even if the client number is legit, the player could be cheating, but also that even if the client number is marked as suspicious, the player could be as legit as Mother Teresa.

"Suspicious", here, should never be used as proof for cheating or innocence, but just as an additional information given to the moderators, being it for statistical purposes, being it to check if a client is on Linux or whatever other OS, or just to add the icing on the cake in case someone is considered to be 99% a cheater. There also could exist a specific cheating client with its own, personalized, version number. In that case this warning can be used to instantly ban.

So, what I'm trying to say here, is that if someone is marked as suspicious that doesn't mean he should be banned. This information can give out other useful info that can let moderators track down specific clients, specific users, but alone usually means nothing.

I think everyone should update to latest version of the game, at least to make the game fair for everyone. The way AssaultCube is made, allows too many things to be decided by the client instead that by the server (which in turn allows people with an usually too high ping to play the game, also), and I think fairplay is also using the same client as everyone else.

So I'd like it to mark anything that's not latest as suspicious, although I can understand that word can create some problems for some people. If you have a better one to use at the place of "suspicious" then let me know :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users