Hack to bypass timeseal decoder
[capablanca.git] / lasker-2.2.3 / src / command_list.h
1 /*
2    Copyright (c) 1993 Richard V. Nash.
3    Copyright (c) 2000 Dan Papasian
4    Copyright (C) Andrew Tridgell 2002
5    
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10    
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15    
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21
22 #ifndef _COMMAND_LIST_H
23 #define _COMMAND_LIST_H
24
25 /*
26   Parameter string format
27   w - a word 
28   o - an optional word 
29   d - integer
30   p - optional integer
31   i - word or integer
32   j - word or signed integer
33   n - optional word or integer
34   s - string to end
35   t - optional string to end
36   
37   If the parameter option is given in lower case then the parameter is 
38   converted to lower case before being passsed to the function. If it is
39   in upper case, then the parameter is passed as typed.
40  */
41
42 /* Try to keep this list in alpha order */
43
44  /* Name        Options Functions       Security */
45 static struct command_type command_list[] = {
46
47   {"abort",             "",     com_abort,      ADMIN_USER },
48   {"accept",            "n",    com_accept,     ADMIN_USER },
49   {"addlist",           "ww",   com_addlist,    ADMIN_USER },
50   {"adjourn",           "",     com_adjourn,    ADMIN_USER },
51   {"alias",             "oT",   com_alias,      ADMIN_USER },
52   {"allobservers",      "n",    com_allobservers,       ADMIN_USER },
53   {"assess",            "noo",  com_assess,     ADMIN_USER },
54   {"backward",          "p",    com_backward,   ADMIN_USER },
55   {"bell",              "",     com_bell,       ADMIN_USER },
56   {"best",              "o",    com_best,       ADMIN_USER },
57   {"bname",             "O",    com_bname,      ADMIN_USER },
58   {"boards",            "o",    com_boards,     ADMIN_USER },
59   {"bsetup",             "oT",  com_setup,      ADMIN_USER},
60 /*  {"channel",         "p",    com_channel,    ADMIN_USER }, */
61   {"clearmessages",     "n",    com_clearmessages,      ADMIN_USER },
62   {"clrsquare",         "w",    com_clrsquare,  ADMIN_USER },
63   {"cshout",            "S",    com_cshout,     ADMIN_USER },
64   {"date",              "",     com_date,       ADMIN_USER },
65   {"decline",           "n",    com_decline,    ADMIN_USER },
66   {"draw",              "",     com_draw,       ADMIN_USER },
67   {"eco",               "n",    com_eco,        ADMIN_USER }, 
68   {"examine",           "on",   com_examine,    ADMIN_USER },
69   {"finger",            "oo",   com_stats,      ADMIN_USER },
70   {"flag",              "",     com_flag,       ADMIN_USER },
71   {"flip",              "",     com_flip,       ADMIN_USER },
72   {"fmessage",          "wd",   com_forwardmess, ADMIN_USER },
73   {"forward",           "p",    com_forward,    ADMIN_USER },
74   {"games",             "o",    com_games,      ADMIN_USER },
75   {"getgi",             "w",    com_getgi,      ADMIN_USER },
76   {"getpi",             "w",    com_getpi,      ADMIN_USER },
77   {"goboard",           "i",    com_goboard,    ADMIN_USER },
78   {"handles",           "w",    com_handles,    ADMIN_USER },
79   {"hbest",             "o",    com_hbest,      ADMIN_USER },
80   {"help",              "t",    com_help,       ADMIN_USER },
81   {"history",           "o",    com_history,    ADMIN_USER },
82   {"hrank",             "oo",   com_hrank,      ADMIN_USER },
83   {"inchannel",         "n",    com_inchannel,  ADMIN_USER },
84   {"iset",              "wS",   com_iset,       ADMIN_USER },
85   {"it",                "T",    com_it,         ADMIN_USER },
86   {"jkill",             "w",    com_jkill,      ADMIN_USER },
87   {"journal",           "o",    com_journal,    ADMIN_USER },
88   {"jsave",             "wwi",  com_jsave,      ADMIN_USER },
89   {"kibitz",            "S",    com_kibitz,     ADMIN_USER },
90   {"limits",            "",     com_limits,     ADMIN_USER },  
91   {"llogons",           "",     com_llogons,    ADMIN_USER },
92   {"logons",            "o",    com_logons,     ADMIN_USER },
93   {"mailmoves",         "n",    com_mailmoves,  ADMIN_USER },
94   {"mailoldmoves",      "o",    com_mailoldmoves, ADMIN_USER },
95   {"mailstored",        "wi",   com_mailstored, ADMIN_USER },
96   {"match",             "wt",   com_match,      ADMIN_USER },
97   {"rmatch",            "wwt",  com_rmatch,     ADMIN_USER },
98   {"messages",          "nT",   com_messages,   ADMIN_USER },
99   {"mexamine",          "w",    com_mexamine,   ADMIN_USER },
100   {"moretime",          "d",    com_moretime,   ADMIN_USER },
101   {"moves",             "n",    com_moves,      ADMIN_USER },
102   {"news",              "o",    com_news,       ADMIN_USER },
103   {"next",              "",     com_more,       ADMIN_USER },
104   {"observe",           "n",    com_observe,    ADMIN_USER },
105   {"oldmoves",          "o",    com_oldmoves,   ADMIN_USER },
106   {"open",              "",     com_open,       ADMIN_USER },
107   {"partner",           "o",    com_partner,    ADMIN_USER },
108   {"password",          "WW",   com_password,   ADMIN_USER },
109   {"pause",             "",     com_pause,      ADMIN_USER },
110   {"play",              "d",    com_play,       ADMIN_USER },
111   {"pending",           "",     com_pending,    ADMIN_USER },
112   {"prefresh",          "",     com_prefresh,   ADMIN_USER },
113   {"promote",           "w",    com_promote,    ADMIN_USER },
114   {"ptell",             "S",    com_ptell,      ADMIN_USER },
115   {"ptime",             "",     com_ptime,      ADMIN_USER },
116   {"qtell",             "iS",   com_qtell,      ADMIN_USER },
117   {"quit",              "",     com_quit,       ADMIN_USER },
118   {"rank",              "oo",   com_rank,       ADMIN_USER },
119   {"refresh",           "n",    com_refresh,    ADMIN_USER },
120   {"revert",            "",     com_revert,     ADMIN_USER },
121   {"resign",            "o",    com_resign,     ADMIN_USER },
122   {"say",               "S",    com_say,        ADMIN_USER },
123 //  {"seek",            "pppp", com_seek,       ADMIN_USER },
124   {"seek",              "t",    com_seek,       ADMIN_USER }, // [HGM]
125   {"unseek",            "",     com_unseek,     ADMIN_USER },
126   {"set",               "wT",   com_set,        ADMIN_USER },
127   {"shout",             "T",    com_shout,      ADMIN_USER },
128   {"showlist",          "o",    com_showlist,   ADMIN_USER },
129   {"simabort",          "",     com_simabort,   ADMIN_USER },
130   {"simallabort",       "",     com_simallabort,ADMIN_USER },
131   {"simadjourn",        "",     com_simadjourn, ADMIN_USER },
132   {"simalladjourn",     "",     com_simalladjourn,ADMIN_USER },
133   {"simgames",          "o",    com_simgames,   ADMIN_USER },
134   {"simmatch",          "woo",  com_simmatch,   ADMIN_USER },
135   {"simnext",           "",     com_simnext,    ADMIN_USER },
136   {"simopen",           "",     com_simopen,    ADMIN_USER },
137   {"simpass",           "",     com_simpass,    ADMIN_USER },
138   {"simprev",           "",     com_simprev,    ADMIN_USER },
139   {"sought",            "p",    com_sought,     ADMIN_USER },
140   {"smoves",            "wj",   com_smoves,     ADMIN_USER },
141   {"sposition",         "ww",   com_sposition,  ADMIN_USER },
142   {"statistics",        "",     com_statistics, ADMIN_USER },
143   {"stored",            "o",    com_stored,     ADMIN_USER },
144   {"style",             "d",    com_style,      ADMIN_USER },
145   {"sublist",           "ww",   com_sublist,    ADMIN_USER },
146   {"switch",            "",     com_switch,     ADMIN_USER },
147   {"takeback",          "p",    com_takeback,   ADMIN_USER },
148   {"tell",              "nS",   com_tell,       ADMIN_USER },
149   {"ltell",             "wS",   com_ltell,      ADMIN_USER },
150   {"time",              "n",    com_time,       ADMIN_USER },
151   {"tomove",            "w",    com_tomove,     ADMIN_USER },
152   {"toggle",            "ww",   com_togglelist, ADMIN_USER },
153   {"tournset",          "wd",   com_tournset,   ADMIN_USER },
154   {"unalias",           "w",    com_unalias,    ADMIN_USER },
155   {"unexamine",         "",     com_unexamine,  ADMIN_USER },
156   {"unobserve",         "n",    com_unobserve,  ADMIN_USER },
157   {"unpause",           "",     com_unpause,    ADMIN_USER },
158   {"uptime",            "",     com_uptime,     ADMIN_USER },
159   {"variables",         "o",    com_variables,  ADMIN_USER },
160   {"whenshut",          "",     com_whenshut,   ADMIN_USER },
161   {"whisper",           "S",    com_whisper,    ADMIN_USER },
162   {"who",               "T",    com_who,        ADMIN_USER },
163   {"withdraw",          "n",    com_withdraw,   ADMIN_USER },
164   {"wname",             "O",    com_wname,      ADMIN_USER },
165   {"xtell",             "wS",   com_xtell,      ADMIN_USER },
166   {"znotify",           "",     com_znotify,    ADMIN_USER },
167
168 #if 0
169   {"ustat",             "",     com_ustat,      ADMIN_USER },
170 #endif
171
172 #if 0
173   {"reply",             "S",    com_reply,      ADMIN_USER },
174 #endif
175   {"pstat",             "oo",   com_pstat,      ADMIN_USER },
176   {"remote",            "wS",   com_remote,     ADMIN_USER }, 
177
178   {"aconfig",           "OS",   com_aconfig,       ADMIN_GOD },
179   {"addcomment",        "WS",   com_addcomment,    ADMIN_ADMIN },
180   {"addplayer",         "WWS",  com_addplayer,     ADMIN_ADMIN },
181   {"adjudicate",        "www",  com_adjudicate,    ADMIN_ADMIN },
182   {"adump",             "",     com_adump,         ADMIN_GOD },
183   {"admin",             "",     com_admin,         ADMIN_ADMIN },
184   {"ahelp",             "t",    com_ahelp,         ADMIN_ADMIN },
185   {"acheckhelp",        "",     com_acheckhelp,    ADMIN_ADMIN },
186   {"announce",          "S",    com_announce,      ADMIN_ADMIN },
187   {"annunreg",          "S",    com_annunreg,      ADMIN_ADMIN },
188   {"anews",             "o",    com_anews,         ADMIN_ADMIN },
189   {"areload",           "",     com_areload,       ADMIN_GOD },
190   {"asetv",             "wS",   com_asetv,         ADMIN_ADMIN },
191   {"asetadmin",         "wd",   com_asetadmin,     ADMIN_ADMIN },
192   {"asetblitz",         "wdpppp",com_asetblitz,    ADMIN_ADMIN },
193   {"asetbughouse",      "wdpppp",com_asetbug,      ADMIN_ADMIN },
194   {"asetemail",         "wO",   com_asetemail,     ADMIN_ADMIN },
195   {"asethandle",        "WW",   com_asethandle,    ADMIN_ADMIN },
196   {"asetlight",         "wdpppp",com_asetlight,    ADMIN_ADMIN },
197   {"asetpasswd",        "wW",   com_asetpasswd,    ADMIN_ADMIN },
198   {"asetrealname",      "wT",   com_asetrealname,  ADMIN_ADMIN },
199   {"asetstd",           "wdpppp",com_asetstd,      ADMIN_ADMIN },
200   {"asetwild",          "wdpppp",com_asetwild,     ADMIN_ADMIN },
201   {"cnewsi",            "S",     com_cnewsi,       ADMIN_ADMIN },
202   {"cnewsf",            "dT",   com_cnewsf,        ADMIN_ADMIN },
203   {"cnewst",            "dS",   com_cnewst,        ADMIN_ADMIN },
204   {"cnewsp",            "d",    com_cnewsp,        ADMIN_ADMIN },
205   {"cnewse",            "dp",   com_cnewse,        ADMIN_ADMIN },
206   {"cnewsd",            "d",    com_cnewsd,        ADMIN_ADMIN },
207   {"canewsi",            "S",    com_canewsi,       ADMIN_ADMIN },
208   {"canewsf",            "dT",   com_canewsf,        ADMIN_ADMIN },
209   {"canewst",            "dS",   com_canewst,        ADMIN_ADMIN },
210   {"canewsp",            "d",    com_canewsp,        ADMIN_ADMIN },
211   {"canewse",            "dp",   com_canewse,        ADMIN_ADMIN },
212   {"canewsd",            "d",    com_canewsd,        ADMIN_ADMIN },
213   {"ftell",             "o",    com_ftell,         ADMIN_ADMIN },
214   {"hideinfo",          "",     com_hideinfo,      ADMIN_ADMIN },
215   {"nuke",              "w",    com_nuke,          ADMIN_ADMIN },
216   {"pose",              "wS",   com_pose,          ADMIN_GOD   }, 
217   {"quota",             "p",    com_quota,         ADMIN_ADMIN },
218   {"raisedead",         "WO",   com_raisedead,     ADMIN_ADMIN },
219   {"remplayer",         "w",    com_remplayer,     ADMIN_ADMIN },
220   {"rerank",            "w",    com_fixrank,       ADMIN_ADMIN },
221   {"showcomment",       "w",    com_showcomment,   ADMIN_ADMIN },
222   {"shutdown",          "oT",    com_shutdown,      ADMIN_ADMIN },
223   {"summon",            "w",    com_summon,        ADMIN_ADMIN },
224
225   {NULL, NULL, NULL, ADMIN_USER}
226 };
227
228 static struct alias_type g_alias_list[] = {
229   {"comment",   "addcomment"},
230   {"setup",     "bsetup"},
231   {"sc",        "showcomment"},
232   {"b",         "backward"},
233   {"w",         "who"},
234   {"t",         "tell"},
235   {"m",         "match"},
236   {"go",        "goboard"},
237   {"goto",      "goboard"},
238   {"gonum",     "goboard"}, /* dumping an obsolete command */
239   {"f",         "finger"},
240   {"hi",        "history"},
241   {"a",         "accept"},
242   {"saa",       "simallabort"},
243   {"saab",      "simallaabort"},
244   {"sab",       "simabort"},
245   {"sadj",      "simadjourn"},
246   {"saadj",     "simalladjourn"},
247   {"sh",        "shout"},
248   {"sn",        "simnext"},
249   {"sp",        "simprev"},
250   {"vars",      "variables"},
251   {"g",         "games"},
252   {"players",   "who a"},
253   {"player",   "who a"},
254   {"p",         "who a"},
255   {"pl",        "who a"},
256   {"o",         "observe"},
257   {"r",         "refresh"},
258   {"re",        "refresh"}, /* So r/re doesn't resign! */
259   {"ch",        "channel"},
260   {"in",        "inchannel"},
261   {".",         "tell ."},
262   {",",         "tell ,"},
263   {"`",         "tell ."},
264   {"!",         "shout"},
265   {"I",         "it"},
266   {"i",         "it"},
267   {":",         "it"},
268   {"exit",      "quit"},
269   {"logout",    "quit"},
270   {"bye",       "quit"},
271   {"*",         "kibitz"},
272   {"#",         "whisper"},
273   {"ma",        "match"},
274   {"more",      "next"},
275   {"n",         "next"},
276   {"znotl",     "znotify"},
277   {"+",         "addlist"},
278   {"-",         "sublist"},
279   {"=",         "showlist"},
280   {"mam",     "xtell mamer"},
281   {"tom",    "tell tomato"},
282   {"egg",     "tell eggoi"},
283   {"follow",  "toggle follow"},
284   {"channel", "toggle channel"},
285   {NULL, NULL}
286 };
287
288 #endif /* _COMMAND_LIST_H */