Skip to content

Commit

Permalink
Revert "Remove innbbsd."
Browse files Browse the repository at this point in the history
This reverts:
commit ed71cbf
commit 6ad941c (part)
commit eb57613
commit 9e78c68
commit 93418d2
commit 524cced

try if innbbsd still works. XD
  • Loading branch information
holishing committed Jan 11, 2018
1 parent dc5320f commit 4957994
Show file tree
Hide file tree
Showing 64 changed files with 12,977 additions and 48 deletions.
6 changes: 5 additions & 1 deletion Makefile
@@ -1,6 +1,10 @@
SUBDIR= common mbbsd util
SUBDIR= common mbbsd util innbbsd

.include <bsd.subdir.mk>

.ORDER: all-common all-mbbsd
.ORDER: all-common all-util
.ORDER: all-common all-innbbsd

# XXX innbbsd depends on util
.ORDER: all-util all-innbbsd
1 change: 1 addition & 0 deletions README
Expand Up @@ -23,6 +23,7 @@
proto/ mbbsd/ �̭��U���ɮת������A�Ԩ��ӥؿ��� README
z6ibbs.[12].txt in2 �H��

innbbsd/ ��H
sample/ �d��

crontab ���� bbs����ɶ��z�L crontab �w�ɶ]���]�w
Expand Down
2 changes: 1 addition & 1 deletion include/common.h
Expand Up @@ -249,7 +249,7 @@
#define EDITFLAG_KIND_SENDMAIL (0x00000040)
#define EDITFLAG_KIND_MAILLIST (0x00000080)
#define EDITFLAG_WARN_NOSELFDEL (0x00000100)
// #define EDITFLAG_ALLOW_LOCAL (0x00000200)
#define EDITFLAG_ALLOW_LOCAL (0x00000200)
#define EDIT_ABORTED -1

/* ----------------------------------------------------- */
Expand Down
4 changes: 2 additions & 2 deletions include/proto.h
Expand Up @@ -216,8 +216,8 @@ int main_dark(int fd,userinfo_t *uin);
int dice_main(void);

