diff --git a/ChangeLog b/ChangeLog index 8d1cc44b..4e24cd70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ v0.37.01 14-Jan-2003. upgrade: After upgrade you may remove ~/etc/maptabs and it's contents. + After upgrade you may remove ~/etc/bank.data. general: This version may be used on production systems, but be @@ -15,6 +16,12 @@ v0.37.01 14-Jan-2003. will be replaced by standard library functions. Right now the messages are 8 bit clean and there is no translation on the gateway. The maptabs are removed. + Menu items 22 and 23 are removed, menu 319 is added. You may + want to replace the default txtfiles and menus, upgraded + versions are in the distribution but are not automatic + installed. + Documented menu 318, was present for a long time, just not in + the html docs. nodelist.a: Added experimental support for IP nodes lookup using a default @@ -48,6 +55,7 @@ v0.37.01 14-Jan-2003. global settings. When moving a message area to area zero mbsetup doesn't crash anymore. + Added new menu item 319, remove menu items 22 and 23. mbsebbs: It will now refuse to up/download OLR packets when the system @@ -57,11 +65,16 @@ v0.37.01 14-Jan-2003. When a reply is made on a message in a newsgroup and your systems has a permanent mail domain the email address is used as from name. + Removed timebank and nextuser doors. + Added editing of user's signature file. New menu item 319. examples: The English and Dutch templates are updated to show the new nodes flow counters (html.nodes). + lang: + Changed english and dutch language prompts 107. + v0.37.00 26-Dec-2002 - 14-Jan-2003 diff --git a/TODO b/TODO index e753a622..30444a48 100644 --- a/TODO +++ b/TODO @@ -58,8 +58,6 @@ mbfido: N: Process To: and Cc: lines in messages gated from Fido to Internet. - N: Add traffic to html.nodes - N: Add macro's for stats of all months. L: Implement netmail K/S flag to mark netmail Deleted. diff --git a/examples/menus-le.tar b/examples/menus-le.tar index af3d6c7a..8f6b0f3f 100644 Binary files a/examples/menus-le.tar and b/examples/menus-le.tar differ diff --git a/examples/txtfiles-en.tar b/examples/txtfiles-en.tar index a6ddc734..b268817a 100644 Binary files a/examples/txtfiles-en.tar and b/examples/txtfiles-en.tar differ diff --git a/html/menus/menu0.html b/html/menus/menu0.html index 62d2fef5..8d7cfa59 100644 --- a/html/menus/menu0.html +++ b/html/menus/menu0.html @@ -12,10 +12,9 @@
-
Last update 26-Jun-2002
-

 

+

Last update 02-Feb-2003
-

MBSE BBS Global Menus

+

