Jump to content


Photo

AssaultCube IRC Relay Bot v0.3


  • Please log in to reply
21 replies to this topic

#1 Cunin

Cunin

    :U

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

Posted 07 August 2009 - 06:04 PM

This is the official support thread for ACIRCBot.
It's a tool that would be useful for server owners only, so don't bother to download it if you're only a player.

Also, this is only for Windows 32/64 bit at the moment.



INTRODUCTION

This is an IRC relay bot made for AssaultCube. Its scope is to relay events happening in-game to an IRC channel. This allows server administrators to watch what's happening in-game without the need of being in-game. Players can also see if it's the right moment for them to join your server ;)



PRE-REQUISITES

The bot reads gamelogs produced by the AssaultCube server, parses them and then sends them in a humanly-readable form on IRC. To make things easier (for me), I modified the sourcecode of the server to produce easily parsable logs.
In this archive you should have found the modified 1.0.4 sources (I only included the ones that I actually modified) and a Win32 executable of the server (ac_server.exe). You need to replace your server's executable with the one supplied to let the bot work.
The only modifications I've done are a simple change to output logs, and the inclusion of the code that can be found here:
http://woop.us/2075
for the map blacklisting.
You also need to have access to your server (preferably via RDP), to let you put the bot's executable and configure it via its GUI (Graphical User Interface).



FEATURES

- Fast and low resource usage. It should never use even 1% of your CPU power, and only a few Mb of RAM.

- Full IRC support. You can set server, port, nickname, identify password, channel, channel key, IRCOP password. It also will auto-reconnect on connection loss (even though it fails sometimes :P )

- Fully configurable through its GUI -or- from IRC with an extensive set of commands, no complicate command-line configuration.

- Fully customizable output format, and the possibility of selectively enable/disable each event's log output, through IRC or via its GUI.

- Total control over EVERY IRC command. You can easily set what IRC mode an user needs to use any command.

- Easy update. You just need to type '!update NOW' from IRC to let it check for an update. If one it's found, it'll automatically download and apply it.

- You can see the following event from IRC: kills, teamkills, votes, joins, quits, all chat, team chat, disconnects, match starts.

- Additionally, you can use 2 commands to see how many players are in-game, the game mode and the map played in that moment.

(the events support and the informations displayed will be expanded in the next releases)


Example of output:
Attached File  ACIRCBot_output.png   29.11KB   92 downloads


Use this thread for bug reports ONLY please. There's so much that can be added to the bot still, but it's a work-in-progress so I already planned to add lots of features in the future releases.
Also, read the included ReadMe file before asking any questions.

Enjoy :)

EDIT: I noticed that the uploaded version had our old IRC server by default, I've updated it to our current one (irc.exoduscommunity.com) and updated the archive. Should still work, but this is the right one. Sorry.

Attached Files



#2 3663Nixon

3663Nixon

    Newbie

  • Consultants
  • 782 posts
  • Steam:
    Nixon
  • Location:
    UK baby!

Posted 07 August 2009 - 07:28 PM

Cunin you are a genius! Good job <3
Posted Image

#3 Guest_DarKnoT_*

Guest_DarKnoT_*
  • Guests

Posted 10 August 2009 - 06:26 PM

Sorry but the bot don't work at all to me, He can connects to the irc but he can't say how many players are on my servers when it's full, !gameinfo doesn't work too ...

#4 Cunin

Cunin

    :U

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

Posted 11 August 2009 - 05:45 PM

Sorry but the bot don't work at all to me, He can connects to the irc but he can't say how many players are on my servers when it's full, !gameinfo doesn't work too ...

I hope you've read the included readme file. It needs the supplied ac_server.exe to be used in place of your own ac_server.exe, and you need to select the right logfile AFTER running the server. If you can explain me better the steps you made to make it work, I can probably help more.

#5 Guest_DarKnoT_*

Guest_DarKnoT_*
  • Guests

Posted 12 August 2009 - 12:34 PM

Now my serverlog failed to open, I can't set a serverlog to run the bot

#6 Cunin

Cunin

    :U

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

Posted 12 August 2009 - 03:15 PM

ok I don't know what problem you got there, I just run the server with the following options:

-c[numberofplayers] -f[port] -n[serverdescription] -o[serverMOTD] -r[maprotation.cfg] -x[pass]

(replace [whatever] with the relative data, without the brackets)
and the server outputs without problems in a file named like: serverlog_20090728_22.59.56_local#24558.txt

the server executable is in the \bin_win32 directory on your server directory, and you can place the bot in the previous directory (the main server directory) because the logs are stored there if you run the server with a .bat script.

So the directory structure is:

AssaultCube\ACIRCBot.exe
AssaultCube\server.bat
AssaultCube\serverlog_DATE_local#PORT.txt
AssaultCube\bin_win32\ac_server.exe

#7 NSL:undecided

NSL:undecided

    I'm too young to die

  • Members
  • 1 posts

Posted 12 August 2009 - 03:43 PM

This is very nice indeed! Just a shame it can't be used on Linux.

Would it be possible to release the source for this bot?

