/* ARISA - Chat Commands (Not Admin Ones) * Copyright (C) 2003, 2004 Carl Ritson * * 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 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 "arisa.h" #include #include /* prototypes */ static int cmd_list(chat_t *c, char **args, int no_args); static int cmd_get(chat_t *c, char **args, int no_args); static int cmd_lists(chat_t *c, char **args, int no_args); static int cmd_chlist(chat_t *c, char **args, int no_args); static int cmd_stats(chat_t *c, char **args, int no_args); static int cmd_queues(chat_t *c, char **args, int no_args); static int cmd_remove(chat_t *c, char **args, int no_args); static int cmd_help(chat_t *c, char **args, int no_args); static int cmd_commands(chat_t *c, char **args, int no_args); static int cmd_exit(chat_t *c, char **args, int no_args); /* command table */ static struct cmd_t { char *name; int (*func)(chat_t *, char **args, int no_args); int min_args; int max_args; char *help; } cmds[] = { {"ls", cmd_list, 0,0, "ls - displays all the packs in the current packlist"}, {"dir", cmd_list, 0,0, "ls - displays all the packs in the current packlist"}, {"get", cmd_get, 1,1, "get - queue/send a pack from the current packlist"}, {"lists", cmd_lists, 0,0, "lists - displays all available packlists"}, {"chlist", cmd_chlist, 1,1, "chlist - changes current packlist"}, {"stats", cmd_stats, 0,0, "stats - displays send and queue statistics for current packlist"}, {"queues", cmd_queues, 0,0, "queues - displays your present queues"}, {"remove", cmd_remove, 0,1, "remove [