Author Topic: Some more information about the refresh code  (Read 1615 times)

0 Members and 1 Guest are viewing this topic.

Offline Gortaak

  • Camper
  • ***
  • Posts: 274
Some more information about the refresh code
« on: August 23, 2008, 03:21:08 pm »
Ok, so I am writing an IRC bot in ruby. I already have in the bot the refresh stuff that chrisgbk wrote for ruby. I was woundering if there is any additional information I can pull out of that refresh packet for stuff like what a player says, or if a team scores. If so, what woudl it be? If not, how would I go about getting that information?

What I am trying to do is set up my irc bot, (which already connects to the server, and stays connected) so that it can accept commands like !pause, !nextmap, ect.. Also be able to pick out when a team caps/returns so I can keep track of stats and save them in a file. (I already know how to save it in a file)

Any help on this topic is greatly appreciated.
Image removed, please read the forum rules. <--- wee i dont care
 -Grishnak -Insurgent -Atrophy


.:*DETH*:.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Some more information about the refresh code
« Reply #1 on: August 23, 2008, 03:29:42 pm »
You can get the chat and server events just by staying connected to the server admin connection and monitoring what goes on (though in your bot you would need a separate thread or to use non-blocking IO (if ruby can do it) for this so that your IRC connection doesn't get screwed up)

Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: Some more information about the refresh code
« Reply #2 on: August 23, 2008, 04:10:06 pm »
If you turn on Echo_Kills in server.ini, you can also read kills/deaths/weapons from the console in the same way.