home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / in4wjcxu / other / irc / include / msg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-14  |  7.1 KB  |  179 lines

  1. /************************************************************************
  2.  *   IRC - Internet Relay Chat, include/msg.h
  3.  *   Copyright (C) 1990 Jarkko Oikarinen and
  4.  *                      University of Oulu, Computing Center
  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 1, or (at your option)
  9.  *   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. #ifndef    __msg_include__
  22. #define __msg_include__
  23.  
  24. #define MSG_PRIVATE  "PRIVMSG"    /* PRIV */
  25. #define MSG_WHO      "WHO"    /* WHO  -> WHOC */
  26. #define MSG_WHOIS    "WHOIS"    /* WHOI */
  27. #define MSG_WHOWAS   "WHOWAS"    /* WHOW */
  28. #define MSG_USER     "USER"    /* USER */
  29. #define MSG_NICK     "NICK"    /* NICK */
  30. #define MSG_SERVER   "SERVER"    /* SERV */
  31. #define MSG_LIST     "LIST"    /* LIST */
  32. #define MSG_TOPIC    "TOPIC"    /* TOPI */
  33. #define MSG_INVITE   "INVITE"    /* INVI */
  34. #define MSG_VERSION  "VERSION"    /* VERS */
  35. #define MSG_QUIT     "QUIT"    /* QUIT */
  36. #define MSG_SQUIT    "SQUIT"    /* SQUI */
  37. #define MSG_KILL     "KILL"    /* KILL */
  38. #define MSG_INFO     "INFO"    /* INFO */
  39. #define MSG_LINKS    "LINKS"    /* LINK */
  40. #define MSG_SUMMON   "SUMMON"    /* SUMM */
  41. #define MSG_STATS    "STATS"    /* STAT */
  42. #define MSG_USERS    "USERS"    /* USER -> USRS */
  43. #define MSG_HELP     "HELP"    /* HELP */
  44. #define MSG_ERROR    "ERROR"    /* ERRO */
  45. #define MSG_AWAY     "AWAY"    /* AWAY */
  46. #define MSG_CONNECT  "CONNECT"    /* CONN */
  47. #define MSG_PING     "PING"    /* PING */
  48. #define MSG_PONG     "PONG"    /* PONG */
  49. #define MSG_OPER     "OPER"    /* OPER */
  50. #define MSG_PASS     "PASS"    /* PASS */
  51. #define MSG_WALLOPS  "WALLOPS"    /* WALL */
  52. #define MSG_TIME     "TIME"    /* TIME */
  53. #define MSG_NAMES    "NAMES"    /* NAME */
  54. #define MSG_ADMIN    "ADMIN"    /* ADMI */
  55. #define MSG_TRACE    "TRACE"    /* TRAC */
  56. #define MSG_NOTICE   "NOTICE"    /* NOTI */
  57. #define MSG_JOIN     "JOIN"    /* JOIN */
  58. #define MSG_PART     "PART"    /* PART */
  59. #define MSG_LUSERS   "LUSERS"    /* LUSE */
  60. #define MSG_MOTD     "MOTD"    /* MOTD */
  61. #define MSG_MODE     "MODE"    /* MODE */
  62. #define MSG_KICK     "KICK"    /* KICK */
  63. #define MSG_SERVICE  "SERVICE"    /* SERV -> SRVI */
  64. #define MSG_USERHOST "USERHOST"    /* USER -> USRH */
  65. #define MSG_ISON     "ISON"    /* ISON */
  66. #define MSG_NOTE     "NOTE"    /* NOTE */
  67. #define MSG_SQUERY   "SQUERY"    /* SQUE */
  68. #define MSG_SERVLIST "SERVLIST"    /* SERV -> SLIS */
  69. #define MSG_SERVSET  "SERVSET"    /* SERV -> SSET */
  70. #define    MSG_REHASH   "REHASH"    /* REHA */
  71. #define    MSG_RESTART  "RESTART"    /* REST */
  72. #define    MSG_CLOSE    "CLOSE"    /* CLOS */
  73. #define    MSG_DIE         "DIE"
  74. #define    MSG_HASH     "HSAH"    /* HASH */
  75. #define    MSG_DNS      "DNS"    /* DNS  -> DNSS */
  76.  
  77. #define MAXPARA    15 
  78.  
  79. extern int m_private(), m_topic(), m_join(), m_part(), m_mode();
  80. extern int m_ping(), m_pong(), m_wallops(), m_kick();
  81. extern int m_nick(), m_error(), m_notice();
  82. extern int m_invite(), m_quit(), m_kill();
  83. #ifndef CLIENT_COMPILE
  84. extern int m_motd(), m_who(), m_whois(), m_user(), m_list();
  85. extern int m_server(), m_info(), m_links(), m_summon(), m_stats();
  86. extern int m_users(), m_version(), m_help();
  87. extern int m_squit(), m_away(), m_connect();
  88. extern int m_oper(), m_pass(), m_trace();
  89. extern int m_time(), m_names(), m_admin();
  90. extern int m_lusers(), m_umode(), m_note(), m_close();
  91. extern int m_motd(), m_whowas();
  92. extern int m_service(), m_userhost(), m_ison();
  93. extern int m_service(), m_servset(), m_servlist(), m_squery();
  94. #if defined(OPER_REHASH) || defined(LOCOP_REHASH)
  95. extern    int    m_rehash();
  96. #endif
  97. #if defined(OPER_RESTART) || defined(LOCOP_RESTART)
  98. extern    int    m_restart();
  99. #endif
  100. #if defined(OPER_DIE) || defined(LOCOP_DIE)
  101. extern    int    m_die();
  102. #endif
  103. extern int m_hash(), m_dns();
  104. #endif /* !CLIENT_COMPILE */
  105.  
  106. #ifdef MSGTAB
  107. struct Message msgtab[] = {
  108.   { MSG_PRIVATE, m_private,  0, MAXPARA, 1 ,0L },
  109.   { MSG_NICK,    m_nick,     0, MAXPARA, 1 ,0L },
  110.   { MSG_NOTICE,  m_notice,   0, MAXPARA, 1 ,0L },
  111.   { MSG_JOIN,    m_join,     0, MAXPARA, 1 ,0L },
  112.   { MSG_MODE,    m_mode,     0, MAXPARA, 1 ,0L },
  113.   { MSG_QUIT,    m_quit,     0, MAXPARA, 1 ,0L },
  114.   { MSG_PART,    m_part,     0, MAXPARA, 1 ,0L },
  115.   { MSG_TOPIC,   m_topic,    0, MAXPARA, 1 ,0L },
  116.   { MSG_INVITE,  m_invite,   0, MAXPARA, 1 ,0L },
  117.   { MSG_KICK,    m_kick,     0, MAXPARA, 1 ,0L },
  118.   { MSG_WALLOPS, m_wallops,  0, MAXPARA, 1 ,0L },
  119.   { MSG_PING,    m_ping,     0, MAXPARA, 1 ,0L },
  120.   { MSG_PONG,    m_pong,     0, MAXPARA, 1 ,0L },
  121.   { MSG_ERROR,   m_error,    0, MAXPARA, 1 ,0L },
  122.   { MSG_KILL,    m_kill,     0, MAXPARA, 1 ,0L },
  123. #ifndef CLIENT_COMPILE
  124.   { MSG_USER,    m_user,     0, MAXPARA, 1 ,0L },
  125.   { MSG_AWAY,    m_away,     0, MAXPARA, 1 ,0L },
  126.   { MSG_ISON,    m_ison,     0, 1, 1 ,0L },
  127.   { MSG_SERVER,  m_server,   0, MAXPARA, 1 ,0L },
  128.   { MSG_SQUIT,   m_squit,    0, MAXPARA, 1 ,0L },
  129.   { MSG_WHOIS,   m_whois,    0, MAXPARA, 1 ,0L },
  130.   { MSG_WHO,     m_who,      0, MAXPARA, 1 ,0L },
  131.   { MSG_WHOWAS,  m_whowas,   0, MAXPARA, 1 ,0L },
  132.   { MSG_LIST,    m_list,     0, MAXPARA, 1 ,0L },
  133.   { MSG_NAMES,   m_names,    0, MAXPARA, 1 ,0L },
  134.   { MSG_USERHOST,m_userhost, 0, 1, 1 ,0L },
  135.   { MSG_TRACE,   m_trace,    0, MAXPARA, 1 ,0L },
  136.   { MSG_PASS,    m_pass,     0, MAXPARA, 1 ,0L },
  137.   { MSG_LUSERS,  m_lusers,   0, MAXPARA, 1 ,0L },
  138.   { MSG_TIME,    m_time,     0, MAXPARA, 1 ,0L },
  139.   { MSG_OPER,    m_oper,     0, MAXPARA, 1 ,0L },
  140.   { MSG_CONNECT, m_connect,  0, MAXPARA, 1 ,0L },
  141.   { MSG_VERSION, m_version,  0, MAXPARA, 1 ,0L },
  142.   { MSG_STATS,   m_stats,    0, MAXPARA, 1 ,0L },
  143.   { MSG_LINKS,   m_links,    0, MAXPARA, 1 ,0L },
  144.   { MSG_ADMIN,   m_admin,    0, MAXPARA, 1 ,0L },
  145.   { MSG_USERS,   m_users,    0, MAXPARA, 1 ,0L },
  146.   { MSG_SUMMON,  m_summon,   0, MAXPARA, 1 ,0L },
  147.   { MSG_HELP,    m_help,     0, MAXPARA, 1 ,0L },
  148.   { MSG_INFO,    m_info,     0, MAXPARA, 1 ,0L },
  149.   { MSG_MOTD,    m_motd,     0, MAXPARA, 1 ,0L },
  150.   { MSG_CLOSE,   m_close,    0, MAXPARA, 1 ,0L },
  151. #if defined(NPATH) && !defined(CLIENT_COMPILE)
  152.   { MSG_NOTE,    m_note,     0, 1, 1 ,0L },
  153. #endif
  154. #undef USE_SERVICES
  155. #ifdef USE_SERVICES
  156.   { MSG_SERVICE, m_service,  0, MAXPARA, 1 ,0L },
  157.   { MSG_SERVSET, m_servset,  0, MAXPARA, 1 ,0L },
  158.   { MSG_SQUERY,  m_squery,   0, MAXPARA, 1 ,0L },
  159.   { MSG_SERVLIST,m_servlist, 0, MAXPARA, 1 ,0L },
  160. #endif
  161.   { MSG_HASH,    m_hash,     0, MAXPARA, 1 ,0L },
  162.   { MSG_DNS,     m_dns,      0, MAXPARA, 1 ,0L },
  163. #if defined(OPER_REHASH) || defined(LOCOP_REHASH)
  164.   { MSG_REHASH,  m_rehash,   0, MAXPARA, 1 ,0L },
  165. #endif
  166. #if defined(OPER_RESTART) || defined(LOCOP_RESTART)
  167.   { MSG_RESTART, m_restart,  0, MAXPARA, 1 ,0L },
  168. #endif
  169. #if defined(OPER_DIE) || defined(LOCOP_DIE)
  170.   { MSG_DIE, m_die,  0, MAXPARA, 1 ,0L },
  171. #endif
  172. #endif /* !CLIENT_COMPILE */
  173.   { (char *) 0, (int (*)()) 0 , 0, 0, 0, 0L}
  174. };
  175. #else
  176. extern struct Message msgtab[];
  177. #endif
  178. #endif /* __msg_include__ */
  179.