Deprecated: Use of "parent" in callables is deprecated in /var/www/html/forum/src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php on line 431
  • If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

Feature Stopping playback when telling the bot to leave the server

Status
Not open for further replies.
I would like to see an option (or could be even default behaviour in my opinion) to stop playback when the bot is told to leave the TS server.

Currently most of the time I am using it to stream a radio station. Right now the bot is always connected to the station and is eating up network traffic unnecessarily.

I thought AloneMode is there to address this issue, however I am not sure if it's maybe just designed to quit streaming to the TS server only.

I have "EnableAloneMode = true" in my config.ini and inside the web interface it's activated and set to "stop playback" under Scripts.

So, I'm actually unsure if that's a bug or not. If so, just change the prefix then.

I know it's not much of a deal to stop playback inside the web interface first and then disconnect the bot from the TS server, but if you let others control the bot as well I'm afraid they sometimes will forget to click on the stop button...

Log file is appended.

  • used version: Beta 0.9.9 50e8ba1
  • used operating system: Debian 8, 64-bit
  • hardware specs: VPS (KVM), 2 cores of Intel Xeon E5-2620v3, 256 MB RAM
  • used browser: Firefox 40.0.3
config.ini:
TS3Path = "/opt/sinusbot/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
EnableAloneMode = true
DataDir = ""
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
LogLevel = 10
EnableProfiler = false
YoutubeDLPath = ""
EnableDebugConsole = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
InstanceActionLimit = 6
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
MTU = 1500
SampleInterval = 60
StartVNC = false
EnableWebStream = false
LogFile = "/opt/sinusbot/sinusbot.log"
LicenseKey = "vtCeRx4p+vb7RyBXQZSU+7yy8r7ACsjAKkRN2J21Fg0="
DisableLocalXServer = false
DebugLocalXServer = false
IsProxied = false

[StreamRewrites]

[Scripts]
AllowReload = false
 

Attachments

  • sinusbot_log.zip
    1.1 KB · Views: 3

good_live

Active Member
Tier III
is awesome!
V.I.P.
Contributor
Insider
Im not sure if it's a bug or not, but this should help:
It's untested!!!

Code:
registerPlugin({
    name: 'Stop!',
    version: '1.0',
    description: 'Stops the bot playback when he gets disconnected',
    author: 'good_live',
    vars: {
    }
}, function(sinusbot, config, info) {
   
        // -- Load messages --
    log('Loading...');
    var author = info.author.split(',');
    if(author.length == 1){
        author = author[0];
        author = author.replace(/<.*>/gi, '').trim();
    } else {
        author = author.map(function(e){
            return e.replace(/<.*>/gi, '').trim();
        });
        author = author.join(' & ');
    }
    log(info.name + ' v' + info.version + ' by ' + author + ' for SinusBot v0.9.9-50e8ba1 (and above)');
   
   
    sinusbot.on('disconnect', function(ev) {
        if (playing()){
            stop();
        }
        return;
    });
});
 
Status
Not open for further replies.
Top