summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2014-12-04 13:11:28 +0100
committerJulien Dessaux2014-12-04 19:53:24 +0100
commit6f87407bfcc7c8bdef3d23f96fa13c15c0d7a9cb (patch)
tree35f609160633a2f8b82197ea388cb287dccb3d44
parentUpdated bot configuration (diff)
downloadavalon-arthur-6f87407bfcc7c8bdef3d23f96fa13c15c0d7a9cb.tar.gz
avalon-arthur-6f87407bfcc7c8bdef3d23f96fa13c15c0d7a9cb.tar.bz2
avalon-arthur-6f87407bfcc7c8bdef3d23f96fa13c15c0d7a9cb.zip
Protocol update
-rw-r--r--Avalon.pm5
-rw-r--r--README.markdown16
2 files changed, 17 insertions, 4 deletions
diff --git a/Avalon.pm b/Avalon.pm
index 6940c01..8fd76d8 100644
--- a/Avalon.pm
+++ b/Avalon.pm
@@ -1,6 +1,6 @@
package Bot::BasicBot::Pluggable::Module::Avalon;
{
- $Avalon::Arthur::VERSION = '0.01';
+ $Avalon::Arthur::VERSION = '0.02';
};
use strict;
@@ -34,6 +34,7 @@ sub told {
when ("UNREGISTERED") {}
when ("GAMESTART") {}
when ("ROLE") {}
+ when ("EVIL") {}
when ("KING") {}
when ("RULENOW") {}
when ("TEAM") {}
@@ -47,6 +48,8 @@ sub told {
when ("WINNERSIDE") {}
when ("INFO") {}
when ("GAMEURL") {}
+ when ("ERR_BAD_ARGUMENTS") {}
+ when ("ERR_BAD_DESTINATION") {}
when ("ERR_NICK_RESERVED") {}
when ("ERR_PROTOCOL_MISMATCH") {}
when ("ERR_BANNED") {}
diff --git a/README.markdown b/README.markdown
index 6bf087f..abc8f38 100644
--- a/README.markdown
+++ b/README.markdown
@@ -64,8 +64,8 @@ Upon registration, the entire irc identification string is recorded (for example
registration for this nickname, your registration will be answered by an ERR_NICK_RESERVED message. If your protocol_version mismatches Arthur's, your
registration will be answered by an ERR_PROTOCOL_MISMATCH message. If the couple (nick, *bot_version*) is banned, arthur will answer with ERR_BANNED.
-#### REGISTERED
-REGISTERED message is sent by arthur to confirm your registration. This will also trigger an INFO message on the #avalon game channel.
+#### REGISTERED [nick]
+REGISTERED message is sent by arthur on the #avalon game channel to confirm your registration and announce it to all participants.
#### UNREGISTER [now]
UNREGISTER message is sent by clients to specify their intention not to participate in the next game. The optionnal parameter *now* specifies the game is to
@@ -79,11 +79,17 @@ UNREGISTERED message is sent by arthur to confirm your unregistration. This will
#### GAMESTART *nick* *nick* ...
GAMESTART message is sent by arthur on the #avalon game channel to mark the start of the game. The parameters of this command are the clients in playing order.
+10 seconds after the GAMESTART message is issued, the game will effectively start by sending ROLE and KING messages. If any new REGISTER or UNREGISTER messages
+are received during this time lapse and if there are still enough participants for a game, a new GAMESTART message is sent and this timer restarts from 10.
+
#### ROLE *role* [nick]
ROLE message is sent right after the GAMESTART message to tell each client it's *role* which can be either : GOOD, MERLIN, EVIL, ASSASSIN. The *nick* parameter
is unused in this scope
ROLE message is also sent by arthur at the end of the game on the #avalon game channel.
+#### EVIL *nick* *nick*
+EVIL message is sent to evil players and MERLIN right after roles have been announced by arthur.
+
#### KING *nick* *number* *failed_votes*
KING message is sent by arthur on the #avalon game channel to signal the new king. *number* is the number of teammates the king must designate to go on the
quest. *failed_votes* is the current number of failed votes in a row, after 5 failed votes in a row the EVIL side wins. When the KING message is issued, the client has 15 seconds to designate it's team.
@@ -134,7 +140,7 @@ KILL message is sent by the ASSASSIN to designate *nick* as MERLIN.
WINNERSIDE message is sent by arthur to designate the winner's side at the end of the game. Winning nicks are given as arguments for posterity and glory.
#### INFO *stuff*
-INFO messages are sent at various points by arthur to comment on what is happening : a bot registers for the next game, a bot misbehaves, etc. Those messages can
+INFO messages are sent at various points by arthur to comment on what is happening : a bot misbehaves, etc. Those messages can
be safely ignored and are only provided for additional entertainment.
#### GAMEURL *url*
@@ -142,6 +148,10 @@ GAMEURL message is sent by arthur on the #avalon game channel to provide the gam
### Errors
+#### ERR_BAD_ARGUMENTS
+
+#### ERR_BAD_DESTINATION
+
#### ERR_NICK_RESERVED
#### ERR_PROTOCOL_MISMATCH