/[LeafOK_CVS]/lbbs/src/bbs_cmd.c
ViewVC logotype

Diff of /lbbs/src/bbs_cmd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Mon Mar 21 17:08:21 2005 UTC Revision 1.4 by sysadm, Fri May 6 15:48:44 2005 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2                            bbs_cmd.c  -  description                            bbs_cmd.c  -  description
3                               -------------------                               -------------------
4      begin                : Wed Mar 16 2004      begin                : Wed Mar 16 2005
5      copyright            : (C) 2005 by Leaflet      copyright            : (C) 2005 by Leaflet
6      email                : leaflet@leafok.com      email                : leaflet@leafok.com
7   ***************************************************************************/   ***************************************************************************/
# Line 16  Line 16 
16   ***************************************************************************/   ***************************************************************************/
17    
18  #include "bbs_cmd.h"  #include "bbs_cmd.h"
19    #include "menu_proc.h"
20    
21  BBS_CMD bbs_cmd_list[MAX_CMD_ID] = {  BBS_CMD bbs_cmd_list[MAX_CMD_ID] = {
22    {"EXITBBS", EXITBBS}    {"RunMBEM", exec_mbem},
23    ,    {"EXITBBS", exitbbs},
24    {"BBSNET", BBSNET}    {"LICENSE", license},
25      {"COPYRIGHT", copyright}
26  };  };
27    
28  static bbs_cmd_max = 2;  static bbs_cmd_max = 4;
29    
30  int  int
31  get_cmd_value (const char *cmd)  exec_cmd (const char *cmd, const char *param)
32  {  {
33    int i;    int i;
34    
# Line 34  get_cmd_value (const char *cmd) Line 36  get_cmd_value (const char *cmd)
36      {      {
37        if (strcmp (cmd, bbs_cmd_list[i].cmd) == 0)        if (strcmp (cmd, bbs_cmd_list[i].cmd) == 0)
38          {          {
39            return bbs_cmd_list[i].value;            return ((*(bbs_cmd_list[i].p_handle))(param));
40          }          }
41      }      }
42    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1