It would be nice to mod it so it can parse standard AC logs, so that the logs will also be compatible with the statistics system aswell :) (parses standard logs)

Edit: i have found this info on makeing an IRC bot in perl, which would mean it is cross-platform, and could parse standard logs if combined with the Games::AssaultCube module. I'll be looking into this :)

#8 Cunin

Cunin

    :U

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

Posted 12 August 2009 - 08:44 PM

I will not use Perl for my bot because it doesn't fit my needs, I also haven't used standard logs because they can't be parsed correctly and not that easily anyway, because a developer said, in AC forums, that nicknames will be able to contain spaces in them and so you can't use that as a separator anymore.
I'd like to have a switch in the server to select which kind of logs to choose from, and anyway the format I made is much easier to parse so probably that statistics system (I haven't seen it so I'm just guessing) could be easily modified to support this log format.
Anyway, I'll surely find another way to parse logs if the way I implemented wouldn't work, for any reason, in the future.

I'm sorry but as long as I'll be able to work on it, I'll not release its sources, but I'll surely consider porting it to Linux as you're the 3rd person asking for it already.
If that will ever happen, I'll make sure to report here and in AC forums.

Thanks for posting :)

#9 TriGgaS

TriGgaS

    Hey, not too rough!

  • Members
  • 146 posts

Posted 13 August 2009 - 04:24 PM

ggood job cunin, you da fuckin best ;)


I r not authorized (cries cuz he cant update NOW)

(as opposed to later =D )

#10 Guest_DarKnoT_*

Guest_DarKnoT_*
  • Guests

Posted 14 August 2009 - 03:39 PM

I can't open the logfile again.

Is it supposed to have colors on the server.bat logs?

#11 Cunin

Cunin

    :U

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

Posted 14 August 2009 - 03:46 PM

I can't open the logfile again.

Is it supposed to have colors on the server.bat logs?

i don't know what you mean, the server isn't outputting any logs?
why can't you open logs? they aren't there?

#12 Guest_DarKnoT_*

Guest_DarKnoT_*
  • Guests

Posted 16 August 2009 - 09:40 PM


I can't open the logfile again.

Is it supposed to have colors on the server.bat logs?

i don't know what you mean, the server isn't outputting any logs?
why can't you open logs? they aren't there?


No they aren't there, in the server logs it write: failed to open the logfile.

#13 Ethenal

Ethenal

    Exodus God

  • Administrators
  • 531 posts
  • Steam:
    Ethenal
  • Location:
    US of A

Posted 16 August 2009 - 10:40 PM



I can't open the logfile again.

Is it supposed to have colors on the server.bat logs?

i don't know what you mean, the server isn't outputting any logs?
why can't you open logs? they aren't there?


No they aren't there, in the server logs it write: failed to open the logfile.

Sounds like the server doesn't have write permission in said folder. Check that? I would say how, but it depends on the OS obviously.
Posted Image

#14 Cunin

Cunin

    :U

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

Posted 16 August 2009 - 10:44 PM

yeah sounds like that really, the server administrator/owner must set the ac_server.exe's permissions to let it write logs

#15 Guest_DarKnoT_*

Guest_DarKnoT_*
  • Guests

Posted 17 August 2009 - 02:20 PM

yeah sounds like that really, the server administrator/owner must set the ac_server.exe's permissions to let it write logs


Ii open the logfile only when I've a default ac_server
I'm running on vista -_-"

#16 Prulez

Prulez

    Inferno

  • Members
  • 1,850 posts
  • Steam:
    Prulez
  • Location:
    Infront of Dave2916 while listening to raven eating crispy grapes and dancing the kabouterdans

Posted 17 August 2009 - 02:26 PM


yeah sounds like that really, the server administrator/owner must set the ac_server.exe's permissions to let it write logs


Ii open the logfile only when I've a default ac_server
I'm running on vista -_- "

Tried running it as an administrator?

Posted Image


#17 Ethenal

Ethenal

    Exodus God

  • Administrators
  • 531 posts
  • Steam:
    Ethenal
  • Location:
    US of A

Posted 18 August 2009 - 03:38 AM



yeah sounds like that really, the server administrator/owner must set the ac_server.exe's permissions to let it write logs


Ii open the logfile only when I've a default ac_server
I'm running on vista -_- "

Tried running it as an administrator?

Yeah, if you're running it on Vista then chances are pretty high it'll need to be run as an administrator.
Posted Image

#18 tundra

tundra

    Nightmare

  • Assault Cube Moderators
  • 581 posts
  • Location:
    U.S.A

Posted 18 June 2010 - 07:26 PM

oh ok yay mac! =p
!bo0m $h@ckA L@ckA!

#19 DarKnoT

DarKnoT

    I'm too young to die

  • Members
  • 6 posts

Posted 28 January 2011 - 10:23 AM

Helo guys, long time no see, what's up with a new version?

#20 Cunin

Cunin

    :U

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

Posted 29 January 2011 - 02:22 PM

hey.
Well we're using the new version already, and sent it privately to people that asked for it.
If you need it for AC 1.1 I can give you the link. I always mean to do the last few things needed to release it but I always forget or have no time :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users