Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
howto:linuxapps [2021/04/24 10:46] – did something to somethin' mortifishowto:linuxapps [2022/02/07 06:51] – [Links2 Web Browser] Added a warning about Links2's OS Shell feature. Andre
Line 19: Line 19:
  
 === Add links2 to SBBS === === Add links2 to SBBS ===
 +
 +:!: Note that links2 could give access to the host OS, such as with "OS Shell" from the File menu, which gives the BBS user a shell as the OS user the BBS runs as. At the very least this will likely give someone access to your [[util:scfg|scfg]] tool.
  
 Add links2 to sbbs as an external program as any other door: Add links2 to sbbs as an external program as any other door:
Line 48: Line 50:
 === Add to Synchronet Command Shell === === Add to Synchronet Command Shell ===
  
-edit your *.src command shell script and add:+edit your *.src [[custom:command_shell|command shell]] script and add:
   ie: cmdkey /B   ie: cmdkey /B
           exec_bin "links2.js"           exec_bin "links2.js"
Line 117: Line 119:
 } }
 </code> </code>
 +
 +===== WeeChat IRC Client =====
 +
 +WeeChat (Wee Enhanced Environment for Chat) makes for a decent IRC client alternative to the stock irc.js client.
 +
 +First, install Weechat under Debian type:
 +
 +  $ sudo apt-get install weechat
 +  
 +add WeeChat as an external program similar to Links2 
 +( the script's bbs.exec('whatever', <args>); are the same to redirect i/o so no need to add it in SCFG )
 +
 +add a cmdkey ... end_cmd entry in your command shell similar to links2 above, if desired.
 +
 +=== example weechat js ===
 +
 +Weechat looks for a configuration file in /home/<user>/.weechat/irc.conf to get the username/channel/etc information
 +so wee need to setup a new config for each user/connection, to do this we apply some hackery:
 +
 +<code>
 +load("sbbsdefs.js");
 +
 +var enable;
 +var server;
 +var port;
 +var chan;
 +var lusr = user.alias;
 +
 +var quit_msg = system.name+' - WeeChat 1.6 Linux'; // todo random quit messages
 +
 +var irc = load("modopts.js", "weechat");
 +
 +if(irc.enabled == undefined) enabled = true;
 +    else enabled = irc.enabled;
 +if(irc.chan === undefined) chan = '#synchronet';
 +    else chan = irc.chan;
 +if(irc.server === undefined) servers = 'irc.synchro.net';
 +    else server = irc.servers;
 +
 +var infile = system.ctrl_dir+'irc-weechat.conf';
 +var outfile = system.ctrl_dir+'irc-weechat.tmp';
 +var weechat = '/home/sbbs/.weechat/irc.conf';
 +var wc_bup = '/home/sbbs/.weechat/irc-'+strftime("%Y-%m%d_%H%M", time())+'.conf';
 +var save_prefs = system.data_dir+'wc-prefs.'+user.number;
 +
 +if(!file_exists(weechat) || !enabled) {
 +        if(!enabled) {
 +            writeln('\r\n\r\n\1rWeechat is disabled\r\n\r\n');
 +        } else {
 +            writeln('\r\n\r\n\1rirc.conf missing.\r\n');
 +            mswait(500);
 +            writeln('\1cTrying default irc client\r\n\r\n');
 +            load("irc.js");
 +            exit();
 +        }
 +}
 +
 +var line;
 +var count;
 +
 +var inf = new File(infile);
 +var out = new File(outfile);
 +
 +writeln('\r\n\r\n \1gLoading IRC WeeChat 1.6\r\n');
 +writeln('\1g AlleyCat! BBS attempts connect to: \r\n');
 +writeln('   \1h\1yServer:  \1w'+servers);
 +writeln('   \1h\1yChannel: \1w'+chan);
 +writeln('   \1h\1yNick:    \1w'+lusr+'\r\n\r\n');
 +
 +var cont = console.noyes('Would you like to Connect to IRC ');
 +if(cont) {
 +    console.putmsg('\r\n\1r Aborting...\r\n\r\n');
 +    exit(0);
 +}
 +
 +console.putmsg('\r\n \1g[\1h\1yC\1g] ontinue to IRC   [\1wE\1g] dit Connection   [\1wQ\1g] uit\r\n\r\n Whadda ya wanna do? ');
 +var goon = console.getkey().toUpperCase();
 +if(goon != "Q" && goon != "E") goon = "C";
 +switch(goon) {
 +    case 'Q':
 +        writeln(' Returning to '+system.name+' \r\n\r\n');
 +        mswait(1000);
 +        exit();
 +    break;
 +
 +    case 'E':
 +        console.putmsg('\r\n\r\n \1gChannel: \1w');
 +        var chan1 = console.getstr();
 +        if(chan1 != '')
 +            chan = chan1;
 +        console.putmsg('\1g Nick: \1w');
 +        var lusr1 = console.getstr();
 +        if(lusr1 != '')
 +            lusr = lusr1;
 +        console.putmsg('\r\n\1gUsing nick: \1h\1y'+lusr+' \1gand joining channel \1h\1y'+chan+'\r\n');
 +        mswait(1000);
 +    break;
 +}
 +
 +inf.open("r");
 +out.open("w+");
 +
 +count = 0;
 +
 +while(!inf.eof) {
 +        line = inf.readln().trim();
 +        if(line.toUpperCase() !== "[SERVER]" && line !== null) { // dump the default settings ...
 +                out.writeln(line);
 +                count++;
 +        }
 +        else { // found [server] , this section needs to be replace with sbbs user credentials
 +            out.writeln('[server]');
 +            out.writeln('synchronet.proxy');
 +            out.writeln('synchronet.ipv6');
 +            out.writeln('synchronet.ss');
 +            out.writeln('synchronet.ssl_cert');
 +            out.writeln('synchronet.ssl_priorities');
 +            out.writeln('synchronet.ssl_dhkey_size');
 +            out.writeln('synchronet.ssl_fingerprint');
 +            out.writeln('synchronet.ssl_verify');
 +            out.writeln('synchronet.password');
 +            out.writeln('synchronet.capabilities');
 +            out.writeln('synchronet.sasl_mechanism');
 +            out.writeln('synchronet.sasl_username');
 +            out.writeln('synchronet.sasl_password');
 +            out.writeln('synchronet.sasl_key');
 +            out.writeln('synchronet.sasl_timeout');
 +            out.writeln('synchronet.sasl_fail');
 +            out.writeln('synchronet.autoconnect = on');
 +            out.writeln('synchronet.autoreconnect');
 +            out.writeln('synchronet.autoreconnect_delay');
 +            out.writeln('synchronet.nicks_alternate');
 +            out.writeln('synchronet.local_hostname');
 +            out.writeln('synchronet.command');
 +            out.writeln('synchronet.command_delay');
 +            out.writeln('synchronet.autojoin = "'+chan+'"');
 +            out.writeln('synchronet.autorejoin ');
 +            out.writeln('synchronet.autorejoin_delay');
 +            out.writeln('synchronet.connection_timeout');
 +            out.writeln('synchronet.anti_flood_prio_high');
 +            out.writeln('synchronet.anti_flood_prio_low');
 +            out.writeln('synchronet.away_check');
 +            out.writeln('synchronet.away_check_max_nicks');
 +            out.writeln('synchronet.msg_kick');
 +            out.writeln('synchronet.msg_part');
 +            out.writeln('synchronet.sasl_timeout');
 +            out.writeln('synchronet.sasl_fail');
 +            out.writeln('synchronet.autoconnect = on');
 +            out.writeln('synchronet.autoreconnect');
 +            out.writeln('synchronet.autoreconnect_delay');
 +            out.writeln('synchronet.nicks_alternate');
 +            out.writeln('synchronet.local_hostname');
 +            out.writeln('synchronet.command');
 +            out.writeln('synchronet.command_delay');
 +            out.writeln('synchronet.autojoin = "'+chan+'"');
 +            out.writeln('synchronet.autorejoin ');
 +            out.writeln('synchronet.autorejoin_delay');
 +            out.writeln('synchronet.connection_timeout');
 +            out.writeln('synchronet.anti_flood_prio_high');
 +            out.writeln('synchronet.anti_flood_prio_low');
 +            out.writeln('synchronet.away_check');
 +            out.writeln('synchronet.away_check_max_nicks');
 +            out.writeln('synchronet.msg_kick');
 +            out.writeln('synchronet.msg_part');
 +            out.writeln('synchronet.msg_quit = "' + quit_msg+'"');
 +            out.writeln('synchronet.notify');
 +            out.writeln('synchronet.nicks = "' + lusr + ',' + lusr+'_,' + '_' + lusr + '_"');
 +            out.writeln('synchronet.username = "' + lusr.toLowerCase() + '"');
 +            out.writeln('synchronet.realname = "' + lusr + ' @ ' + system.name + ' [WeeChat 1.6]"');
 +            out.writeln('synchronet.addresses = "' + servers + '"');
 +            out.writeln();
 +            count += 41;
 +            console.pause();
 +            out.close(); // yes, [server] is actually the last [section] in weechat irc.conf
 +        }
 +}
 +
 +inf.close();
 +out.close();
 +file_rename(weechat, wc_bup);
 +file_copy(outfile, weechat);
 +bbs.exec('weechat', EX_STDIO|EX_NATIVE|EX_NOLOG); // execute bash>weechat redirecting stdout back to sbbs
 +
 +console.pause();
 +writeln('\r\n\r\n \1gReturning to \1c'+system.name);
 +mswait(1000);
 +</code>
 +===== =====
 +
 ===== See Also ===== ===== See Also =====
   * [[:howto:|howto index]]   * [[:howto:|howto index]]