MBSE BBS Global Menus


    @@ -162,15 +161,6 @@ Optional data: None.

    -

  1. Nextuser door: This runs the message to next - user door.
    - Optional data: None.
    -

    - -

  2. Timebank door: This runs the time bank door.
    - Optional data: None.
    -

    -

  3. Safe cracker door: This runs the Safe Cracker door.
    Optional data: None.
    diff --git a/html/menus/menu300.html b/html/menus/menu300.html index 8e42ef69..7cd0475d 100644 --- a/html/menus/menu300.html +++ b/html/menus/menu300.html @@ -12,10 +12,9 @@
    -
    Last update 26-Oct-2001
    -

     

    +

    Last update 02-Feb-2003
    -

    MBSE BBS User Settings Menus

    +

    MBSE BBS User Settings Menus


      @@ -102,6 +101,17 @@ Optional data: None.

      +

    1. Change Address: Let the user change his + three lines home address.
      + Optional data: None.
      +

      + +

    2. Change signature: Let the user change + his mail signature file (.signature in his home directory). He is allowed + to edit at most 4 lines of 74 characters.
      + Optional data: None.
      +

      +


    diff --git a/html/setup/global.html b/html/setup/global.html index c53ef307..2e08f9fe 100644 --- a/html/setup/global.html +++ b/html/setup/global.html @@ -12,7 +12,7 @@
    -
    Last update 06-Jan-2003
    +
    Last update 02-Feb-2003

    MBSE BBS Setup - Global Setup

    @@ -159,17 +159,7 @@ menu.

    -

    1.9. Next User Door.

    -

    -This is a "message to nextuser" door I found in RapidBBS. It allows a user -to write a message to the next BBS user. -

    -Text file         The textfile to display
    -Quote             The prompt to show
    -
    -

    - -

    1.10. Safe cracker door.

    +

    1.9. Safe cracker door.

    This is a door I found in RapidBBS, it is a simple number guessing game.

    @@ -185,26 +175,7 @@ This is a door I found in RapidBBS, it is a simple number guessing game.
     

    -

    1.11. Time Bank Door.

    -

    -This is the timebank door I found in RapidBBS. It allows a user to deposit -time or download kilobytes on his bank account so when he needs it for -big downloads he can use his savings for extra large downloads. Anyway, -I haven't figured this one out completly for myself, so the meaning of all -these settings are not well explained right now. -

    -Time balance      Maximum time balance
    -Max time withdraw Maximum time to withdraw
    -Max time deposit  Maximum time to deposit
    -Kb. balance       Maximum Kilobytes balance
    -Max Kb. withdraw  Maximum Kilobytes to withdraw
    -Max Kb. deposit   Maximum Kilobytes to deposit
    -Users time ratio  Time ratio
    -Users Kb. ratio   Kilobytes ratio
    -
    -

    - -

    1.12. Sysop paging

    +

    1.10. Sysop paging

    For sysop chat we use a program that will connect to the users tty. This is not a nice solution because it will not work over a network, but at least @@ -224,7 +195,7 @@ it works. Sunday..Saturday The times the Sysop is normal available

    -

    1.13. Fileecho Processing.

    +

    1.11. Fileecho Processing.

    A note, when you change the number of Systems or Groups, the databases affected will be updated automatic. @@ -250,7 +221,7 @@ the file /opt/mbse/english/macro/filemgr.help to reflect the new settings. Default all these switches are set to Yes.

    -

    1.14. Edit Fidonet mail and echomail processing.

    +

    1.12. Edit Fidonet mail and echomail processing.

    Note that the first 2 mailboards must also exist in the normal mail areas if you want to see what is in them. Here they are defined for quick access of the @@ -307,7 +278,7 @@ if they are larger then 32 KBytes. Splitting is used for newfiles reports and gated news articles to Fidonet.

    -

    1.15. Edit Internet mail and news processing.

    +

    1.13. Edit Internet mail and news processing.

    Email and news is setup here. There are three possible configurations which you can set with 1.15.11: @@ -376,7 +347,7 @@ In UUCP mode the NNTP entries are replaced by:

    -

    1.16. Allfiles and Newfiles lists.

    +

    1.14. Allfiles and Newfiles lists.

    These are the settings that affect the generation of newfiles and allfiles reports.

    @@ -385,7 +356,7 @@ These are the settings that affect the generation of newfiles and allfiles repor
     Groups            The number of newfile groups the newfiles database can hold
     

    -

    1.17. Mailer Setup.

    +

    1.15. Mailer Setup.

    Note that you can't disable FTS-0001 sessions as that is a mandatory session protocol in Fidonet. There are 40 phonenumber translations present, this is for @@ -414,7 +385,7 @@ XX,CM and TCP/IP systems (internet) should use the XX,CM,IBN,IFC flags. Max. MBytes Maximum MBytes to request, 0 is unlimited -

    1.18. FTPD Settings.

    +

    1.16. FTPD Settings.

    A new program is mbftpd. This is a replacement for the normal ftp server for Linux with special futures for MBSE BBS. This is not working @@ -440,7 +411,7 @@ yet and is not included in the distribution. Setting it up is adviced. User mbse If user mbse is allowed. Dangerous! -

    1.19. Edit HTML pages setup.

    +

    1.17. Edit HTML pages setup.

    Here you setup the HTML pages that can be created with the mbfile web command. These are HTML pages of your download @@ -473,7 +444,7 @@ there is no user authentication yet available.

    -

    1.20. Manager flag Descriptions.

    +

    1.18. Manager flag Descriptions.

    In this menu you can give the 32 area-/filemgr flags a meaningfull description.

    diff --git a/lang/Language.xref b/lang/Language.xref index 71fafb41..14551039 100644 --- a/lang/Language.xref +++ b/lang/Language.xref @@ -9,32 +9,32 @@ 8 user.c filesub.c |Password: 9 user.c |Maximum login attempts have been exceeded ... 10 user.c |Either your NAME or PASSWORD is incorrect -11 bank.c | MBSE BBS System Bank -12 bank.c |Bank Account: -13 bank.c |Time in account -14 bank.c |Bytes in account -15 bank.c |Time deposited today -16 bank.c |Bytes deposited today -17 bank.c |Time withdrawn today -18 bank.c |Bytes withdrawn today -19 bank.c DWQ|(D)eposit, (W)ithdraw, (Q)uit: -20 bank.c |Bank > -21 bank.c TBQ|(T)ime, (B)ytes, (Q)uit : -22 bank.c |You must have at least 5 minutes remaining to deposit -23 bank.c |How much time. Minutes available to you is -24 bank.c |You have tried to deposit more than the maximum limit today. -25 bank.c |Maximum allowed minutes to deposit per day: -26 bank.c |You have exeeded your account balance. -27 bank.c |Maximum allowable minutes in bank account is: -28 bank.c |You are allowed to deposit: -29 bank.c |You have tried to withdraw more than the maximum limit today. -30 bank.c |Maximum allowed to withdraw per day: -31 bank.c |You have tried to withdraw more time than is in your bank account. -32 bank.c |Current bank balance: -33 bank.c |Maximum allowed kilobytes to deposit per day: -34 bank.c |You have exeeded your account balance. -35 bank.c |Maximum allowable kilobytes in bank account is: -36 bank.c |How many kilobytes. KBytes available to you is +11 .c | +12 .c | +13 .c | +14 .c | +15 .c | +16 .c | +17 .c | +18 .c | +19 .c | +20 .c | +21 .c | +22 .c | +23 .c | +24 .c | +25 .c | +26 .c | +27 .c | +28 .c | +29 .c | +30 .c | +31 .c | +32 .c | +33 .c | +34 .c | +35 .c | +36 .c | 37 newuser.c |MBSE Bulletin Board System - NEW USER REGISTRATION 38 newuser.c |Use this name: 39 newuser.c |Please enter new password : @@ -105,19 +105,19 @@ 104 safe.c |has cracked the safe. 105 safe.c |The safe will remain locked until the sysop rewards the user. 106 safe.c |Maximum trys per day Exceeded! -107 nextuser.c |Message to Nextuser Door -108 nextuser.c |The FROM, TO and SUBJECT fields are optional. -109 nextuser.c | From: -110 nextuser.c | To: -111 nextuser.c |Subject: -112 nextuser.c | Type up to 10 lines 74 Characters per line -113 nextuser.c |Functions available: -114 nextuser.c LREAS|(L)ist, (R)eplace text, (E)dit line, (A)bort, (S)ave -115 nextuser.c |Select: -116 nextuser.c file.c |Aborting... -117 nextuser.c |Returning to -118 nextuser.c |Edit which line: -119 nextuser.c |Line does not exist. +107 signature.c |Edit message signature +108 .c |The FROM, TO and SUBJECT fields are optional. +109 .c | From: +110 .c | To: +111 .c |Subject: +112 .c | Type up to 4 lines 74 Characters per line +113 signature.c |Functions available: +114 signature.c LREAS|(L)ist, (R)eplace text, (E)dit line, (A)bort, (S)ave +115 signature.c |Select: +116 signature.c file.c |Aborting... +117 signature.c |Returning to +118 signature.c |Edit which line: +119 signature.c |Line does not exist. 120 change.c |Old Password: 121 change.c |New password: 122 change.c |Confirm new password: @@ -184,7 +184,7 @@ 183 lineedit.c |Enter line # to insert text before 184 lineedit.c |List 185 lineedit.c |Enter line # to replace -186 lineedit.c nextuser.c |Line reads: +186 lineedit.c signature.c |Line reads: 187 lineedit.c |Unchanged. 188 lineedit.c |Line now reads: 189 lineedit.c mail.c |Quit @@ -193,8 +193,8 @@ 192 lineedit.c |No 193 lineedit.c |Text Edit 194 lineedit.c |Enter line # to edit -195 lineedit.c nextuser.c |Text to replace : -196 lineedit.c nextuser.c |Replacement text : +195 lineedit.c signature.c |Text to replace : +196 lineedit.c signature.c |Replacement text : 197 lineedit.c |Line now reads: 198 lineedit.c |Save 199 filesub.c |Possible VIRUS found! @@ -338,7 +338,7 @@ 337 bbslist.c |seen you have marked a record for deletion. 338 offline.c |Total messages found: 339 menu.c |Unknown Menu Command! -340 nextuser.c |Saving... +340 signature.c |Saving... 341 oneline.c |MBSE BBS Oneliners will randomly appear on the main menu. 342 oneline.c |Obscene or libellous oneliners will be deleted!! 343 oneline.c |Please enter your oneliner below. You have 75 characters. diff --git a/lang/dutch.txt b/lang/dutch.txt index 45a1841b..b5b45988 100644 --- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -105,7 +105,7 @@ JN|Wilt U de kluis openenen ? [J/n]: |heeft de kluis grkraakt. |De kluis blijft op slot tot de sysop de gebruiker beloond heeft. |Maximaal aantal pogingen perdag bereikt! -|Bericht naar volgende gebruiker +|Wijzig berichten handtekening |De VAN, AAN en ONDERWERP velden zijn opties. | Van: | Aan: diff --git a/lang/english.txt b/lang/english.txt index ea27a520..139e84ff 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -105,7 +105,7 @@ YN|Do you want to open the safe ? [Y/n]: |has cracked the safe. |The safe will remain locked until the sysop rewards the user. |Maximum trys per day Exceeded! -|Message to Nextuser Door +|Edit message signature |The FROM, TO and SUBJECT fields are optional. | From: | To: diff --git a/lib/records.h b/lib/records.h index f229f5d2..26d7d07a 100644 --- a/lib/records.h +++ b/lib/records.h @@ -4,7 +4,7 @@ * Purpose ...............: MBSE BBS Global records structure * ***************************************************************************** - * Copyright (C) 1997-2002 + * Copyright (C) 1997-2003 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -74,9 +74,6 @@ struct msgareas msgs; struct _mgrouphdr mgrouphdr; /* Message groups */ struct _mgroup mgroup; -struct timebankhdr bankhdr; /* Timebank structure */ -struct timebank bank; - struct languagehdr langhdr; /* Language data */ struct language lang; struct langdata ldata; diff --git a/lib/structs.h b/lib/structs.h index d373e7ed..9e5cfdc8 100644 --- a/lib/structs.h +++ b/lib/structs.h @@ -615,9 +615,8 @@ struct sysconfig { int MsgInputColourF; /* MsgInput Filename Colour */ int MsgInputColourB; /* MsgInput Filename Colour */ - /* Next User Door */ - char sNuScreen[50]; /* Next user txtfile */ - char sNuQuote[81]; /* next user quote */ + char xNuScreen[50]; /* Obsolete Next User Door */ + char xNuQuote[81]; /* Safe Cracker Door */ int iSafeFirstDigit; /* Safe Door First Digit */ @@ -648,16 +647,15 @@ struct sysconfig { /* Mail Options */ char xquotestr[11]; /* Quote String */ - /* Time Bank Door */ - int iMaxTimeBalance; /* Users Time Balance */ - int iMaxTimeWithdraw; /* Max Time WithDrawel */ - int iMaxTimeDeposit; /* Max Time Deposit Per day */ - int iMaxByteBalance; /* Users Time Balance */ - int iMaxByteWithdraw; /* Max Time WithDrawel */ - int iMaxByteDeposit; /* Max Time Deposit Per dat */ + int xMaxTimeBalance; /* Obsolete Time Bank Door */ + int xMaxTimeWithdraw; + int xMaxTimeDeposit; + int xMaxByteBalance; + int xMaxByteWithdraw; + int xMaxByteDeposit; unsigned xNewBytes : 1; - char sTimeRatio[7]; /* User Time Ratio,Returned */ - char sByteRatio[7]; /* User Time Ratio,Returned */ + char xTimeRatio[7]; + char xByteRatio[7]; long new_groups; /* Maximum newfiles groups */ int new_split; /* Split reports at KB. */ @@ -805,6 +803,8 @@ struct sysconfig { unsigned ca_Passwd : 1; /* Areamgr: Passwd change */ unsigned ca_Pause : 1; /* Areamgr: Allow Pause */ unsigned ca_Check : 1; /* Flag for upgrade check */ + + char rulesdir[65]; /* Area rules directory */ }; @@ -930,27 +930,6 @@ struct msgareas { -/* - * System Bank Control Structure (bank.data) - */ -struct timebankhdr { - long hdrsize; /* Size of header */ - long recsize; /* Size of records */ -}; - -struct timebank { - char Name[36]; /* Account Name */ - char Date[12]; /* Current Date */ - int TimeDeposit; /* Time deposited today */ - int KByteDeposit; /* Bytes deposited today */ - int TimeWithdraw; /* Time withdrawn today */ - int KByteWithdraw; /* Bytes withdrawn today */ - int TimeBalance; /* Current Time Balance */ - int KByteBalance; /* Current Byte Balance */ -}; - - - /* * Structure for Language file (language.data) */ diff --git a/mbsebbs/Makefile b/mbsebbs/Makefile index afa9a316..7963c894 100644 --- a/mbsebbs/Makefile +++ b/mbsebbs/Makefile @@ -4,25 +4,25 @@ include ../Makefile.global -SRCS = bank.c filesub.c language.c mbtoberep.c \ +SRCS = signature.c filesub.c language.c mbtoberep.c \ msgutil.c oneline.c bbslist.c morefile.c \ email.c fsedit.c lineedit.c mblang.c mbuser.c page.c \ bye.c funcs.c mail.c \ newuser.c pinfo.c timecheck.c change.c \ - exitinfo.c mball.c mbsebbs.c menu.c nextuser.c pop3.c lastcallers.c \ + exitinfo.c mball.c mbsebbs.c menu.c pop3.c lastcallers.c \ safe.c timeout.c chat.c file.c mbchat.c mbstat.c misc.c \ offline.c user.c mbnewusr.c input.c whoson.c \ door.c dispfile.c userlist.c timestats.c logentry.c -HDRS = bank.h filesub.h language.h mbsebbs.h misc.h offline.h \ +HDRS = signature.h filesub.h language.h mbsebbs.h misc.h offline.h \ timeout.h bbslist.h email.h fsedit.h lineedit.h \ mbstat.h msgutil.h oneline.h user.h bye.h morefile.h \ funcs.h mail.h mbuser.h page.h \ change.h exitinfo.h mball.h newuser.h \ pinfo.h chat.h file.h menu.h \ - nextuser.h pop3.h safe.h timecheck.h mbnewusr.h input.h whoson.h \ + pop3.h safe.h timecheck.h mbnewusr.h input.h whoson.h \ door.h dispfile.h userlist.h timestats.h logentry.h lastcallers.h -MBSEBBS_OBJS = bank.o bbslist.o chat.o file.o funcs.o mail.o menu.o \ - misc.o pinfo.o nextuser.o oneline.o page.o fsedit.o \ +MBSEBBS_OBJS = signature.o bbslist.o chat.o file.o funcs.o mail.o menu.o \ + misc.o pinfo.o oneline.o page.o fsedit.o \ bye.o change.o mbsebbs.o safe.o timeout.o user.o timecheck.o \ exitinfo.o filesub.o lineedit.o offline.o language.o msgutil.o \ pop3.o email.o input.o whoson.o door.o dispfile.o userlist.o timestats.o \ @@ -134,7 +134,7 @@ depend: # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT # Dependencies generated by make depend -bank.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h bank.h input.h language.h dispfile.h timeout.h timecheck.h whoson.h exitinfo.h +signature.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/ansi.h ../lib/clcomm.h ../lib/common.h signature.h funcs.h input.h language.h timeout.h filesub.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h filesub.h funcs.h language.h input.h misc.h timeout.h exitinfo.h change.h language.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h input.h language.h mbtoberep.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/mberrors.h @@ -158,8 +158,7 @@ change.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/struc exitinfo.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h funcs.h input.h language.h oneline.h misc.h bye.h timeout.h timecheck.h exitinfo.h mball.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/mbse.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/dbcfg.h ../lib/clcomm.h ../lib/mberrors.h mball.h mbsebbs.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/mberrors.h mbsebbs.h user.h dispfile.h language.h menu.h misc.h bye.h timeout.h funcs.h -menu.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h oneline.h mail.h bbslist.h change.h bank.h chat.h file.h funcs.h input.h misc.h nextuser.h safe.h timeout.h menu.h page.h pinfo.h bye.h timecheck.h whoson.h language.h offline.h email.h door.h dispfile.h userlist.h timestats.h logentry.h morefile.h lastcallers.h -nextuser.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/ansi.h ../lib/clcomm.h ../lib/common.h nextuser.h funcs.h input.h language.h timeout.h +menu.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h oneline.h mail.h bbslist.h change.h chat.h file.h funcs.h input.h misc.h safe.h timeout.h menu.h page.h pinfo.h bye.h timecheck.h whoson.h language.h offline.h email.h door.h dispfile.h userlist.h timestats.h logentry.h morefile.h lastcallers.h signature.h pop3.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mbinet.h ../lib/msgtext.h ../lib/msg.h msgutil.h pop3.h lastcallers.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h input.h language.h lastcallers.h safe.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h whoson.h dispfile.h input.h misc.h safe.h timeout.h language.h diff --git a/mbsebbs/bank.c b/mbsebbs/bank.c deleted file mode 100644 index 7c0f482e..00000000 --- a/mbsebbs/bank.c +++ /dev/null @@ -1,580 +0,0 @@ -/***************************************************************************** - * - * $Id$ - * Purpose ...............: Time/Bytes Bank - * - ***************************************************************************** - * Copyright (C) 1997-2002 - * - * Michiel Broek FIDO: 2:2801/16 - * Beekmansbos 10 Internet: mbroek@ux123.pttnwb.nl - * 1971 BV IJmuiden - * the Netherlands - * - * This file is part of MBSE BBS. - * - * This BBS is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. - * - * MBSE BBS is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with MBSE BBS; see the file COPYING. If not, write to the Free - * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - *****************************************************************************/ - -#include "../config.h" -#include "../lib/libs.h" -#include "../lib/memwatch.h" -#include "../lib/mbse.h" -#include "../lib/structs.h" -#include "../lib/users.h" -#include "../lib/records.h" -#include "../lib/clcomm.h" -#include "../lib/common.h" -#include "bank.h" -#include "input.h" -#include "language.h" -#include "dispfile.h" -#include "timeout.h" -#include "timecheck.h" -#include "whoson.h" -#include "exitinfo.h" - - -/* - * internal function prototypes - */ -int BankMenu(void); -void AddAccount(void); -void Deposit(void); -void Withdraw(void); -void DepositTime(void); -void WithdrawTime(void); - -void DepositBytes(void); -void WithdrawBytes(void); - -FILE *pBank; -int usernum = 0; -long bankset; - - - -/* - * Timebank, called from the menu system. - */ -void Bank() -{ - int FoundName = FALSE; - int Loop = TRUE; - char *temp, temp1[81]; - - DisplayFile((char *)"bank"); - temp = calloc(PATH_MAX, sizeof(char)); - - while(Loop) { - FoundName = FALSE; - usernum = 0; - WhosDoingWhat(TIMEBANK); - - sprintf(temp, "%s/etc/bank.data", getenv("MBSE_ROOT")); - if ((pBank = fopen(temp, "r+")) == NULL) { - /* Create a new database */ - pBank = fopen(temp, "a+"); - bankhdr.hdrsize = sizeof(bankhdr); - bankhdr.recsize = sizeof(bank); - fwrite(&bankhdr, sizeof(bankhdr), 1, pBank); - fclose(pBank); - chmod(temp, 0660); - Syslog('-', "Created %s", temp); - AddAccount(); - if ((pBank = fopen(temp, "r+")) == NULL) { - WriteError("Unable to open %s", temp); - free(temp); - return; - } - } - - fread(&bankhdr, sizeof(bankhdr), 1, pBank); - fseek(pBank, bankhdr.hdrsize, 0); - while (fread(&bank, bankhdr.recsize, 1, pBank) == 1) { - if((strcmp(bank.Name, exitinfo.sUserName)) == 0) { - FoundName = TRUE; - break; - } else - usernum++; - } /* End of while */ - - fclose(pBank); - - if(!FoundName) - AddAccount(); - - if ((pBank = fopen(temp, "r+")) == NULL) - AddAccount(); - - bankset = bankhdr.hdrsize + (usernum * bankhdr.recsize); - if (fseek(pBank, bankset, 0) != 0) - WriteError("Can't move pointer there."); - - fread(&bank, bankhdr.recsize, 1, pBank); - - sprintf(temp1, "%s", (char *) GetDateDMY()); - if ((strcmp(temp1, bank.Date)) != 0) { - bank.TimeWithdraw = 0; - bank.KByteWithdraw = 0; - bank.TimeDeposit = 0; - bank.KByteDeposit = 0; - sprintf(bank.Date, "%s", (char *) GetDateDMY()); - } - - Loop = BankMenu(); - } - free(temp); -} - - - -int BankMenu() -{ - int i; - - clear(); - /* MBSE BBS System Bank */ - language(4, 7, 11); - colour(15, 0); - sLine(); - /* Bank Account: */ - language(3, 0, 12); - poutCR(15, 0, bank.Name); - colour(15, 0); - sLine(); - - /* Time in account */ - language(10, 0, 13); - colour(15, 0); - printf("%d\n", bank.TimeBalance); - - /* Bytes in account */ - language(10, 0, 14); - colour(15, 0); - printf("%d\n", bank.KByteBalance); - - /* Time deposited today */ - language(10, 0, 15); - colour(15, 0); - printf("%d\n", bank.TimeDeposit); - - /* Bytes deposited today */ - language(10, 0, 16); - colour(15, 0); - printf("%d\n", bank.KByteDeposit); - - /* Time withdrawn today */ - language(10, 0, 17); - colour(15, 0); - printf("%d\n", bank.TimeWithdraw); - - /* Bytes withdrawn today */ - language(10, 0, 18); - colour(15, 0); - printf("%d\n", bank.KByteWithdraw); - - colour(15, 0); - sLine(); - TimeCheck(); - /* (D)eposit, (W)ithdraw, (Q)uit */ - language(12, 0, 19); - Enter(2); - - /* Bank > */ - language(15, 0, 20); - fflush(stdout); - - alarm_on(); - i = toupper(Getone()); - - if (i == Keystroke(19, 0)) - Deposit(); - else - if (i == Keystroke(19, 1)) - Withdraw(); - else - if (i == Keystroke(19, 2)) - return FALSE; - - return TRUE; -} - - - -void AddAccount() -{ - char *temp; - - temp = calloc(PATH_MAX, sizeof(char)); - - sprintf(temp, "%s/etc/bank.data", getenv("MBSE_ROOT")); - - if ((pBank = fopen(temp, "a+")) == NULL) - WriteError("Can't open %s for updating", temp); - else { - memset(&bank, 0, sizeof(bank)); - strcpy(bank.Name, exitinfo.sUserName); - sprintf(bank.Date, "%s", (char *) GetDateDMY()); - fwrite(&bank, sizeof(bank), 1, pBank); - fclose(pBank); - } - free(temp); -} - - - -void Deposit() -{ - int i; - - /* (T)ime, (B)ytes, (Q)uit : */ - language(3, 0, 21); - fflush(stdout); - - alarm_on(); - i = toupper(Getone()); - - if (i == Keystroke(21, 0)) - DepositTime(); - else - if (i == Keystroke(21, 1)) - DepositBytes(); -} - - - -void Withdraw() -{ - int i; - - /* (T)ime, (B)ytes, (Q)uit : */ - language(3, 0, 21); - fflush(stdout); - - alarm_on(); - i = toupper(Getone()); - - if (i == Keystroke(21, 0)) - WithdrawTime(); - else - if (i == Keystroke(21, 1)) - WithdrawBytes(); -} - - - -void DepositTime() -{ - int x; - char *temp; - - temp = calloc(PATH_MAX, sizeof(char)); - - ReadExitinfo(); - fflush(stdin); - - if(exitinfo.iTimeLeft <= 5) { - Enter(2); - /* You must have at least 5 minutes remaining to deposit */ - language(12, 0, 22); - Enter(2); - Pause(); - free(temp); - return; - } - - Enter(1); - /* How much time. Minutes available to you is */ - language(15, 0, 23); - printf("%d: ", exitinfo.iTimeLeft - 5); - colour(CFG.InputColourF, CFG.InputColourB); - GetstrC(temp, 80); - - if((strcmp(temp, "")) == 0) { - free(temp); - return; - } - - x = atoi(temp); - bank.TimeDeposit += x; - bank.TimeBalance += x; - - if(bank.TimeDeposit > CFG.iMaxTimeDeposit) { - colour(10, 0); - Enter(1); - /* You have tried to deposit more than the maximum limit today. */ - language(10, 0, 24); - Enter(1); - - /* Maximum allowed minutes to deposit per day: */ - language(12, 0, 25); - printf("%d.\n\n", CFG.iMaxTimeDeposit); - Pause(); - fclose(pBank); - free(temp); - return; - } - - if(bank.TimeBalance > CFG.iMaxTimeBalance) { - Enter(1); - /* You have exeeded your account balance. */ - language(10, 0, 26); - /* Maximum allowable minutes in bank account is: */ - language(12, 0, 27); - printf("%d\n", CFG.iMaxTimeBalance); - /* You are allowed to deposit: */ - language(14, 0, 28); - printf("%d\n\n", CFG.iMaxTimeBalance - (bank.TimeBalance - x) ); - Pause(); - fclose(pBank); - free(temp); - return; - } - - Time2Go -= (x * 60); - TimeCheck(); - - bankset = bankhdr.hdrsize + (usernum * bankhdr.recsize); - if(fseek(pBank, bankset, 0) != 0) - WriteError("Can't move pointer there."); - - fwrite(&bank, sizeof(bank), 1, pBank); - fclose(pBank); - - free(temp); -} - - - -void WithdrawTime() -{ - char *temp; - int x; - - temp = calloc(PATH_MAX, sizeof(char)); - - ReadExitinfo(); - - /* How much time. Minutes available to you is */ - Enter(1); - language(15, 0, 23); - printf("%d: ", bank.TimeBalance); - colour(CFG.InputColourF, CFG.InputColourB); - GetstrC(temp, 80); - - if((strcmp(temp, "")) == 0) { - free(temp); - return; - } - - x = atoi(temp); - - bank.TimeWithdraw += x; - bank.TimeBalance -= x; - - if(bank.TimeWithdraw > CFG.iMaxTimeWithdraw) { - Enter(1); - /* You have tried to withdraw more than the maximum limit today. */ - language(10, 0, 29); - /* Maximum allowed to withdraw per day: */ - language(12, 0, 30); - printf("%d.\n\n", CFG.iMaxTimeWithdraw); - Pause(); - fclose(pBank); - free(temp); - return; - } - - if(x > bank.TimeBalance + x) { - Enter(1); - /* You have tried to withdraw more time than is in your bank account. */ - language(10, 0, 31); - /* Current bank balance: */ - language(10, 0, 32); - printf("%d.\n\n", bank.TimeBalance + x); - Pause(); - fclose(pBank); - free(temp); - return; - } - - Time2Go += (x * 60); - TimeCheck(); - - bankset = bankhdr.hdrsize + (usernum * bankhdr.recsize); - - if(fseek(pBank, bankset, 0) != 0) - WriteError("Can't move pointer there."); - - fwrite(&bank, sizeof(bank), 1, pBank); - fclose(pBank); - free(temp); -} - - - -void DepositBytes() -{ - char *temp; - int x; - - temp = calloc(PATH_MAX, sizeof(char)); - - ReadExitinfo(); - - if(exitinfo.DownloadKToday <= 5) { - Enter(2); - /* You must have at least 5 bytes remaining to deposit */ - language(12, 0, 22); - Enter(2); - Pause(); - free(temp); - return; - } - - Enter(1); - /* Bytes available: */ - language(15, 0, 36); - printf("%lu: ", exitinfo.DownloadKToday); - colour(CFG.InputColourF, CFG.InputColourB); - GetstrC(temp, 80); - - if((strcmp(temp, "")) == 0) { - free(temp); - return; - } - - x = atoi(temp); - bank.KByteDeposit += x; - bank.KByteBalance += x; - - if(bank.KByteDeposit > CFG.iMaxByteDeposit * 1000) { - Enter(1); - /* You have tried to deposit more than the maximum limit today. */ - language(10, 0, 25); - Enter(1); - colour(12, 0); - /* Maximum allowed kilobytes to deposit per day: */ - language(12, 0, 33); - printf("%d.\n\n", CFG.iMaxByteDeposit); - Pause(); - fclose(pBank); - free(temp); - return; - } - - if(bank.KByteBalance > CFG.iMaxByteBalance * 1000) { - Enter(1); - /* You have exeeded your account balance. */ - language(10, 0, 34); - Enter(1); - /* Maximum allowable kilobytes in bank account is: */ - language(12, 0, 35); - printf("%d\n", CFG.iMaxByteBalance); - colour(14, 0); - /* You are allowed to deposit: */ - language(14, 0, 28); - printf("%d\n\n", CFG.iMaxByteBalance - (bank.KByteBalance - x) ); - Pause(); - fclose(pBank); - free(temp); - return; - } - - exitinfo.DownloadKToday -= x; - WriteExitinfo(); - - bankset = bankhdr.hdrsize + (usernum * bankhdr.recsize); - - if(fseek(pBank, bankset, 0) != 0) - WriteError("Can't move pointer there."); - - fwrite(&bank, sizeof(bank), 1, pBank); - fclose(pBank); - free(temp); -} - - - -void WithdrawBytes() -{ - char *temp; - int x; - - temp = calloc(PATH_MAX, sizeof(char)); - - ReadExitinfo(); - - Enter(1); - /* How many bytes. Bytes available to you is */ - language(15, 0, 36); - printf("%d: ", bank.KByteBalance); - colour(CFG.InputColourF, CFG.InputColourB); - GetstrC(temp, 80); - - if((strcmp(temp, "")) == 0) { - free(temp); - return; - } - - x = atoi(temp); - bank.KByteWithdraw += x; - bank.KByteBalance -= x; - - if(bank.KByteWithdraw > CFG.iMaxByteWithdraw * 1000) { - Enter(1); - /* You have tried to withdraw more than the maximum limit today. */ - language(10, 0, 29); - Enter(1); - colour(12, 0); - /* Maximum allowed to withdraw per day: */ - language(12, 0, 30); - printf("%d bytes.\n\n", CFG.iMaxByteWithdraw); - Pause(); - fclose(pBank); - free(temp); - return; - } - - if(x > bank.KByteBalance + x) { - Enter(1); - /* You have tried to withdraw more time than is in your bank account. */ - language(10, 0, 31); - Enter(1); - colour(12, 0); - /* Current bank balance: */ - language(12, 0, 32); - printf("%d.\n\n", bank.KByteBalance + x); - Pause(); - fclose(pBank); - free(temp); - return; - } - - exitinfo.DownloadKToday += x; - WriteExitinfo(); - - bankset = bankhdr.hdrsize + (usernum * bankhdr.recsize); - - if(fseek(pBank, bankset, 0) != 0) - WriteError("Can't move pointer there."); - - fwrite(&bank, sizeof(bank), 1, pBank); - fclose(pBank); - free(temp); -} - - diff --git a/mbsebbs/bank.h b/mbsebbs/bank.h deleted file mode 100644 index 2239fc91..00000000 --- a/mbsebbs/bank.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _BANK_H -#define _BANK_H - -void Bank(void); - -#endif - diff --git a/mbsebbs/filesub.c b/mbsebbs/filesub.c index 8693c166..dd577ebc 100644 --- a/mbsebbs/filesub.c +++ b/mbsebbs/filesub.c @@ -763,8 +763,8 @@ char *GetFileType(char *fn) int ImportFile(char *fn, int Area, int fileid, time_t iTime, off_t Size) { char *temp, *temp1; - int i, x; - char *token; +// int i, x; +// char *token; temp = calloc(PATH_MAX, sizeof(char)); temp1 = calloc(PATH_MAX, sizeof(char)); @@ -794,12 +794,12 @@ int ImportFile(char *fn, int Area, int fileid, time_t iTime, off_t Size) * Give back the user his bytes from the upload * Work out byte ratio, then give time back to user */ - strcpy(temp, CFG.sByteRatio); - token = strtok(temp, ":"); - i = atoi(token); - token = strtok(NULL, "\0"); - x = atoi(token); - Size *= i / x; +// strcpy(temp, CFG.sByteRatio); +// token = strtok(temp, ":"); +// i = atoi(token); +// token = strtok(NULL, "\0"); +// x = atoi(token); +// Size *= i / x; /* You have */ /* extra download KBytes. */ printf("%s %ld %s\n", (char *) Language(249), (long)(Size / 1024), (char *) Language(250)); @@ -812,13 +812,13 @@ int ImportFile(char *fn, int Area, int fileid, time_t iTime, off_t Size) * Work out time ratio, then give time back to user * Ratio 3:1, Upload time: times by 3 / 1 */ - strcpy(temp, CFG.sTimeRatio); - token = strtok(temp, ":"); - i = atoi(token); - token = strtok(NULL, "\0"); - x = atoi(token); +// strcpy(temp, CFG.sTimeRatio); +// token = strtok(temp, ":"); +// i = atoi(token); +// token = strtok(NULL, "\0"); +// x = atoi(token); - iTime *= i / x; +// iTime *= i / x; iTime /= 60; /* Divide Seconds by 60 to give minutes */ /* You have */ /* extra minutes. */ printf("%s %ld %s\n", (char *) Language(249), iTime, (char *) Language(259)); diff --git a/mbsebbs/menu.c b/mbsebbs/menu.c index 0b223b90..6d212967 100644 --- a/mbsebbs/menu.c +++ b/mbsebbs/menu.c @@ -4,7 +4,7 @@ * Purpose ...............: Display and handle the menus. * ***************************************************************************** - * Copyright (C) 1997-2002 + * Copyright (C) 1997-2003 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -42,13 +42,11 @@ #include "mail.h" #include "bbslist.h" #include "change.h" -#include "bank.h" #include "chat.h" #include "file.h" #include "funcs.h" #include "input.h" #include "misc.h" -#include "nextuser.h" #include "safe.h" #include "timeout.h" #include "menu.h" @@ -67,6 +65,7 @@ #include "logentry.h" #include "morefile.h" #include "lastcallers.h" +#include "signature.h" @@ -419,19 +418,7 @@ void DoMenu(int Type) /* display menuline only */ break; - case 22: - /* nextuser door */ - nextuser(); - break; - - case 23: - /* timebank door */ - Bank(); - break; - - case 24: - /* voting door Not anymore */ - break; + /* Menus 22, 23 and 24 were obsolete doors */ case 25: /* safe cracker door */ @@ -661,6 +648,10 @@ void DoMenu(int Type) Chg_Address(); break; + case 319: + signature(); + break; + case 401: Oneliner_Add(); break; diff --git a/mbsebbs/nextuser.c b/mbsebbs/nextuser.c deleted file mode 100644 index e42f0d33..00000000 --- a/mbsebbs/nextuser.c +++ /dev/null @@ -1,362 +0,0 @@ -/***************************************************************************** - * - * $Id$ - * Purpose ...............: Message to next User door - * - ***************************************************************************** - * Copyright (C) 1997-2002 - * - * Michiel Broek FIDO: 2:280/2802 - * Beekmansbos 10 - * 1971 BV IJmuiden - * the Netherlands - * - * This file is part of MBSE BBS. - * - * This BBS is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. - * - * MBSE BBS is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with MBSE BBS; see the file COPYING. If not, write to the Free - * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - *****************************************************************************/ - -#include "../config.h" -#include "../lib/libs.h" -#include "../lib/memwatch.h" -#include "../lib/mbse.h" -#include "../lib/structs.h" -#include "../lib/users.h" -#include "../lib/records.h" -#include "../lib/ansi.h" -#include "../lib/clcomm.h" -#include "../lib/common.h" -#include "nextuser.h" -#include "funcs.h" -#include "input.h" -#include "language.h" -#include "timeout.h" - - -int iLoop, iLine = 1; - -char sFrom[81]; -char To[81]; -char Subject[81]; - -int finish(void); -void addlines(void); - -char *sLiNE[11]; - - - -void nextuser(void) -{ - int i; - - for (i = 0; i < 11; i++) - *(sLiNE + i) = (char *) calloc(81, sizeof(char)); - - addlines(); - while (TRUE) { - if (finish() == TRUE) - break; - } - - for (i = 0; i < 11; i++) - free(*(sLiNE + i)); -} - - - -void addlines(void) -{ - iLine = 1; - clear(); - - /* Message to Nextuser Door */ - pout(15, 0, (char *) Language(107)); - Enter(2); - - Syslog('+', "%s ran Nextuser Door", exitinfo.sUserName); - - /* The FROM, TO and SUBJECT fields are optional. */ - pout(14, 0, (char *) Language(108)); - Enter(1); - - Enter(1); - /* From: */ - pout(12, 0, (char *) Language(109)); - colour(9, 0); - fflush(stdout); - Getname(sFrom, 50); - - /* To: */ - pout(12, 0, (char *) Language(110)); - colour(9, 0); - fflush(stdout); - Getname(To, 50); - - /* Subject: */ - pout(12, 0, (char *) Language(111)); - colour(9, 0); - fflush(stdout); - GetstrC(Subject, 80); - - Enter(2); - /* Type up to 10 lines 74 Characters per line */ - pout(10 , 0, (char *) Language(112)); - Enter(1); - - colour(14, 0); - printf(" Õ"); - for(iLoop = 0; iLoop <= 75; iLoop++) - printf("Í"); - printf("¸"); - - while (1) { - colour(12, 0); - printf("%d: ", iLine); - colour(9, 0); - fflush(stdout); - GetstrC(*(sLiNE + iLine), 75); - - if ((strcmp(*(sLiNE + iLine), "")) == 0) - return; - - iLine++; - if(iLine >= 11) - break; - } - - pout(14, 0, (char *)" Ô"); - for(iLoop = 0; iLoop <= 75; iLoop++) - printf("Í"); - printf("¾"); -} - - - -/* Save Abort File */ -int finish(void) -{ - FILE *pTextFileANS, *pTextFileASC; - int iStrLen, i, x, NLChk = FALSE; - char *temp, *temp1; - - temp = calloc(PATH_MAX, sizeof(char)); - temp1 = calloc(PATH_MAX, sizeof(char)); - - while (TRUE) { - Enter(1); - poutCR(15, 0, (char *) Language(113)); - Enter(1); - /* (L)ist, (R)eplace text, (E)dit line, (A)bort, (S)ave */ - pout(15, 1, (char *) Language(114)); - Enter(2); - - /* Select: */ - pout(15, 0, (char *) Language(115)); - - fflush(stdout); - - alarm_on(); - i = toupper(Getone()); - - if (i == Keystroke(114, 3)) { - /* Aborting... */ - pout(15, 0, (char *) Language(116)); - Enter(1); - Enter(1); - pout(15, 0, (char *) Language(117)); - poutCR(15, 0, CFG.bbs_name); - sleep(2); - Syslog('+', "User aborted message and exited door"); - free(temp); - free(temp1); - return TRUE; - } else - - if (i == Keystroke(114, 2)) { - /* Edit which line: */ - printf("\n %s", (char *) Language(118)); - GetstrC(temp, 80); - - if((strcmp(temp, "")) == 0) - break; - - i = atoi(temp); - if( i > iLine - 1) { - /* Line does not exist. */ - printf("%s\n", (char *) Language(119)); - break; - } - x = strlen(sLiNE[i]); - printf("%d : %s", i, *(sLiNE + i)); - fflush(stdout); - GetstrP(sLiNE[i],74, x); - } else - - if (i == Keystroke(114, 0)) { - colour(14, 0); - printf("\n\n Õ"); - for (iLoop = 0; iLoop <= 75; iLoop++) - printf("Í"); - printf("¸"); - - for(i = 1; i < iLine; i++) { - colour(12, 0); - printf("%d: ", i); - colour(9, 0); - printf("%s\n", *(sLiNE + i)); - } - - colour(14, 0); - printf(" Ô"); - for (iLoop = 0; iLoop <= 75; iLoop++) - printf("Í"); - printf("¾\n"); - } else - - if (i == Keystroke(114, 4)) { - /* Open TextFile for Writing NextUser Info */ - sprintf(temp, "%s/%s.ans", CFG.bbs_txtfiles, CFG.sNuScreen); - sprintf(temp1, "%s/%s.ans.bak", CFG.bbs_txtfiles, CFG.sNuScreen); - rename(temp, temp1); - - if((pTextFileANS = fopen(temp, "w")) == NULL) { - perror(""); - WriteError("NextUser: Can't open file: %s", temp); - return TRUE; - } - - sprintf(temp, "%s/%s.asc", CFG.bbs_txtfiles, CFG.sNuScreen); - if(( pTextFileASC = fopen(temp, "w")) == NULL) { - perror(""); - WriteError("NextUser: Can't open file: %s", temp); - return TRUE; - } - - fprintf(pTextFileANS,"%s%s%s%s",ANSI_CLEAR,ANSI_NORMAL,ANSI_WHITE,ANSI_BOLD); - - if((iStrLen = strlen(sFrom)) > 1) { - fprintf(pTextFileANS,"%s\x1B[1;4HFrom:%s %s\n",ANSI_RED,ANSI_BLUE,sFrom); - fprintf(pTextFileASC,"\n From: %s\n", sFrom); - Syslog('+', " From: %s", sFrom); - NLChk = TRUE; - } - - if((iStrLen = strlen(To)) > 1) { - fprintf(pTextFileANS,"%s\x1B[2;6HTo:%s %s\n",ANSI_RED,ANSI_BLUE,To); - fprintf(pTextFileASC," To: %s\n", To); - Syslog('+', " To: %s", To); - NLChk = TRUE; - } - - if((iStrLen = strlen(Subject)) > 1) { - fprintf(pTextFileANS,"%sSubject:%s %s\n\n",ANSI_RED,ANSI_BLUE,Subject); - fprintf(pTextFileASC,"Subject: %s\n\n", Subject); - Syslog('+', "Subject: %s", Subject); - NLChk = TRUE; - } - - if(!NLChk) { - fprintf(pTextFileANS, "\n"); - fprintf(pTextFileASC, "\n"); - } - - fprintf(pTextFileANS,"%sÕ",ANSI_YELLOW); - for(iLoop = 0; iLoop <= 75; iLoop++) { - fprintf(pTextFileANS,"Í"); - fprintf(pTextFileASC,"="); - } - fprintf(pTextFileANS,"¸\n"); - fprintf(pTextFileASC,"\n"); - - for(i = 0; i < iLine; i++) { - if((iStrLen = strlen( *(sLiNE + i) )) > 0) { - fprintf(pTextFileANS," %s%s\n",ANSI_BLUE, *(sLiNE + i)); - fprintf(pTextFileASC," %s\n", *(sLiNE + i)); - } - } - - Enter(2); - pout(12, 0, (char *) Language(340)); - fprintf(pTextFileANS,"%sÔ",ANSI_YELLOW); - for(iLoop = 0; iLoop <= 75; iLoop++) { - fprintf(pTextFileANS,"Í"); - fprintf(pTextFileASC,"="); - } - fprintf(pTextFileANS,"¾\n"); - fprintf(pTextFileASC,"\n"); - - fprintf(pTextFileANS,"%s%s",ANSI_RED,CFG.sNuQuote); - fprintf(pTextFileASC,"%s", CFG.sNuQuote); - - fclose(pTextFileANS); - fclose(pTextFileASC); - colour(9, 0); - /* Returning to */ - printf("\n%s%s\n", (char *) Language(117), CFG.bbs_name); - - Syslog('+', "User Saved Nextuser message and exited door"); - free(temp); - free(temp1); - return TRUE; - } else - - if (i == Keystroke(114, 1)) { - /* Edit which line: */ - colour(15, 0); - printf("\n%s", (char *) Language(118)); - GetstrC(temp, 80); - - if((strcmp(temp, "")) == 0) - break; - - i = atoi(temp); - - if( i > iLine - 1) { - /* Line does not exist. */ - printf("\n%s", (char *) Language(119)); - break; - } - - Enter(1); - /* Line reads: */ - colour(15, 0); - poutCR(15, 0, (char *) Language(186)); - printf("%2d: %s\n", i, *(sLiNE + i)); - - Enter(1); - /* Text to replace: */ - pout(15, 0, (char *) Language(195)); - GetstrC(temp, 80); - - if((strcmp(temp, "")) == 0) - break; - - /* Replacement text: */ - pout(15, 0, (char *) Language(196)); - GetstrC(temp1, 80); - - if((strcmp(temp1, "")) == 0) - break; - - strreplace(*(sLiNE + i), temp, temp1); - } else - printf("\n"); - } - free(temp); - free(temp1); - return FALSE; -} - diff --git a/mbsebbs/nextuser.h b/mbsebbs/nextuser.h deleted file mode 100644 index 24903597..00000000 --- a/mbsebbs/nextuser.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _NEXTUSER_H -#define _NEXTUSER_H - -void nextuser(void); - -#endif - diff --git a/mbsebbs/signature.c b/mbsebbs/signature.c new file mode 100644 index 00000000..a189c072 --- /dev/null +++ b/mbsebbs/signature.c @@ -0,0 +1,307 @@ +/***************************************************************************** + * + * $Id$ + * Purpose ...............: Edit message signature. + * + ***************************************************************************** + * Copyright (C) 1997-2003 + * + * Michiel Broek FIDO: 2:280/2802 + * Beekmansbos 10 + * 1971 BV IJmuiden + * the Netherlands + * + * This file is part of MBSE BBS. + * + * This BBS is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * MBSE BBS is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with MBSE BBS; see the file COPYING. If not, write to the Free + * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + *****************************************************************************/ + +#include "../config.h" +#include "../lib/libs.h" +#include "../lib/memwatch.h" +#include "../lib/mbse.h" +#include "../lib/structs.h" +#include "../lib/users.h" +#include "../lib/records.h" +#include "../lib/ansi.h" +#include "../lib/clcomm.h" +#include "../lib/common.h" +#include "signature.h" +#include "funcs.h" +#include "input.h" +#include "language.h" +#include "timeout.h" + + +#define MAXSIGLINES 4 +#define LENSIGLINES 74 + +char sLiNE[MAXSIGLINES+1][LENSIGLINES+1]; /* Edit buffer */ + + +/* + * Internal prototypes + */ +int editsignature(void); +int loadsignature(void); + + +/* + * Edit signature file, called by menu 319 + */ +void signature(void) +{ + memset(&sLiNE, 0, sizeof(sLiNE)); + + if (loadsignature()) { + while (TRUE) { + if (editsignature() == TRUE) + break; + } + } + + Enter(2); + /* Returning to */ + pout(CFG.MoreF, CFG.MoreB, (char *) Language(117)); + poutCR(CFG.MoreF, CFG.MoreB, CFG.bbs_name); + sleep(2); +} + + + +void toprow(void); +void toprow(void) +{ + int i; + + pout(YELLOW, BLACK, (char *)" Õ"); + for (i = 0; i < LENSIGLINES; i++) + printf("Í"); + printf("¸\n"); +} + + + +void botrow(void); +void botrow(void) +{ + int i; + + pout(YELLOW, BLACK, (char *)" Ô"); + for (i = 0; i < LENSIGLINES; i++) + printf("Í"); + printf("¾\n"); +} + + + +/* + * Load signature file in memory for editing. + */ +int loadsignature(void) +{ + char *temp; + FILE *fp; + int i; + + temp = calloc(PATH_MAX, sizeof(char)); + sprintf(temp, "%s/%s/.signature", CFG.bbs_usersdir, exitinfo.Name); + + if ((fp = fopen(temp, "r")) == NULL) { + WriteError("$Can't load %s", temp); + free(temp); + return FALSE; + } + + clear(); + + /* Edit message signature */ + pout(WHITE, BLACK, (char *) Language(107)); + Enter(2); + + Syslog('+', "%s will edit his .signature", exitinfo.sUserName); + + i = 0; + while (fgets(temp, LENSIGLINES+1, fp)) { + Striplf(temp); + strcpy(sLiNE[i], temp); + i++; + } + fclose(fp); + free(temp); + + toprow(); + for (i = 0; i < MAXSIGLINES; i++) { + colour(LIGHTRED, BLACK); + printf("%d:", i+1); + colour(CFG.MoreF, CFG.MoreB); + printf("%s\n", sLiNE[i]); + fflush(stdout); + } + botrow(); + + return TRUE; +} + + + +/* + * Edit signature file with a simple line editor. + */ +int editsignature(void) +{ + FILE *fp; + int i, x; + char *temp, *temp1; + + temp = calloc(PATH_MAX, sizeof(char)); + temp1 = calloc(PATH_MAX, sizeof(char)); + sprintf(temp, "%s/%s/.signature", CFG.bbs_usersdir, exitinfo.Name); + + while (TRUE) { + Enter(1); + /* Functions available: */ + poutCR(CFG.HiliteF, CFG.HiliteB, (char *) Language(113)); + Enter(1); + /* (L)ist, (R)eplace text, (E)dit line, (A)bort, (S)ave */ + pout(YELLOW, RED, (char *) Language(114)); + Enter(2); + + /* Select: */ + pout(CFG.HiliteF, CFG.HiliteB, (char *) Language(115)); + fflush(stdout); + + alarm_on(); + i = toupper(Getone()); + Enter(1); + + if (i == Keystroke(114, 3)) { + /* Aborting... */ + pout(CFG.HiliteF, CFG.HiliteB, (char *) Language(116)); + Syslog('+', "User aborted .signature editor"); + free(temp); + free(temp1); + return TRUE; + + } else if (i == Keystroke(114, 2)) { + /* Edit which line: */ + colour(CFG.HiliteF, CFG.HiliteB); + printf("\n %s", (char *) Language(118)); + colour(CFG.InputColourF, CFG.InputColourB); + GetstrC(temp, 3); + + if ((strcmp(temp, "")) == 0) + break; + + i = atoi(temp); + if ((i < 1) || (i > MAXSIGLINES)) { + /* Line does not exist. */ + printf("%s\n", (char *) Language(119)); + break; + } + + x = strlen(sLiNE[i-1]); + colour(LIGHTRED, BLACK); + printf("%d:", i); + colour(CFG.InputColourF, CFG.InputColourB); + printf("%s", sLiNE[i-1]); + fflush(stdout); + GetstrP(sLiNE[i-1], LENSIGLINES-1, x); + + } else if (i == Keystroke(114, 0)) { + /* List lines */ + toprow(); + for (i = 0; i < MAXSIGLINES; i++) { + colour(LIGHTRED, BLACK); + printf("%d:", i+1); + colour(CFG.MoreF, CFG.MoreB); + printf("%s\n", sLiNE[i]); + } + botrow(); + + } else if (i == Keystroke(114, 4)) { + Enter(1); + /* Saving... */ + pout(CFG.HiliteF, CFG.HiliteB, (char *) Language(340)); + + /* Open TextFile for Writing NextUser Info */ + sprintf(temp, "%s/%s/.signature", CFG.bbs_usersdir, exitinfo.Name); + if ((fp = fopen(temp, "w")) == NULL) { + WriteError("$Can't open %s", temp); + free(temp); + free(temp1); + return TRUE; + } + for (i = 0; i < MAXSIGLINES; i++) { + if (strlen(sLiNE[i])) + fprintf(fp, "%s\n", sLiNE[i]); + } + fclose(fp); + + Syslog('+', "User Saved .signature"); + free(temp); + free(temp1); + return TRUE; + + } else if (i == Keystroke(114, 1)) { + /* Edit which line: */ + colour(CFG.HiliteF, CFG.HiliteB); + printf("\n%s", (char *) Language(118)); + colour(CFG.InputColourF, CFG.InputColourB); + GetstrC(temp, 3); + + if ((strcmp(temp, "")) == 0) + break; + + i = atoi(temp); + + if ((i < 1) || (i > MAXSIGLINES)) { + /* Line does not exist. */ + printf("\n%s", (char *) Language(119)); + break; + } + + Enter(1); + /* Line reads: */ + poutCR(CFG.MoreF, CFG.MoreB, (char *) Language(186)); + printf("%d:%s\n", i, sLiNE[i-1]); + + Enter(1); + /* Text to replace: */ + pout(CFG.HiliteF, CFG.HiliteB, (char *) Language(195)); + colour(CFG.InputColourF, CFG.InputColourB); + GetstrC(temp, LENSIGLINES-1); + + if ((strcmp(temp, "")) == 0) + break; + + /* Replacement text: */ + pout(CFG.HiliteF, CFG.HiliteB, (char *) Language(196)); + colour(CFG.InputColourF, CFG.InputColourB); + GetstrC(temp1, LENSIGLINES-1); + + if ((strcmp(temp1, "")) == 0) + break; + strreplace(sLiNE[i-1], temp, temp1); + + } else + printf("\n"); + } + + free(temp); + free(temp1); + return FALSE; +} + diff --git a/mbsebbs/signature.h b/mbsebbs/signature.h new file mode 100644 index 00000000..1c007c39 --- /dev/null +++ b/mbsebbs/signature.h @@ -0,0 +1,8 @@ +#ifndef _SIGNATURE_H +#define _SIGNATURE_H + +/* $Id$ */ + +void signature(void); + +#endif diff --git a/mbsetup/ledit.c b/mbsetup/ledit.c index 14518962..fb211805 100644 --- a/mbsetup/ledit.c +++ b/mbsetup/ledit.c @@ -2086,8 +2086,6 @@ char *getmenutype(int val) case 19: return (char *)"Display textfile with more"; case 20: return (char *)"Display .A?? file with Enter"; case 21: return (char *)"Display Text Only"; - case 22: return (char *)"Message to nextuser door"; - case 23: return (char *)"Time banking system"; case 25: return (char *)"Safe cracker door"; @@ -2150,6 +2148,7 @@ char *getmenutype(int val) case 316: return (char *)"Change fullscreen editor"; case 317: return (char *)"Change FS edit shortcut keys"; case 318: return (char *)"Change address"; + case 319: return (char *)"Change .signature file"; case 401: return (char *)"Add oneliner"; case 402: return (char *)"List oneliners"; diff --git a/mbsetup/m_fgroup.c b/mbsetup/m_fgroup.c index 05fbb2b6..4334f1dc 100644 --- a/mbsetup/m_fgroup.c +++ b/mbsetup/m_fgroup.c @@ -583,7 +583,7 @@ void EditFGroup(void) working(2, 0, 0); working(0, 0, 0); } else { - errmsg("Cannot add group, change global setting in menu 1.13.5"); + errmsg("Cannot add group, change global setting in menu 1.11.5"); } } diff --git a/mbsetup/m_global.c b/mbsetup/m_global.c index 20d49fc9..09bd8f7b 100644 --- a/mbsetup/m_global.c +++ b/mbsetup/m_global.c @@ -542,34 +542,11 @@ void e_colors(void) -void e_nu_door(void) -{ - clr_index(); - set_color(WHITE, BLACK); - mvprintw( 5, 2, "1.9 EDIT NEXT USER DOOR"); - set_color(CYAN, BLACK); - mvprintw( 7, 2, "1. Text file"); - mvprintw( 8, 2, "2. Quote"); - for (;;) { - set_color(WHITE, BLACK); - show_str( 7,17,49, CFG.sNuScreen); - show_str( 8,17,64, CFG.sNuQuote); - - switch(select_menu(2)) { - case 0: return; - case 1: E_STR(7,17,49, CFG.sNuScreen, "The ^text file^ to display to the next user.") - case 2: E_STR(8,17,64, CFG.sNuQuote, "The ^quote^ to insert in the next user text.") - } - }; -} - - - void e_safe_door(void) { clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 2, "1.10 EDIT SAFE DOOR"); + mvprintw( 5, 2, "1.9 EDIT SAFE DOOR"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. Digit 1"); mvprintw( 8, 2, "2. Digit 2"); @@ -609,52 +586,11 @@ void e_safe_door(void) -void e_timebank(void) -{ - clr_index(); - set_color(WHITE, BLACK); - mvprintw( 5, 6, "1.11 EDIT TIME BANK"); - set_color(CYAN, BLACK); - mvprintw( 7, 6, "1. Users time balance"); - mvprintw( 8, 6, "2. Max time withdraw"); - mvprintw( 9, 6, "3. Max time deposit"); - mvprintw(10, 6, "4. Users Kb. balance"); - mvprintw(11, 6, "5. Max Kb. withdraw"); - mvprintw(12, 6, "6. Max Kb. deposit"); - mvprintw(13, 6, "7. Users time ratio"); - mvprintw(14, 6, "8. Users Kb. ratio"); - for (;;) { - set_color(WHITE, BLACK); - show_int( 7,31, CFG.iMaxTimeBalance); - show_int( 8,31, CFG.iMaxTimeWithdraw); - show_int( 9,31, CFG.iMaxTimeDeposit); - show_int(10,31, CFG.iMaxByteBalance); - show_int(11,31, CFG.iMaxByteWithdraw); - show_int(12,31, CFG.iMaxByteDeposit); - show_str(13,31,6, CFG.sTimeRatio); - show_str(14,31,6, CFG.sByteRatio); - - switch(select_menu(8)) { - case 0: return; - case 1: E_INT( 7,31, CFG.iMaxTimeBalance, "Maximum ^time balance^") - case 2: E_INT( 8,31, CFG.iMaxTimeWithdraw, "Maximum ^time withdraw^") - case 3: E_INT( 9,31, CFG.iMaxTimeDeposit, "Maximum ^time deposit^") - case 4: E_INT(10,31, CFG.iMaxByteBalance, "Maximum ^bytes balance^") - case 5: E_INT(11,31, CFG.iMaxByteWithdraw, "Maximum ^bytes withdraw^") - case 6: E_INT(12,31, CFG.iMaxByteDeposit, "Maximum ^bytes deposit^") - case 7: E_STR(13,31,6, CFG.sTimeRatio, "^Time ratio^") - case 8: E_STR(14,31,6, CFG.sByteRatio, "^Bytes ratio^") - } - }; -} - - - void e_paging(void) { clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 2, "1.12 EDIT SYSOP PAGING"); + mvprintw( 5, 2, "1.10 EDIT SYSOP PAGING"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. Ext. Chat"); mvprintw( 8, 2, "2. Chat Device"); @@ -758,7 +694,7 @@ void e_flags(int Users) if (Users) mvprintw( 5, 6, "1.6 EDIT USER FLAG DESCRIPTIONS"); else - mvprintw( 5, 6, "1.20 EDIT MANAGER FLAG DESCRIPTIONS"); + mvprintw( 5, 6, "1.18 EDIT MANAGER FLAG DESCRIPTIONS"); set_color(CYAN, BLACK); for (i = 0; i < 32; i++) { @@ -828,7 +764,7 @@ void e_ticconf(void) clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 6, "1.13 EDIT FILEECHO PROCESSING"); + mvprintw( 5, 6, "1.11 EDIT FILEECHO PROCESSING"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. Keep days"); @@ -920,7 +856,7 @@ void s_fidomailcfg(void) { clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 5, "1.14 EDIT FIDONET MAIL AND ECHOMAIL PROCESSING"); + mvprintw( 5, 5, "1.12 EDIT FIDONET MAIL AND ECHOMAIL PROCESSING"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. Badboard"); mvprintw( 8, 2, "2. Dupeboard"); @@ -1028,7 +964,7 @@ void s_intmailcfg(void) { clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 5, "1.15 EDIT INTERNET MAIL AND NEWS PROCESSING"); + mvprintw( 5, 5, "1.13 EDIT INTERNET MAIL AND NEWS PROCESSING"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. POP3 node"); mvprintw( 8, 2, "2. SMTP node"); @@ -1097,7 +1033,7 @@ void e_uucp(void) clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 6, "1.15 EDIT UUCP GATEWAY"); + mvprintw( 5, 6, "1.13 EDIT UUCP GATEWAY"); set_color(CYAN, BLACK); mvprintw( 7, 6, "1. Zone"); mvprintw( 8, 6, "2. Net"); @@ -1181,7 +1117,7 @@ void s_newfiles(void) { clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 2, "1.16 ALLFILES & NEWFILES LISTINGS"); + mvprintw( 5, 2, "1.14 ALLFILES & NEWFILES LISTINGS"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. New days"); mvprintw( 8, 2, "2. Security"); @@ -1372,7 +1308,7 @@ void s_mailer(void) { clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 2, "1.17 EDIT MAILER SETTINGS"); + mvprintw( 5, 2, "1.15 EDIT MAILER SETTINGS"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. Mailer logl."); mvprintw( 8, 2, "2. Default phone"); @@ -1407,7 +1343,7 @@ void e_trans(int start) clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 6, "1.17 EDIT PHONE TRANSLATION"); + mvprintw( 5, 6, "1.15 EDIT PHONE TRANSLATION"); set_color(CYAN, BLACK); mvprintw( 7, 12, "String to match String to replace"); for (i = 0; i < 10; i++) { @@ -1459,7 +1395,7 @@ void e_mailer(void) switch(select_menu(23)) { case 0: return; - case 1: E_LOGL(CFG.cico_loglevel, "1.17.1", s_mailer) + case 1: E_LOGL(CFG.cico_loglevel, "1.15.1", s_mailer) case 2: E_STR( 8,23,20,CFG.Phone, "The mailer default ^phone number^ for this system") case 3: E_STR( 9,23,30,CFG.Flags, "The mailer ^TCP/IP capability flags^ for this system") case 4: E_INT( 10,23, CFG.Speed, "The mailer ^default linespeed^ for this system") @@ -1495,7 +1431,7 @@ void e_ftpd(void) { clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 2, "1.18 EDIT FTPD SETTINGS"); + mvprintw( 5, 2, "1.16 EDIT FTPD SETTINGS"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. Upload pth"); mvprintw( 8, 2, "2. Banner msg"); @@ -1571,7 +1507,7 @@ void e_html(void) { clr_index(); set_color(WHITE, BLACK); - mvprintw( 5, 2, "1.19 EDIT HTML SETTINGS"); + mvprintw( 5, 2, "1.17 EDIT HTML SETTINGS"); set_color(CYAN, BLACK); mvprintw( 7, 2, "1. Docs root"); mvprintw( 8, 2, "2. Link to ftp"); @@ -1685,21 +1621,19 @@ void global_menu(void) mvprintw(12, 6, "6. Edit User flag Descriptions"); mvprintw(13, 6, "7. Edit New Users defaults"); mvprintw(14, 6, "8. Edit Text Colors"); - mvprintw(15, 6, "9. Edit Next User Door"); - mvprintw(16, 6, "10. Edit Safe Door"); + mvprintw(15, 6, "9. Edit Safe Door"); + mvprintw(16, 6, "10. Edit Sysop Paging"); - mvprintw( 7,46, "11. Edit Time Bank Door"); - mvprintw( 8,46, "12. Edit Sysop Paging"); - mvprintw( 9,46, "13. Edit Files Processing"); - mvprintw(10,46, "14. Edit Fidonet Mail/Echomail"); - mvprintw(11,46, "15. Edit Internet Mail/News"); - mvprintw(12,46, "16. Edit All-/Newfiles lists"); - mvprintw(13,46, "17. Edit Mailer global setup"); - mvprintw(14,46, "18. Edit Ftp daemon setup"); - mvprintw(15,46, "19. Edit HTML pages setup"); - mvprintw(16,46, "20. Edit Mgr flag descriptions"); + mvprintw( 7,46, "11. Edit Files Processing"); + mvprintw( 8,46, "12. Edit Fidonet Mail/Echomail"); + mvprintw( 9,46, "13. Edit Internet Mail/News"); + mvprintw(10,46, "14. Edit All-/Newfiles lists"); + mvprintw(11,46, "15. Edit Mailer global setup"); + mvprintw(12,46, "16. Edit Ftp daemon setup"); + mvprintw(13,46, "17. Edit HTML pages setup"); + mvprintw(14,46, "18. Edit Mgr flag descriptions"); - switch(select_menu(20)) { + switch(select_menu(18)) { case 0: crc1 = 0xffffffff; crc1 = upd_crc32((char *)&CFG, crc1, sizeof(CFG)); @@ -1736,39 +1670,33 @@ void global_menu(void) e_colors(); break; case 9: - e_nu_door(); - break; - case 10: e_safe_door(); break; - case 11: - e_timebank(); - break; - case 12: + case 10: e_paging(); break; - case 13: + case 11: e_ticconf(); break; - case 14: + case 12: e_fidomailcfg(); break; - case 15: + case 13: e_intmailcfg(); break; - case 16: + case 14: e_newfiles(); break; - case 17: + case 15: e_mailer(); break; - case 18: + case 16: e_ftpd(); break; - case 19: + case 17: e_html(); break; - case 20: + case 18: e_flags(FALSE); break; } @@ -1992,12 +1920,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " File description %s on %s\n", get_color(CFG.FiledescF), get_color(CFG.FiledescB)); fprintf(fp, " Message input %s on %s\n", get_color(CFG.MsgInputColourF), get_color(CFG.MsgInputColourB)); - addtoc(fp, toc, 1, 10, page, (char *)"Next user door"); - - fprintf(fp, " Text file %s\n", CFG.sNuScreen); - fprintf(fp, " Quote %s\n", CFG.sNuQuote); - - addtoc(fp, toc, 1, 11, page, (char *)"Safecracker door"); + addtoc(fp, toc, 1, 10, page, (char *)"Safecracker door"); fprintf(fp, " Digit nr 1 %d\n", CFG.iSafeFirstDigit); fprintf(fp, " Digit nr 2 %d\n", CFG.iSafeSecondDigit); @@ -2010,18 +1933,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Safe opened file %s\n", CFG.sSafeOpened); page = newpage(fp, page); - addtoc(fp, toc, 1, 12, page, (char *)"Timebank door"); - - fprintf(fp, " Users time balance %d\n", CFG.iMaxTimeBalance); - fprintf(fp, " Max. time withdraw %d\n", CFG.iMaxTimeWithdraw); - fprintf(fp, " Max. time deposit %d\n", CFG.iMaxTimeDeposit); - fprintf(fp, " Users kb. balance %d\n", CFG.iMaxByteBalance); - fprintf(fp, " Max. Kb. withdraw %d\n", CFG.iMaxByteWithdraw); - fprintf(fp, " Max. Kb. deposit %d\n", CFG.iMaxByteDeposit); - fprintf(fp, " Users time ratio %s\n", CFG.sTimeRatio); - fprintf(fp, " Users Kb. ratio %s\n", CFG.sByteRatio); - - addtoc(fp, toc, 1, 13, page, (char *)"Sysop paging"); + addtoc(fp, toc, 1, 11, page, (char *)"Sysop paging"); fprintf(fp, " Ext. Chat program %s\n", CFG.sExternalChat); fprintf(fp, " Chat device %s\n", CFG.sChatDevice); @@ -2045,7 +1957,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Friday %s %s\n", CFG.cStartTime[5], CFG.cStopTime[5]); fprintf(fp, " Saterday %s %s\n", CFG.cStartTime[6], CFG.cStopTime[6]); - addtoc(fp, toc, 1, 14, page, (char *)"Fileecho processing"); + addtoc(fp, toc, 1, 12, page, (char *)"Fileecho processing"); fprintf(fp, " Keep days on hold %d\n", CFG.tic_days); fprintf(fp, " Hatch password %s\n", CFG.hatchpasswd); @@ -2064,7 +1976,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " FileMgr: pause %s\n", getboolean(CFG.ct_Pause)); page = newpage(fp, page); - addtoc(fp, toc, 1, 15, page, (char *)"Fidonet Mail and Echomail processing"); + addtoc(fp, toc, 1, 13, page, (char *)"Fidonet Mail and Echomail processing"); fprintf(fp, " Max .pkt size %d Kb.\n", CFG.maxpktsize); fprintf(fp, " Max archive size %d Kb.\n", CFG.maxarcsize); @@ -2084,7 +1996,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " AreaMgr: passwd %s\n", getboolean(CFG.ca_Passwd)); fprintf(fp, " AreaMgr: pause %s\n", getboolean(CFG.ca_Pause)); - addtoc(fp, toc, 1, 16, page, (char *)"Internet Mail and News processing"); + addtoc(fp, toc, 1, 14, page, (char *)"Internet Mail and News processing"); fprintf(fp, " Split messages at %d KBytes\n", CFG.new_split); fprintf(fp, " Force split at %d KBytes\n", CFG.new_force); @@ -2110,14 +2022,14 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Allow control msgs %s\n", getboolean(CFG.allowcontrol)); fprintf(fp, " Don't regate msgs %s\n", getboolean(CFG.dontregate)); - addtoc(fp, toc, 1, 17, page, (char *)"Newfile reports"); + addtoc(fp, toc, 1, 15, page, (char *)"Newfile reports"); fprintf(fp, " New files days %d\n", CFG.newdays); fprintf(fp, " Highest sec. level %s\n", get_secstr(CFG.security)); fprintf(fp, " Max. newfile grps %ld\n", CFG.new_groups); page = newpage(fp, page); - addtoc(fp, toc, 1, 18, page, (char *)"Mailer setup"); + addtoc(fp, toc, 1, 16, page, (char *)"Mailer setup"); p = getloglevel(CFG.cico_loglevel); fprintf(fp, " Mailer loglevel %s\n", p); @@ -2144,7 +2056,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Translate %-20s %s\n", CFG.phonetrans[i].match, CFG.phonetrans[i].repl); page = newpage(fp, page); - addtoc(fp, toc, 1, 19, page, (char *)"FTP server setup"); + addtoc(fp, toc, 1, 17, page, (char *)"FTP server setup"); fprintf(fp, " Connections limit %d\n", CFG.ftp_limit); fprintf(fp, " Login fails %d\n", CFG.ftp_loginfails); @@ -2164,7 +2076,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Path filter %s\n", CFG.ftp_pth_filter); fprintf(fp, " Path message %s\n", CFG.ftp_pth_message); - addtoc(fp, toc, 1, 20, page, (char *)"WWW server setup"); + addtoc(fp, toc, 1, 18, page, (char *)"WWW server setup"); fprintf(fp, " HTML root %s\n", CFG.www_root); fprintf(fp, " Link to FTP base %s\n", CFG.www_link2ftp); @@ -2175,7 +2087,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " File per webpage %d\n", CFG.www_files_page); page = newpage(fp, page); - addtoc(fp, toc, 1,21, page, (char *)"Manager flag descriptions"); + addtoc(fp, toc, 1,19, page, (char *)"Manager flag descriptions"); fprintf(fp, " 1 1 2 2 3 3\n"); fprintf(fp, " 1 5 0 5 0 5 0 2\n"); fprintf(fp, " --------------------------------\n"); diff --git a/mbsetup/m_menu.c b/mbsetup/m_menu.c index ee7e0417..7635f7fe 100644 --- a/mbsetup/m_menu.c +++ b/mbsetup/m_menu.c @@ -4,7 +4,7 @@ * Purpose ...............: Edit BBS menus * ***************************************************************************** - * Copyright (C) 1997-2002 + * Copyright (C) 1997-2003 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -186,26 +186,26 @@ int GetSubmenu(int Base, int Max) int GetMenuType(void); int GetMenuType(void) { - clr_index(); - set_color(WHITE, BLACK); - mvprintw( 5, 6, "8.3 EDIT MENU - SELECT MENUTYPE"); - set_color(CYAN, BLACK); - mvprintw( 7, 6, "1. Global system menus"); - mvprintw( 8, 6, "2. File areas menus"); - mvprintw( 9, 6, "3. Message areas menus"); - mvprintw(10, 6, "4. User setting menus"); - mvprintw(11, 6, "5. Oneliner menus"); - mvprintw(12, 6, "6. BBS List menus"); + clr_index(); + set_color(WHITE, BLACK); + mvprintw( 5, 6, "8.3 EDIT MENU - SELECT MENUTYPE"); + set_color(CYAN, BLACK); + mvprintw( 7, 6, "1. Global system menus"); + mvprintw( 8, 6, "2. File areas menus"); + mvprintw( 9, 6, "3. Message areas menus"); + mvprintw(10, 6, "4. User setting menus"); + mvprintw(11, 6, "5. Oneliner menus"); + mvprintw(12, 6, "6. BBS List menus"); - switch (select_menu(6)) { - case 1: return GetSubmenu(1, 25); - case 2: return GetSubmenu(101, 19); - case 3: return GetSubmenu(201, 20); - case 4: return GetSubmenu(301, 18); - case 5: return GetSubmenu(401, 5); - case 6: return GetSubmenu(501, 6); - default: return 0; - } + switch (select_menu(6)) { + case 1: return GetSubmenu(1, 25); + case 2: return GetSubmenu(101, 19); + case 3: return GetSubmenu(201, 20); + case 4: return GetSubmenu(301, 19); + case 5: return GetSubmenu(401, 5); + case 6: return GetSubmenu(501, 6); + default: return 0; + } } diff --git a/mbsetup/m_mgroup.c b/mbsetup/m_mgroup.c index 0d622f7c..b165bf9d 100644 --- a/mbsetup/m_mgroup.c +++ b/mbsetup/m_mgroup.c @@ -517,7 +517,7 @@ void EditMGroup(void) working(2, 0, 0); working(0, 0, 0); } else { - errmsg("Cannot add group, change global setting in menu 1.14.12"); + errmsg("Cannot add group, change global setting in menu 1.12.12"); } } diff --git a/mbsetup/m_new.c b/mbsetup/m_new.c index 9b35cfb5..ab7d2a2e 100644 --- a/mbsetup/m_new.c +++ b/mbsetup/m_new.c @@ -515,7 +515,7 @@ void EditNewfiles(void) working(2, 0, 0); working(0, 0, 0); } else { - errmsg("Cannot add, change global setting in menu 1.16.3"); + errmsg("Cannot add, change global setting in menu 1.14.3"); } } diff --git a/mbsetup/m_node.c b/mbsetup/m_node.c index 6dce7f06..379324a2 100644 --- a/mbsetup/m_node.c +++ b/mbsetup/m_node.c @@ -1262,9 +1262,9 @@ void EditNodes(void) working(0, 0, 0); } else { if ((records + 1) > CFG.toss_systems) { - errmsg("Cannot add node, change global setting in menu 1.14.11"); + errmsg("Cannot add node, change global setting in menu 1.12.11"); } else { - errmsg("Cannot add node, change global setting in menu 1.13.4"); + errmsg("Cannot add node, change global setting in menu 1.11.4"); } } } diff --git a/mbtask/mbtask.c b/mbtask/mbtask.c index 68703f18..f4419010 100644 --- a/mbtask/mbtask.c +++ b/mbtask/mbtask.c @@ -166,6 +166,7 @@ void load_maincfg(void) sprintf(CFG.req_magic, "%s/magic", getenv("MBSE_ROOT")); sprintf(CFG.alists_path, "%s/var/arealists", getenv("MBSE_ROOT")); sprintf(CFG.out_queue, "%s/var/queue", getenv("MBSE_ROOT")); + sprintf(CFG.rulesdir, "%s/var/rules", getenv("MBSE_ROOT")); CFG.leavecase = TRUE; /* @@ -248,12 +249,6 @@ void load_maincfg(void) CFG.MsgInputColourF = CYAN; CFG.MsgInputColourB = BLACK; - /* - * NextUser Door - */ - sprintf(CFG.sNuScreen, "welcome"); - sprintf(CFG.sNuQuote, "Please press [ENTER] to continue: "); - /* * Safe Door */ @@ -285,18 +280,6 @@ void load_maincfg(void) sprintf(CFG.cStopTime[i], "23:59"); } - /* - * Time Bank - */ - CFG.iMaxTimeBalance = 200; - CFG.iMaxTimeWithdraw = 100; - CFG.iMaxTimeDeposit = 60; - CFG.iMaxByteBalance = 500; - CFG.iMaxByteWithdraw = 300; - CFG.iMaxByteDeposit = 150; - strcpy(CFG.sTimeRatio, "3:1"); - strcpy(CFG.sByteRatio, "3:1"); - /* * Fill ticconf defaults */