Difference between revisions of "Autopilot/Development"
From #openttdcoop wiki
(→rfc conform) |
m (tidy-up) |
||
Line 1: | Line 1: | ||
− | + | Outline of future autopilot development | |
− | == | + | == Aims == |
* Information and automation | * Information and automation | ||
* minute-to-minute management of the game | * minute-to-minute management of the game | ||
Line 8: | Line 8: | ||
* modular / customizable (without the need of editing ap source directly) | * modular / customizable (without the need of editing ap source directly) | ||
− | == | + | == IRC bot == |
− | === | + | === RFC compliance === |
* use [http://tcllib.sourceforge.net/doc/irc.html irc package] (0.6 or later) from [http://libtcl.sourceforge.net/ tcllib] (1.10 or later) | * use [http://tcllib.sourceforge.net/doc/irc.html irc package] (0.6 or later) from [http://libtcl.sourceforge.net/ tcllib] (1.10 or later) | ||
* standard eol-style: crlf (handled by irc package, however allow this to be configured as some networks are not rfc conform e.g. euirc.net) | * standard eol-style: crlf (handled by irc package, however allow this to be configured as some networks are not rfc conform e.g. euirc.net) | ||
Line 15: | Line 15: | ||
* join channel only after /end of MOTD received | * join channel only after /end of MOTD received | ||
− | === | + | === Important callbacks === |
* '''376''' /end of MOTD (code to join channel in this callback) | * '''376''' /end of MOTD (code to join channel in this callback) | ||
* '''332''' joined channel (send /NAMES to keep internal nick list of channel) | * '''332''' joined channel (send /NAMES to keep internal nick list of channel) |
Revision as of 10:24, 22 August 2008
Outline of future autopilot development
Aims
- Information and automation
- minute-to-minute management of the game
- provide admin / website with information
- bridge to irc / irc bot
- modular / customizable (without the need of editing ap source directly)
IRC bot
RFC compliance
- use irc package (0.6 or later) from tcllib (1.10 or later)
- standard eol-style: crlf (handled by irc package, however allow this to be configured as some networks are not rfc conform e.g. euirc.net)
- ping reply asap (handeld by irc package)
- join channel only after /end of MOTD received
Important callbacks
- 376 /end of MOTD (code to join channel in this callback)
- 332 joined channel (send /NAMES to keep internal nick list of channel)
- 353 reply from /NAMES (/NAMES response can appear multiple times depending on the number of clients in the channel, accumulate them)
- 366 /end of NAMES (process the accumulated list of channel nicks)
- MODE a mode change occured, send /NAMES to update the internal list
- NICK nickchange, send /NAMES
- QUIT a user from our channel quit, send /NAMES
- PART a user from our channel left, send /NAMES
- KICK we were kicked from the channel
- INVITE we have been invited to a channel
- PRIVMSG a channel or private message (detect private message by comparing [target] with the bot's irc nick name, do this case insensitive)