/* edit */
int vedit(const char *fpath, int saveheader, char save_title[STRLEN]);
int vedit2(const char *fpath, int saveheader, char save_title[STRLEN], int flags);
int vedit(const char *fpath, int saveheader, int *islocal, char save_title[STRLEN]);
int vedit2(const char *fpath, int saveheader, int *islocal, char save_title[STRLEN], int flags);
int veditfile(const char *fpath);
void write_header(FILE *fp, const char *mytitle);
void addsignature(FILE *fp, int ifuseanony);
Expand Down
4 changes: 2 additions & 2 deletions include/pttstruct.h
Expand Up @@ -204,7 +204,7 @@ typedef struct boardheader_t { /* 256 bytes */
// TODO BRD 快爆了,怎麼辦? 準備從 pad3 偷一個來當 attr2 吧...
// #define BRD_NOZAP 0x00000001 /* 不可 ZAP */
#define BRD_NOCOUNT 0x00000002 /* 不列入統計 */
//#define BRD_NOTRAN 0x00000004 /* 不轉信 */
#define BRD_NOTRAN 0x00000004 /* 不轉信 */
#define BRD_GROUPBOARD 0x00000008 /* 群組板 */
#define BRD_HIDE 0x00000010 /* 隱藏板 (看板好友才可看) */
#define BRD_POSTMASK 0x00000020 /* 限制發表或閱讀 */
Expand All @@ -219,7 +219,7 @@ typedef struct boardheader_t { /* 256 bytes */
#define BRD_BMCOUNT 0x00004000 /* 板主設定列入記錄 */
#define BRD_SYMBOLIC 0x00008000 /* symbolic link to board */
#define BRD_NOBOO 0x00010000 /* 不可噓 */
//#define BRD_LOCALSAVE 0x00020000 /* 預設 Local Save */
#define BRD_LOCALSAVE 0x00020000 /* 預設 Local Save */
#define BRD_RESTRICTEDPOST 0x00040000 /* 板友才能發文 */
#define BRD_GUESTPOST 0x00080000 /* guest能 post */
#define BRD_COOLDOWN 0x00100000 /* 冷靜 */
Expand Down
11 changes: 11 additions & 0 deletions innbbsd/COPYRIGHT.nocem
@@ -0,0 +1,11 @@
# Author: Yen-Ming Lee <leeym@cae.ce.ntu.edu.tw>
# Start Date: Thu Feb 25 1999 +0800
# Project: INNBBSD - NoCeM
# File: nocem.c nocem.h
#
# Copyright: Copyright (c) 2000 by Yen-Ming Lee
#
# Permission to use, copy, modify, and distribute this
# software for any purpose with or without fee is hereby
# granted, provided that the above copyright notice and this
# permission notice appear in all copies.
78 changes: 78 additions & 0 deletions innbbsd/Makefile
@@ -0,0 +1,78 @@
# $Id$
SRCROOT= ..
.include "${SRCROOT}/pttbbs.mk"

VERSION= 0.50-pttpatch
ADMINUSER?= root@your.domain.name

.if $(OSTYPE) == "FreeBSD"
# FreeBSD為了 innbbsd額外需加的參數
inn_CFLAGS= -DMMAP -DGETRUSAGE
inn_LDFLAGS= -L/usr/local/lib
.else
# Linux為了 innbbsd額外需加的參數
inn_CFLAGS= -DGETRUSAGE
inn_LDFLAGS=
.endif

CFLAGS+= -DVERSION=\"${VERSION}\" \
-DADMINUSER=\"${ADMINUSER}\" \
-DMapleBBS -DDBZDEBUG -I. \
${inn_CFLAGS} -DHMM_USE_ANTI_SPAM

LDFLAGS+= ${inn_LDFLAGS}

PROGS= bbslink bbsnnrp ctlinnbbsd \
innbbsd mkhistory

all: ${PROGS}

# bbs util
UTIL_DIR= $(SRCROOT)/util
UTIL_OBJS= util_var.o

.for fn in ${UTIL_OBJS}
LINK_UTIL_OBJS+= ${UTIL_DIR}/${fn}

${UTIL_DIR}/${fn}: # FIXME: dependency
cd ${UTIL_DIR}; make ${fn}
.endfor

LDLIBS:=$(SRCROOT)/common/bbs/libcmbbs.a \
$(SRCROOT)/common/sys/libcmsys.a \
$(SRCROOT)/common/osdep/libosdep.a \
$(LDLIBS)

echobbslib.o: echobbslib.c
${CC} ${CFLAGS} -DWITH_ECHOMAIL -c echobbslib.c

innbbsd: inndchannel.o innbbsd.o connectsock.o rfc931.o daemon.o \
file.o pmain.o his.o dbz.o closeonexec.o dbztool.o \
inntobbs.o receive_article.o echobbslib.o nocem.o
${CC} -o $@ ${LDFLAGS} $> ${LINK_UTIL_OBJS} $(LDLIBS)

bbslink: bbslink.o pmain.o inntobbs.o echobbslib.o connectsock.o \
file.o port.o
${CC} -o $@ ${LDFLAGS} $> ${LINK_UTIL_OBJS} $(LDLIBS)

bbsnnrp: bbsnnrp.o pmain.o bbslib.o connectsock.o file.o
${CC} -o $@ ${LDFLAGS} $> ${LINK_UTIL_OBJS} $(LDLIBS)

ctlinnbbsd: ctlinnbbsd.o pmain.o bbslib.o connectsock.o file.o
${CC} -o $@ ${LDFLAGS} $> ${LINK_UTIL_OBJS} $(LDLIBS)

mkhistory: mkhistory.o bbslib.o file.o his.o dbz.o port.o closeonexec.o
${CC} -o $@ ${LDFLAGS} $> ${LINK_UTIL_OBJS} $(LDLIBS)

install: ${PROGS}
install -d ${BBSHOME}/innd/
install -c -m 755 ${PROGS} ${BBSHOME}/innd/

clean:
rm -f *.o ${PROGS} core *.core

reset:
cd $(SRCROOT)/util/; ${MAKE} clean shmctl
${MAKE} clean ; ${MAKE} ; ${MAKE} install
killall innbbsd
cd ~; nohup innd/innbbsd 7777 &
25 changes: 25 additions & 0 deletions innbbsd/antisplam.h
@@ -0,0 +1,25 @@
#include "bbs.h"
#define char_lower(c) ((c >= 'A' && c <= 'Z') ? c|32 : c)

#if 0 /* string.h , libc */
int
strcasestr(str, tag)
char *str, *tag; /* tag : lower-case string */
{
char buf[256];

str_lower(buf, str);
return (int)strstr(buf, tag);
}
#endif

int
bad_subject(char *subject)
{
char *badkey[] = {"µL½X", "avcd", "mp3", NULL};
int i;
for (i = 0; badkey[i]; i++)
if (strcasestr(subject, badkey[i]))
return 1;
return 0;
}

0 comments on commit 4957994

Please sign in to comment.