summaryrefslogtreecommitdiffstats
path: root/util/xchatd.h
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-07 23:13:44 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-07 23:13:44 +0800
commitae31e19f92e717919ac8e3db9039eb38d2b89aae (patch)
treec70164d6a1852344f44b04a653ae2815043512af /util/xchatd.h
downloadpttbbs-ae31e19f92e717919ac8e3db9039eb38d2b89aae.tar
pttbbs-ae31e19f92e717919ac8e3db9039eb38d2b89aae.tar.gz
pttbbs-ae31e19f92e717919ac8e3db9039eb38d2b89aae.tar.bz2
pttbbs-ae31e19f92e717919ac8e3db9039eb38d2b89aae.tar.lz
pttbbs-ae31e19f92e717919ac8e3db9039eb38d2b89aae.tar.xz
pttbbs-ae31e19f92e717919ac8e3db9039eb38d2b89aae.tar.zst
pttbbs-ae31e19f92e717919ac8e3db9039eb38d2b89aae.zip
Initial revision
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/xchatd.h')
-rw-r--r--util/xchatd.h111
1 files changed, 111 insertions, 0 deletions
diff --git a/util/xchatd.h b/util/xchatd.h
new file mode 100644
index 00000000..d0a6e1e4
--- /dev/null
+++ b/util/xchatd.h
@@ -0,0 +1,111 @@
+/* $Id: xchatd.h,v 1.1 2002/03/07 15:13:46 in2 Exp $ */
+
+#ifndef _XCHAT_H_
+#define _XCHAT_H_
+
+#define XCHAT_VERSION_MAJOR 3
+#define XCHAT_VERSION_MINOR 0
+
+/* ----------------------------------------------------- */
+/* XCHAT response code : RFI 3-digit */
+/* ----------------------------------------------------- */
+/* Response : */
+/* 1xx Informative message */
+/* 2xx Command ok */
+/* 3xx Command ok so far, send the rest of it */
+/* 4xx Command correct, but NG for some reason */
+/* 5xx Command unimplemented, incorrect, or serious */
+/* program error occurred */
+/* Function : */
+/* x0x Connection, setup, and miscellaneous messages */
+/* x1x Newsgroup selection */
+/* x2x Article selection */
+/* x3x Distribution functions */
+/* x4x Posting */
+/* x8x Nonstandard extensions (AUTHINFO, XGTITLE) */
+/* x9x Debugging output */
+/* Information : */
+/* No defined semantics */
+/* ----------------------------------------------------- */
+
+/* ¨Ñ·sª© client ¨Ï¥Î */
+
+#define MSG_LOGINOK 100
+#define MSG_VERSION 103
+#define MSG_MESSAGE 106
+
+#define MSG_CHATROOM 110
+#define MSG_TOPIC 113
+#define MSG_ROOM 116
+#define MSG_NICK 118
+#define MSG_CLRSCR 120
+
+#define MSG_MOTDSTART 130
+#define MSG_MOTD 330
+#define MSG_MOTDEND 230
+
+#define MSG_ROOMLISTSTART 133
+#define MSG_ROOMLIST 333
+#define MSG_ROOMLISTEND 233
+#define MSG_ROOMNOTIFY 134
+
+#define MSG_USERLISTSTART 136
+#define MSG_USERLIST 336
+#define MSG_USERLISTEND 236
+#define MSG_USERNOTIFY 137
+
+#define MSG_PARTYINFO 140
+#define MSG_PARTYLISTSTART 340
+#define MSG_PARTYLIST 240
+#define MSG_PARTYLISTEND 141
+
+#define MSG_PRIVMSG 145
+#define MSG_MYPRIVMSG 146
+
+#define ERR_LOGIN_NICKINUSE 501
+#define ERR_LOGIN_NICKERROR 502
+#define ERR_LOGIN_USERONLINE 503
+#define ERR_LOGIN_NOSUCHUSER 504
+#define ERR_LOGIN_PASSERROR 505
+
+static int
+Isspace (ch)
+ int ch;
+{
+ return (ch == ' ' || ch == '\t' || ch == 10 || ch == 13);
+}
+
+static char *
+nextword (str)
+ char **str;
+{
+ char *head, *tail;
+ int ch;
+
+ head = *str;
+ for (;;) {
+
+ ch = *head;
+ if (!ch) {
+ *str = head;
+ return head;
+ }
+ if (!Isspace (ch))
+ break;
+ head++;
+ }
+
+ tail = head + 1;
+ while((ch = *tail)) {
+ if(Isspace (ch)) {
+ *tail++ = '\0';
+ break;
+ }
+ tail++;
+ }
+ *str = tail;
+
+ return head;
+}
+
+#endif /* _XCHAT_H_ */