Re: Re: Random Signitures
By: Mortifis to Alan Ianson on Sun Jul 14 2019 10:19 pm
Hello Mortifis,
Is there a mechanism for having a random tagline or signiture added to a message post?
SBBS has an optional signature in the default user config. It's not random though but I think all SBBSs editors will use it.
Some editors like Syledit support taglines optionaly.
Thank you, Al, I manually go into default settings and update my signature, I was just wondering how to go about randomizing the process :-)
Here's the script I run to randomize my tagline (pulls a random line from 3 differnet randomly chosen files):
// Re-create signature file with random Snapple "Real Fact"
const syncfacts = 0, acronyms = 1, tapquotes = 2;
var type = random(3);
var fname;
//print("type = " + type);
switch(type) {
case syncfacts:
fname = system.data_dir + "syncfact.lst";
break;
case acronyms:
fname = system.data_dir + "acronyms.local.conf";
break;
case tapquotes:
fname = system.data_dir + "tapquotes.lst";
break;
}
f = new File(fname);
if(!f.open("r")) {
alert("Error opening " + fname);
exit();
}
var list = f.readAll();
f.close();
//print("randomizing: " + list.length);
i = random(list.length);
//print("done: " + i);
var line = list[i].split(/\s+/);
f = new File(system.data_dir + "user/0001.sig");
if(!f.open("r+"))
exit();
var text = f.readAll();
f.length = 0;
f.position = 0;
switch(type) {
case acronyms:
text[3] = "Synchronet/BBS Terminology Definition #" + (i+1) + ":"; text[4] = line.shift() + " = " + line.join(' ');
break;
case syncfacts:
text[3] = "Synchronet \"Real Fact\" #" + (i+1) + ":";
text[4] = list[i];
break;
case tapquotes:
text[3] = "This Is Spinal Tap quote #" + (i+1) + ":";
text[4] = list[i];
break;
}
f.writeAll(text);
f.close();
digital man
Synchronet/BBS Terminology Definition #53:
PETSCII = PET Standard Code of Information Interchange (a.k.a. CBM ASCII) Norco, CA WX: 75.3øF, 60.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net