home *** CD-ROM | disk | FTP | other *** search
Wrap
; jammer ; $Header: mail:welmat.lng 09/22/92 17:08:49 ; Just in case a null Jump is SubJump'd ;-) PutLog "[-$(line)] $<time> You Goofed up your config! -Bad Jump!" Return ; Temporary Logging Kludge logit: PutLog "[$(line)] $<time> !$(ENTRY)" Return TransferOut: XprSend "" PutLog "[$(line)] $<time> Send Status $(RC)\n" Print "Turn around and receive\n" XprReceive "" PutLog "[$(line)] $<time> Receive Status $(RC)\n" XprClose ReportSesStat $(RC) Jump waitring TransferIn: XprReceive "" PutLog "[$(line)] $<time> Receive Status $(RC)\n" Print "Turn around and send\n" XprSend "" PutLog "[$(line)] $<time> Send Status $(RC)\n" XprClose ReportSesStat $(RC) Jump waitring XTransferOut: XprSend "" PutLog "[$(line)] $<time> Receive Status $(RC)\n" XprClose ReportSesStat $(RC) Jump waitring XTransferIn: XprReceive "" PutLog "[$(line)] $<time> Send Status $(RC)\n" XprClose ReportSesStat $(RC) Jump waitring dodial: ModemClear PutLog "[$(line)] $<time> Trying to connect to $(remote.address)\n" Cmpi $(remote.domain) "UUCP TrueJump DialNonFidoLookup Print "A Fidonet call to $(remote.address)!\n" ; look up the address, and put the information in the 'stem' variable 'remote' Address "REXX" "rexx:fidolookup.welmat $(remote.address) remote" Print "Address: $(remote.address) ($(remote.password))\n" Print "Sysop : $(remote.sysop)\n" Print "System : $(remote.sitename)\n" Jump dodialcheck DialNonFidoLookup: Print "A Non-Fido call to $(remote.address)!\n" Address "REXX" "rexx:uulookup.welmat $(remote.address)" Print "Lookup Returned $(RC)\n" dodialcheck: Pattern $(remote.number) "" FalseJump dodialhavenumber PutLog "[$(line)] $<time> I don't know the number for $(remote.address)\n" ReportSesStat 36 Jump waitring dodialhavenumber: pattern $(remote.address) nrc FalseJump notnrcdial setbaud 300 notnrcdial: Send "\n\r" Delay 1 SmartSend "$(Dial)$(remote.number)|" SetSlaveState o GetResponse 90 TrueJump dialtimeout pattern $(event) "CONNECT" TrueJump callconnect pattern $(event) "RING" TrueJump ring pattern $(event) "NO DIAL TONE" TRUEJUMP ring PutLog "[$(line)] $<time> $(lastresponse)\n" pattern $(event) "BUSY" FalseJump dodial3 set temp 5 Jump dodial3 dialtimeout: set temp $(RC) PutLog "[$(line)] $<time> Dial Timeout Error: $(temp)\n" dodial3: PutLog "[$(line)] $<time> Session result $(temp)\n" ReportSesStat $(temp) Jump waitring callconnect: cmp $(baud) 0 FalseJump continueconnect set baud 300 ; ya allow 300bps connects (for the NRC connection) continueconnect: PutLog "[$(line)] $<time> $(lastresponse) ($(baud))\n" Pattern $(remote.domain) "UUCP" TrueJump callconnectUUCP ; FidoConnect PutLog "[$(line)] $<time> Fidonet Call to $(remote.address)\n" set MinSendPri 0 MaxSendPri 127 set called $(remote.address) Connected $(called) GetOutbound PutLog "[$(line)] $<time> GetOutbound: $(event) Wzcap:$(host.wzcap)\n" Cmpi $(event) WAZOO FalseJump callconnectFTS1 cmpi $(called) $(remote.address) TrueJump Fidoconnect2 PutLog "[$(line)] $<time> Called $(called) and got $(remote.address)\n" Fidoconnect2: set IsOutbound TRUE SubJump wazoo set IsOutbound FALSE cmpI $(remote.address) "fidonet#1:163/109.0" truejump NotAddFreq cmpI $(remote.address) "fidonet#1:163/211.0" truejump NotAddFreq cmpI $(remote.address) "fidonet#1:163/282.0" truejump NotAddFreq cmpI $(remote.address) "fidonet#1:163/99.0" truejump NotAddFreq cmpI $(remote.address) "fidonet#1:163/524.0" truejump NotAddFreq System "echo >>out:$(remote.zone).$(remote.net).$(remote.node).$(remote.point).req files" NotAddFreq: FindFreq $(called) CheckTestOut: cmpi $(host.wzcap) 64 FalseJump CheckZapOut ; XprSetup testing protocol ; Putlog "[$(line)] $<time> Test Setup $(Setup) RC:$(RC)\n" ; Jump TransferOut CheckZapOut: cmpi $(host.wzcap) 8 FalseJump CheckZipOut SetMailerFlags "DN,PN" XprSetup xprzedzap.library TN,ON,B16,F0,E30,AN,DN,KN,SN,RN,NY,M8192 PutLog "[$(line)] $<time> ZedZap Setup $(Setup) RC:$(RC)\n" Jump TransferOut CheckZipOut: cmpi $(host.wzcap) 4 FalseJump CheckInternalOut SetMailerFlags "DE,PN" XprSetup xprzedzap.library TN,ON,B16,F0,E30,AN,DN,KN,SN,RN,M1024 PutLog "[$(line)] $<time> ZedZip Setup $(Setup) RC:$(RC)\n" Jump TransferOut CheckInternalOut: SetMailerFlags "DY,PY" XprSetup xprfts.library "7a,ha,sa,py,fy,by" ; XprSetup INTERNAL "" PutLog "[$(line)] $<time> DietIFNA Setup $(Setup) RC:$(RC)\n" Jump XTransferOut callconnectFTS1: Cmpi $(event) FTS1 FalseJump callconnectFAIL SetMailerFlags "DY,PY" XprSetup xprfts.library "7a,ha,sa,py,fy,by" ; XprSetup INTERNAL "" PutLog "[$(line)] $<time> FTS-1 Setup $(Setup) RC:$(RC)\n" Jump XTransferOut callconnectFAIL: ReportSesStat 99 Jump waitring callconnectUUCP: Pattern $(remote.address) "bbs#?" FalseJump notbbs PutLog "[$(line)] $<time> Term Call to $(remote.address)\n" system "execute mail:ncomm" ReportSesStat 0 Jump waitring notbbs: cmpI $(remote.address) nrc FalseJump yauucp PutLog "[$(line)] $<time> Connected to National Research Council - Getting Time\n" xprsetup xprnrc.library "y1992,o-5" System "date >env:date" xprreceive "" xprclose System "setclock save" System "date >env:date" PutLog "[$(line)] $<time> Set Clock to - ${date}" ReportSesStat 0 SetBaud 38400 Jump waitring yauucp: PutLog "[$(line)] $<time> UUCP Call to $(remote.address)\n" Delay 1 ; Generic shell execution Send "\n" Delay 1 System "uucp:uucico -o -s$(remote.address) -DEVICE $(device) -UNIT $(unit)" set Return $(RC) System "dlg:cronevent >nil: a 0 execute mail:uuxqt" ReportSesStat $(Return) Jump waitring freeline: Print "Trying to Free Line\n" ; close the modem to allow for another device to grab the line ModemClose Delay 3 slaveloop: ModemOpen ; what about if it fails? Maybe just exit the slave with a RETURN? waitring: SetBaud $(BaudLocked) PutLog "[$(line)] $<time> Waiting for Call...\n" FlushLog MainWaitLoop: ModemInit FalseJump freeline CheckCall TrueJump dodial set RC $<abort> FalseJump waitring1 PutLog "[$(line)] $<time> Exiting Slave\n" ModemClose Return waitring1: SubJump setglobals SetSlaveState w set OwnDevUnit TRUE GetResponse 30 set resp $(rc) Cmp $(resp) 2 TrueJump freeline set rc $(resp) TrueJump MainWaitLoop set OwnDevUnit FALSE CmpI $(event) "ring" FalseJump MainWaitLoop ring: SmartSend $(Answer) PutLog "[$(line)] $<time> $(lastresponse)\n" SetSlaveState i GetResponse 90 TrueJump MainWaitLoop pattern $(event) "CONNECT" TrueJump WaitRingConnect Pattern $(event) "FAX" FalseJump MainWaitLoop PutLog "[$(line)] $<time> Fax Call.\n" ; Insert FAX software here... Jump waitring WaitRingConnect: set host.sysop "James McOrmond" set host.sitename "Jammys Amiga Corner: Welmat MegaTester" set MaxSendPri 127 MinSendPri -127 PutLog "[$(line)] $<time> $(lastResponse)($(baud))\n" Delay 3 ModemClear System "date >env:ledate" set temp "\r\n$(lastResponse) on ${ledate}" Print $(temp) Send $(temp) mconnect: set temp "\r\nWelcoming you with ${WelmatName}\r\nJammys Amiga Corner - $(modem)\r\nFidoNet#1:163/165.0 - UUCP: Jammys.OCUnix.On.Ca\n\rType ? for Help, No User Login: " Print $(temp) Send $(temp) Clear temp ; check for the inbound event (YooHoo,Login,FTS1,etc) GetInbound PutLog "[$(line)] $<time> Event: $(event) NameBuf: $(namebuf) Wzcap:$(host.wzcap)\n" Pattern $(event) LOGIN FalseJump mconnect2 pattern $(namebuf) "" TrueJump mconnect set UserName $(namebuf) clear namebuf CmpI $(UserName) uuatronx TrueJump UULogin CmpI $(UserName) uuqpoint TrueJump UULogin CmpI $(UserName) ? TrueJump LoginType CmpI $(UserName) info TrueJump LoginType CmpI $(UserName) system TrueJump LoginType CmpI $(UserName) version TrueJump LoginType CmpI $(UserName) future TrueJump LoginType CmpI $(UserName) magic TrueJump LoginType CmpI $(UserName) sale TrueJump LoginType CmpI $(UserName) off TrueJump LoginType CmpI $(UserName) g TrueJump LoginType CmpI $(UserName) term TrueJump ZSendTerm CmpI $(UserName) olr TrueJump ZSendOlr CmpI $(UserName) list TrueJump ZSendfilelist CmpI $(UserName) new TrueJump ZSendnewfiles CmpI $(UserName) mods TrueJump ZSendmods CmpI $(UserName) freq TrueJump Promptfreq Pattern $(UserName) bbs TrueJump LoginType Jump mconnect bbslaunch: System "Execute the BBS" jump waitring UULogin: System "point:login <null: >null: -b$(baud) -asdg -lower -ologs:login.log -puulib:uupasswd -d$(device) -u$(unit) \"$(UserName)\"" PutLog "[$(line)] $<time> UULogin: $(RC)\n" System "dlg:cronevent >nil: a 0 execute mail:uuxqt" Jump waitring LoginType: System "point:login <null: >null: -b$(baud) -asdg -nocheckbad -lower -ologs:login.log -puulib:passwd -d$(device) -u$(unit) \"$(UserName)\"" PutLog "[$(line)] $<time> Returned: $(RC)\n" Pattern $(UserName) "off" TrueJump waitring Pattern $(UserName) "g" TrueJump waitring Pattern $(UserName) "xbbs" TrueJump waitring Jump mconnect Promptfreq: set temp "\r\nBatch Download of Files. Enter one name per line.\r\n\r\n" send $(temp) print $(temp) connected fidoNet#999:1/1.1 System "delete t:freq-$(line).req" set counter FALSE Promptfreqprompt: set temp "Enter Filename to Download: " send $(temp) print $(temp) GetInbound CmpI $(namebuf) "" FalseJump Promptfreqadd set RC $(counter) TrueJump Promptdofreq jump mconnect Promptfreqadd: set counter TRUE System "echo >>t:freq-$(line).req $(namebuf)" Jump Promptfreqprompt Promptdofreq: set temp "Scanning for file(s)" PutLog "[$(line)] $<time> $(temp)\n" Send "\r\n$(temp)\r\n" System "run point:wnotify point:wnotify.cfg freq-$(line).req t:freq-$(line).req fidonet#999:1/1.1 1 $(baud)" Delay 2 set temp "Sending file(s) with Batch Zmodem\n\r\n\r" print $(temp) send $(temp) clear temp PutLog "[$(line)] $<time> Starting Batch Send\n" XprSetup xprzedzap.library "TN,ON,B16,F0,E30,AN,DN,KN,SY,RN,M1024" ; XprSetup xprymodem.library "" XprSend "" PutLog "[$(line)] $<time> Finished Batch Send\n" XprClose Jump mconnect ZSendTerm: set promptfile "file:1000/term89.lha" Jump PromptZSend ZSendOlr: set promptfile "file:1000/gpreader16.lha" Jump PromptZSend ZSendfilelist: set promptfile "file:91/jamfiles.lha" Jump PromptZSend ZSendnewfiles: set promptfile "file:91/jamnew.lha" Jump PromptZSend ZSendmods: set promptfile "file:91/mods.lha" PromptZSend: set temp "\r\n\r\nSending '$(promptfile)' with Zmodem Batch\n\r" print $(temp) send $(temp) PutLog "[$(line)] $<time> ZSend '$(promptfile)'\n" XprSetup xprzedzap.library "TN,ON,B16,F0,E30,AN,DN,KN,SY,RN,M1024" ; XprSetup xprymodem.library "" XprSend $(promptfile) PutLog "[$(line)] $<time> ZSent '$(promptfile)' $(cps) cps ($(cpsp)%)\n" Send "\n\r\n\r$(filestatus): $(cps) CPS ($(cpsp)%) of $(baud) Bps\n\r\n" XprClose Jump mconnect mconnect2: cmpi $(event) FTS1 FalseJump mconnect3 SetMailerFlags "DY,PY" Set remote.address 1:1/1.1 XprSetup xprfts.library "7a,ha,sa,py,fy,by" ; XprSetup INTERAL "" PutLog "[$(line)] $<time> Setup $(Setup) RC:$(RC)\n" XprReceive "" PutLog "[$(line)] $<time> Send $(RC)\n" XprClose Print "Session Stat: $(RC)\n" PutLog "[$(line)] $<time> Session result $(RC)\n" ReportSesStat $(RC) Jump waitring mconnect3: Cmpi $(event) GOTYOOHOO FalseJump mconnect4 SubJump wazoo FalseJump waitring WazooRespond Print "Wazoo $(event)\n" Cmpi $(event) 2U2 FalseJump waitring Connected $(remote.address) CheckTestIn: cmpi $(host.wzcap) 64 FalseJump CheckZapIn ; XprSetup testing protocol ; Putlog [$(line) $<time> Test Setup $(Setup) RC:$(RC)\n" ; Jump TransferIn CheckZapIn: cmpi $(host.wzcap) 8 FalseJump CheckZipIn SetMailerFlags "dn,pn" XprSetup xprzedzap.library TN,ON,B16,F0,E30,AN,DN,KN,SN,RN,NY,M8192 PutLog "[$(line)] $<time> ZedZap Setup $(Setup) RC:$(RC)\n" Jump TransferIn CheckZipIn: cmpi $(host.wzcap) 4 FalseJump CheckInternalIn SetMailerFlags "DE,pn" XprSetup xprzedzap.library TN,ON,B16,F0,E30,AN,DN,KN,SN,RN,M1024 PutLog "[$(line)] $<time> ZedZip Setup $(Setup) RC:$(RC)\n" Jump TransferIn CheckInternalIn: XprSetup xprfts.library "7a,ha,sa,py,fy,by" ; XprSetup INTERNAL "" PutLog "[$(line)] $<time> Diet Ifna Setup $(Setup) RC: $(RC)\n" Jump XTransferIn mconnect4: ReportSesStat 111 Jump waitring ; called on both inbound and outbound after receiving a yoohoo wazoo: PutLog "[$(line)] $<time> Name : $(remote.sitename) ($(remote.address))\n" PutLog "[$(line)] $<time> Sysop: $(remote.sysop)\n" PutLog "[$(line)] $<time> Cap : $(remote.wzcap), Domain: $(remote.domain)\n" cmp $(remote.password) "" TrueJump wazooproducts PutLog "[$(line)] $<time> Pass : $(remote.password)\n" wazooproducts: Address REXX "rexx:products.welmat" set RC $(IsOutbound) TrueReturn Print "Inbound Session\n" Address REXX "rexx:fidolookup.welmat $(remote.address) test" FalseJump wazooing print "Node not found!\n" Jump EndWazoo wazooing: Pattern $(test.password) "" FalseJump WazooPWCheck PutLog "[$(line)] $<time> No Password Required!\n" Jump EndWazoo WazooPWCheck: CmpI $(test.password) $(remote.password) TrueJump WazooPWProtected PutLog "[$(line)] $<time> Password Error: His:'$(remote.password)' Ours:'$(test.password)'\n" set RC FALSE Return WazooPWProtected: PutLog "[$(line)] $<time> Password Protected Session\n" EndWazoo: CmpI $(remote.product) 57 TrueJump WazooTrapDoor set RC TRUE Return WazooTrapDoor: ; Any TD system that calls me gets a free gift! set temp "$(remote.zone):$(remote.net)/$(remote.node).$(remote.point)" System "point:floadd $(temp) point:Welmat.txt" clear temp set RC TRUE Return setglobals: ; clear temporary variables - As well as for documentation purposes, it will ; free up some memory for ya ;-) Clear event fts1 infile isoutbound whatrun Clear remfile remote.address remote.cost remote.domain remote.flags Clear remote.maxbaud remote.net remote.node remote.point remote.zone Clear remote.number remote.product remote.product_maj remote.product_min Clear remote.sitename remote.sysop remote.wzcap remote.wzdomain remote.password Clear test.address test.cost test.domain test.maxbaud test.net Clear test.node test.number test.password test.point test.sitename Clear test.sysop test.zone NameBuf OwnDevUnit UserName Clear process Workbench RC Result2 ; Reset constants ; Inbound directory used to place inbound files - '/' required. set inbound "work:inbound/" set outbound "work:outbound/" set pickup "TRUE" trywazoo "TRUE" tryfts1 "TRUE" freq TRUE set wfnotify "filenotify" stack 32000 set MaxSendPri 127 MinSendPri -127 set BufferSize 1024 ; Variables used by ModemInit set InitLoop 5 set InitWait 2 set Prompt OK set Atten $(atten) set HangupString $(hangupstring) set InitString $(initstring) ; internal nodelist support junk...Going Away.. set nodelist "nodelist:" set host.address 1:163/165.0 set host.domain "fidonet" set host.sitename "Jammy's Amiga Corner (613)521-0648" set host.sysop "James McOrmond" set host.cost 0 set host.maxbaud 9600 set host.zone 1 set host.net 163 set host.node 165 set host.point 0 set host.number "613-521-0648" set host.password "xxxxxxx" set host.wzdomain "fidonet" ; Wazoo capability bits are 'added' together - 'GetOutbound' and 'GetInbound' ; reset $(host.wzcap) to a single protocol value after a YooHoo negotiation. ; ; 1 - Can do fast "FTS-0001" (DietIFNA) ; 2 - Reserved by Opus-CBCS ; 4 - Does ZModem, 1K blocks (ZedZip) ; 8 - Can do ZModem variant (ZedZap) ; 16 - Can do Janus ; 32 - reserved by FTSC ; 64 - reserved by ftsc (testing) ; 32768 - wazoo freq's set host.wzcap 13 ; Variables used by Modem routines (Mopen, etc) set device $(device) unit $(unit) serflags $(serflags) set Baud $(baud) set BaudLocked $(baudlocked) set DTR_Control $(dtr_control) set Locked $(locked) set SlowModem $(slowmodem) set Dial $(dial) set Answer $(answer) set Modem $(modem) set postinbound postinbound postoutbound postoutbound set preinbound preinbound preoutbound preoutbound Return preinbound: PutLog "[$(line)] $<time> Receiving: '$(remfile)'\n" Return postinbound: PutLog "[$(line)] $<time> $(filestatus): '$(remfile)' ($(filesize) bytes)\n" PutLog "[$(line)] $<time> CPS $(CPS) ($(CPSP)%)\n" falseReturn set whatrun "Run point:wnotify >>logs:wnotify.log point:wnotify.cfg $(remfile) $(infile) \"$(remote.address)\" $(line) $(baud)" PutLog "[$(line)] $<time> $(whatrun)\n" system $(whatrun) Return preoutbound: PutLog "[$(line)] $<time> Sending: $(remfile) ($(filesize) bytes)\n" Return postoutbound: PutLog "[$(line)] $<time> $(filestatus): $(localfile)\n" PutLog "[$(line)] $<time> CPS $(CPS) ($(CPSP)%)\n" Return ; This is the startup program ran by my first slave startup-1: set device "serial.device" unit 0 serflags 4 startup-1a: SetStatus "RAW:717/220/383/70/Line #$(line) - USR 14400 V32bis/inactive/close" set modem "USRobotics V32bis/V42bis/HST 14400 Modem" ; Set up the response strings for GetResponse - These are 'line specific'. ; The first parameter is the 'event'. If it is a number, or if it is 'find', ; then it is a special event called 'CONNECT' where the baud rate is set to ; the number, or figured out from the %d value in 'find'. AddResponse busy "BUSY" AddResponse maid "NO CARRIER" AddResponse line "NO DIAL TONE" AddResponse line "CONNECT|" AddResponse find "CONNECT %d" AddResponse ring "RING" set Baud 38400 set BaudLocked 38400 set Atten ~AT| set HangupString ~~v~^~+++~~|AT~Z| set InitString ~ATz| set DTR_Control 1 set Locked TRUE set SlowModem TRUE set Answer |~ATA| set Dial ATdwt Jump slaveloop ; This is the startup program ran by my second slave - Not used anymore startup-2: SetStatus "RAW:714/238/710/61/Line #$(line) - SmartOne 2400x/inactive" set modem "Best Data SmartOne 2400x Modem" AddResponse busy BUSY AddResponse maid "NO CARRIER" AddResponse line "NO DIALTONE" AddResponse line "CONNECT|" AddResponse find "CONNECT %d" AddResponse ring RING ; Device and Unit for the serial port. ; Serial flags are added together to get value desired. ; 1 PARITY on ; 2 Parity Odd ; 4 7-Wire Modem (RTS/CTS) ; ; Device is automatically opened in SHARED mode with the XON/XOFF handling ; disabled set device "serial.device" unit 0 serflags 4 set Atten ~AT| set Baud 2400 set BaudLocked 2400 set DTR_Control 0 set HangupString ~+~+~+~~~ATH| set InitString atz| set Locked FALSE set SlowModem FALSE set Answer |~AT| set Dial |~ATm3DT Jump slaveloop ; The main function called by Welmat in the MCP is 'startup' - This should ; always be included, and is the first label called! ; It is included at the end of the config for efficiency reasons (IT's only ; called 'once' startup: Print "This is a print in the new language running under ${WelmatName}\n" set line M ; The old log system is going away, but unfortunately still exists :-( LogInit "RAW:717/13/708/205/Log Window/inactive/close" "logs:welmat.log" TrueJump logok Print "Log Open Failed\n" Return logok: Print "LogFile Opened\n" PutLog "[$(line)] $<time> Startup on $<date> with ${WelmatName}\n" ; Interesting way to log the output of a program... system "version >env:version" PutLog "[$(line)] $<time> ${version}" set stack 32000 Launch 1 SLAVE1 startup-1 ; Launch 2 SLAVE2 startup-2 Print "Started $<slaves> slaves\n" PutLog "[$(line)] $<time> Started $<slaves> slaves\n" set RETURN 99 eventloop: WaitEvent 20 CheckCall Print "CheckCall: $(RC)\n" FalseJump eventloop1 CallForward 2 Print "CallForward call for $(remote.address): $(RC)\n" eventloop1: ; If there are any slaves still active, don't exit!! ; Currently there is a bug while exiting, so don't set RC $<slaves> TrueJump eventloop PutLog "[$(line)] $<time> Mainslave Exiting...\n" LogEnd set RC 0 Return ;