Skip to content

Instantly share code, notes, and snippets.

@pikulet
Last active September 22, 2020 12:13
Show Gist options
  • Save pikulet/38a384afeb947f02db31892e9b65b16b to your computer and use it in GitHub Desktop.
Save pikulet/38a384afeb947f02db31892e9b65b16b to your computer and use it in GitHub Desktop.
Emjack: for /slave command, to reset the master to no master
// Anyone can free you... uncomment lines 10 to 13 to only allow the master to free you
{
name: "Be free",
regex: /^be? free/i,
callback: function(data) {
if(data.user===master) {
master="";
sock.chat("i need to find a new master...", data.user);
}
else {
master="";
sock.chat("thank you for redeeming me...", data.user);
}
}
},
// People can ask you to slap...
{
name: "Slap",
regex: /^slap/i,
callback: function(data) {
if(data.user===master) {
sock.chat("/me lifts her hand and opens it wide to deliver the hardest slap ever, but sees a rat and cowers in fear");
}
else {
sock.chat("a servant is not entitled to such a privileged action", data.user);
}
},
},
// chat commands
// Allows you to free yourself from your master by typing /escape
{
name: "Escape from master",
regex: /^escape/i,
callback: function() {
master="";
sock.chat("i escaped from the abyss of slavery...");
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment