diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/modes.h | 13 | ||||
-rw-r--r-- | include/perm.h | 7 | ||||
-rw-r--r-- | include/proto.h | 16 | ||||
-rw-r--r-- | include/pttstruct.h | 19 |
4 files changed, 51 insertions, 4 deletions
diff --git a/include/modes.h b/include/modes.h index 8c06317a..a2de94a0 100644 --- a/include/modes.h +++ b/include/modes.h @@ -156,4 +156,17 @@ enum {STRIP_ALL = 0, ONLY_COLOR, NO_RELOAD}; #define SIG_CHC 4 #define SIG_DARK 5 +/* talk.c 中的模式 */ +#define WATERBALL_GENERAL 0 +#define WATERBALL_PREEDIT 1 +#define WATERBALL_ALOHA 2 +#define WATERBALL_SYSOP 3 +#define WATERBALL_CONFIRM 4 +#ifdef PLAY_ANGEL +#define WATERBALL_ANGEL 5 +#define WATERBALL_ANSWER 6 +#define WATERBALL_CONFIRM_ANGEL 7 +#define WATERBALL_CONFIRM_ANSWER 8 +#endif + #endif diff --git a/include/perm.h b/include/perm.h index 02c03d0f..d2788a59 100644 --- a/include/perm.h +++ b/include/perm.h @@ -20,7 +20,12 @@ #define PERM_BBSADM 000000100000 /* BBSADM */ #define PERM_NOTOP 000000200000 /* 不列入排行榜 */ #define PERM_VIOLATELAW 000000400000 /* 違法通緝中 */ -#define PERM_NOOUTMAIL 000001000000 /* 不接受站外的信 */ + +#ifdef PLAY_ANGEL +#define PERM_ANGEL 000001000000 /* 有資格擔任小天使 */ +#endif +#define OLD_PERM_NOOUTMAIL 000001000000 /* 不接受站外的信 */ + #define PERM_NOREGCODE 000002000000 /*不允許認證碼註冊*/ #define PERM_VIEWSYSOP 000004000000 /* 視覺站長 */ #define PERM_LOGUSER 000010000000 /* 觀察使用者行蹤 */ diff --git a/include/proto.h b/include/proto.h index 206593cb..a3e6c557 100644 --- a/include/proto.h +++ b/include/proto.h @@ -456,7 +456,7 @@ char *genpasswd(char *pw); /* screen */ void mouts(int y, int x, char *str); void move(int y, int x); -void outs(char *str); +void outs(const char *str); void clrtoeol(void); void clear(void); void refresh(void); @@ -468,13 +468,13 @@ void redoscr(void); void clrtoline(int line); void standout(void); void standend(void); -int edit_outs(char *text); +int edit_outs(const char *text); void outch(unsigned char c); void rscroll(void); void scroll(void); void getyx(int *y, int *x); void initscr(void); -void out_lines(char *str, int line); +void out_lines(const char *str, int line); /* stuff */ #define isprint2(ch) ((ch & 0x80) || isprint(ch)) @@ -541,6 +541,9 @@ int toconnect(char *host, int port); int toread(int fd, void *buf, int len); int towrite(int fd, void *buf, int len); #endif +#ifdef PLAY_ANGEL +void pressanykey_or_callangel(void); +#endif /* syspost */ int post_msg(char* bname, char* title, char *msg, char* author); @@ -582,6 +585,13 @@ int isvisible_uid(int tuid); int friend_stat(userinfo_t *me, userinfo_t * ui); int call_in(userinfo_t *uentp, int fri_stat); int make_connection_to_somebody(userinfo_t *uin, int timeout); +#ifdef PLAY_ANGEL +int t_changeangel(void); +void CallAngel(void); +void SwitchBeingAngel(void); +void SwitchAngelSex(int); +int t_switchangel(void); +#endif /* tmpjack */ int reg_barbq(void); diff --git a/include/pttstruct.h b/include/pttstruct.h index f3f98de9..7a419c42 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -119,6 +119,16 @@ typedef struct userec_t { #define FAVNEW_FLAG 0x20 /* true if add new board into one's fav */ #define FOREIGN 0x100 /* true if a foreign */ #define LIVERIGHT 0x200 /* true if get "liveright" already */ +#define REJ_OUTTAMAIL 0x400 /* true if don't accept outside mails */ +#define REJECT_OUTTAMAIL (cuser.uflag2 & REJ_OUTTAMAIL) +#define REJ_QUESTION 0x800 /* true if don't want to be angel for a while */ +#define REJECT_QUESTION (cuser.uflag2 & REJ_QUESTION) +#define ANGEL_MASK 0x3000 +#define ANGEL_R_MAEL 0x1000 /* true if reject male */ +#define ANGEL_R_FEMAEL 0x2000 /* true if reject female */ +#define ANGEL_STATUS() ((cuser.uflag2 & ANGEL_MASK) >> 12) +#define ANGEL_SET(X) (cuser.uflag2 = (cuser.uflag2 & ~ANGEL_MASK) | \ + ((X & 3) << 12)) #define BTLEN 48 /* Length of board title */ @@ -234,6 +244,14 @@ typedef struct { #define FAVGMAX 32 /* Max groups of Myfavorite */ #define FAVGSLEN 8 /* Max Length of Description String */ +/* values of msgque_t::msgmode */ +#define MSGMODE_TALK 0 +#define MSGMODE_WRITE 1 +#ifdef PLAY_ANGEL +#define MSGMODE_FROMANGEL 2 +#define MSGMODE_TOANGEL 3 +#endif + typedef struct msgque_t { pid_t pid; char userid[IDLEN + 1]; @@ -250,6 +268,7 @@ typedef struct userinfo_t { unsigned char active; /* When allocated this field is true */ unsigned char invisible; /* Used by cloaking function in Xyz menu */ unsigned char sockactive; /* Used to coordinate talk requests */ + unsigned char angel; unsigned int userlevel; unsigned char mode; /* UL/DL, Talk Mode, Chat Mode, ... */ unsigned char pager; /* pager toggle, YEA, or NA */ |