This repository has been archived by the owner on Aug 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.c
50 lines (48 loc) · 1.93 KB
/
commands.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* commands.c: A table of all IRC commands we know.
* This file is part of the Distributed Services by Andrew Miller(A1kmm), 27/8/2000.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "dserv.h"
void m_ping (struct net_server *, int, char **);
void m_pong (struct net_server *, int, char **);
void m_server (struct net_server *, int, char **);
void m_version (struct net_server *, int, char **);
void m_nick (struct net_server *, int, char **);
void m_squit (struct net_server *, int, char **);
void m_kill (struct net_server *, int, char **);
void m_privmsg (struct net_server *, int, char **);
void m_sjoin (struct net_server *, int, char **);
void m_part (struct net_server *, int, char **);
void m_mode (struct net_server *, int, char **);
void m_quit (struct net_server *, int, char **);
/* Keep these in the approximate order of descending frequency of use. */
struct command commands[] = {
{"NICK", m_nick},
{"PRIVMSG", m_privmsg},
{"MODE", m_mode},
{"SJOIN", m_sjoin},
{"PART", m_part},
{"QUIT", m_quit},
{"KILL", m_kill},
{"SERVER", m_server},
{"SQUIT", m_squit},
{"VERSION", m_version},
{"INFO", m_version},
/* We normally only get these when everything is quiet, so send them to the end. */
{"PING", m_ping},
{"PONG", m_pong},
{0, 0}
};