| 1 |
%{ |
| 2 |
extern int m_text(), m_private(), m_who(), m_whois(), m_user(), m_list(); |
| 3 |
extern int m_topic(), m_invite(), m_channel(), m_version(), m_quit(); |
| 4 |
extern int m_server(), m_kill(), m_info(), m_links(), m_summon(), m_stats(); |
| 5 |
extern int m_users(), m_nick(), m_error(), m_help(), m_whoreply(); |
| 6 |
extern int m_squit(), m_restart(), m_away(), m_die(), m_connect(); |
| 7 |
extern int m_ping(), m_pong(), m_oper(), m_pass(), m_wall(), m_trace(); |
| 8 |
extern int m_time(), m_rehash(), m_names(), m_namreply(), m_admin(); |
| 9 |
extern int m_linreply(), m_notice(), m_lusers(), m_voice(), m_grph(); |
| 10 |
extern int m_xtra(), m_motd(); |
| 11 |
%} |
| 12 |
struct Message { |
| 13 |
const char *cmd; |
| 14 |
int (* func)(); |
| 15 |
int count; |
| 16 |
int parameters; |
| 17 |
}; |
| 18 |
%% |
| 19 |
NICK, m_nick, 0, 1 |
| 20 |
MSG, m_text, 0, 1 |
| 21 |
PRIVMSG, m_private, 0, 2 |
| 22 |
WHO, m_who, 0, 1 |
| 23 |
WHOIS, m_whois, 0, 4 |
| 24 |
USER, m_user, 0, 4 |
| 25 |
SERVER, m_server, 0, 2 |
| 26 |
LIST, m_list, 0, 1 |
| 27 |
TOPIC, m_topic, 0, 1 |
| 28 |
INVITE, m_invite, 0, 2 |
| 29 |
CHANNEL, m_channel, 0, 1 |
| 30 |
VERSION, m_version, 0, 1 |
| 31 |
QUIT, m_quit, 0, 2 |
| 32 |
SQUIT, m_squit, 0, 2 |
| 33 |
KILL, m_kill, 0, 2 |
| 34 |
INFO, m_info, 0, 1 |
| 35 |
LINKS, m_links, 0, 1 |
| 36 |
SUMMON, m_summon, 0, 1 |
| 37 |
STATS, m_stats, 0, 1 |
| 38 |
USERS, m_users, 0, 1 |
| 39 |
RESTART, m_restart, 0, 1 |
| 40 |
WHOREPLY,m_whoreply, 0, 7 |
| 41 |
HELP, m_help, 0, 2 |
| 42 |
ERROR, m_error, 0, 1 |
| 43 |
AWAY, m_away, 0, 1 |
| 44 |
DIE, m_die, 0, 1 |
| 45 |
CONNECT, m_connect, 0, 3 |
| 46 |
PING, m_ping, 0, 2 |
| 47 |
PONG, m_pong, 0, 3 |
| 48 |
OPER, m_oper, 0, 3 |
| 49 |
PASS, m_pass, 0, 2 |
| 50 |
WALL, m_wall, 0, 1 |
| 51 |
TIME, m_time, 0, 1 |
| 52 |
REHASH, m_rehash, 0, 1 |
| 53 |
NAMES, m_names, 0, 1 |
| 54 |
NAMREPLY,m_namreply, 0, 3 |
| 55 |
ADMIN, m_admin, 0, 1 |
| 56 |
TRACE, m_trace, 0, 1 |
| 57 |
LINREPLY,m_linreply, 0, 2 |
| 58 |
NOTICE, m_notice, 0, 2 |
| 59 |
LUSERS, m_lusers, 0, 1 |
| 60 |
VOICE, m_voice, 0, 2 |
| 61 |
GRPH, m_grph, 0, 2 |
| 62 |
XTRA, m_xtra, 0, 2 |
| 63 |
MOTD, m_motd, 0, 2 |