I hereby claim:
- I am echicken on github.
- I am echicken (https://keybase.io/echicken) on keybase.
- I have a public key ASCcw_KvPTACtG-GSEQ89uOAeA81dqWrgl90M6EOxG8FKQo
To claim this, I am signing this object:
| /** | |
| * An rlogin proxy script for automatic new user account creation. | |
| * Clients that connect to this service instead of directly to the | |
| * actual rlogin server will have an account created for them if none | |
| * exists. | |
| * | |
| * Put this script in mods/ | |
| * | |
| * Add the following block to ctrl/services.ini: | |
| * |
| var sub = 'insert-sub-internal-code-here'; | |
| var mb = new MsgBase(sub); | |
| if (!mb.open()) throw new Error(mb.errror); | |
| var headers = mb.get_all_msg_headers(); | |
| Object.keys(headers).forEach(function (e) { | |
| var n = parseInt(e, 10); | |
| if (system.trashcan('subject', headers[e].subject)) { | |
| writeln('Removing message ' + n + ', "' + headers[e].subject + '" matched subject filter.'); | |
| mb.remove_msg(n); |
I hereby claim:
To claim this, I am signing this object:
| function strvar(fn, scope) { | |
| if (scope === undefined) scope = js.scope; | |
| const f = new File(fn); | |
| if (!f.open('r')) throw 'nuh uh'; | |
| var txt = f.read(); | |
| f.close(); | |
| txt = txt.replace(/@strvar:(.*?)@/ig, function (m, p) { | |
| return scope[p]; | |
| }); | |
| console.putmsg(txt); |
| // /sbbs/ctrl/410.txt would be a line-by-line list of paths to pages that no longer exist: | |
| // /some/deleted/page.html | |
| load('sbbsdefs.js'); | |
| var line; | |
| const f = new File(system.ctrl_dir + '410.txt'); | |
| if (f.open('r')) { | |
| var bork = false; | |
| while (!bork && !f.eof) { | |
| line = f.readln(); | |
| if (line !== null && line.replace(/\/$/, '').toLowerCase() == http_request.virtual_path.replace(/\/$/, '').toLowerCase()) { |
| // In ctrl/text.dat replace the 764 StartingNewUserRegistration line with: | |
| // "@EXEC:bot-trap@" 764 StartingNewUserRegistration | |
| // (Or if you have no such line, just add the above to the file.) | |
| load('sbbsdefs.js'); | |
| const bss = bbs.sys_status; // Store flags for later restoration | |
| bbs.sys_status|=SS_PAUSEOFF; // Prevent any block pause prompt from tying up the node | |
| const timeout = 10000; // milliseconds |
| var mb = new MsgBase(argv[0]); | |
| mb.open(); | |
| for (var n = 1; n < mb.last_msg; n++) { | |
| var hdr = mb.get_msg_header(n); | |
| if (hdr !== null) print(JSON.stringify(hdr.field_list)); | |
| } | |
| mb.close(); |