Skip to content

Instantly share code, notes, and snippets.

@HybridFox
Created December 19, 2016 14:30
Show Gist options
  • Save HybridFox/1634d743ef026ba5218420d816fc193a to your computer and use it in GitHub Desktop.
Save HybridFox/1634d743ef026ba5218420d816fc193a to your computer and use it in GitHub Desktop.
registerPlugin({
name: 'The Meme plugin',
version: '1.0',
description: 'For all your meme needs.',
author: 'Felixk Van Saet <felikx.vansaet@gmail.com>',
vars: {}
}, function(sinusbot, config) {
sinusbot.on('chat', function(ev) {
/**
* ev.mode
* ev.clientUid
* ev.clientId
* ev.clientNick
* ev.clientServerGroups
* ev.channel
* ev.msg
*/
switch (ev.msg) {
case '.reloadme':
sinusbot.chatPrivate(ev.clientId, 'Reloading!');
sinusbot.reloadScripts();
break;
case '.info':
sinusbot.chatPrivate(ev.clientId, 'Memes!');
break;
}
if (ev.msg.substr(0,6) == ".speed") {
var speed = ev.msg.substr(7,10);
sinusbot.chatPrivate(ev.clientId, "Setting speed to: " + speed);
sinusbot.setFilter('[a]atempo='+ speed +'[out]');
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment