-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,296 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//Dangerous EVAL command | ||
function evaluate(txt,chan,userId) | ||
{ | ||
var evaluate = "Nope"; | ||
var splitHold = String.prototype.split; | ||
var subHold = String.prototype.substring; | ||
txt = txt.replace(commandTag+"eval ",""); | ||
txt = txt.replace(commandTag+"eval",""); | ||
txt = txt.replace("userId",""); | ||
txt = txt.replace("evaluate",""); | ||
txt = txt.replace("whitelist","blacklist"); | ||
if (userId != "147284801647411200") | ||
{ | ||
txt = txt.replace("147284801647411200","[Can't do that with Shubshub]"); | ||
txt = txt.replace("authToken",""); | ||
txt = txt.replace("substring","[No SubStrings]"); | ||
txt = txt.replace("window",""); | ||
txt = txt.replace("this",""); | ||
txt = txt.replace("login"); | ||
txt = txt.replace("api_key",""); | ||
txt = txt.replace("sendMessage","[No Sending Messages]"); | ||
String.prototype.split = 0; | ||
String.prototype.substring = 0; | ||
} | ||
try{ | ||
output = eval(txt); | ||
String.prototype.split = splitHold; | ||
String.prototype.substring = subHold; | ||
output = output.toString(); | ||
output = output.replace(authToken,"[Auth Token Redacted!]"); | ||
output = output.replace(authToken.split(""),"[Auth Token Redacted!]"); | ||
sendMessage(output,chan); | ||
} | ||
catch(err) {sendMessage("``Error with the code: "+err+"``",chan);} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
var challengeServer = 0; | ||
var chlngServOne = ""; | ||
var chlngServTwo = ""; | ||
var chlngServTwoID = 0; | ||
var chlngServOneID = 0; | ||
|
||
function challengeDescribe(txt,chan,userId) | ||
{ | ||
txt = txt.replace(commandTag+"servChallenge ",""); | ||
if (challengeServer == 0) | ||
{ | ||
chlngServOneID = chan; | ||
chlngServTwoID = txt; | ||
for (var i = 0; i < guildChannels.length; i++) | ||
{ | ||
for (var j = 0; j < guildChannels[i].length; j++) | ||
{ | ||
if (chlngServOneID == guildChannels[i][j].id) | ||
{ | ||
for (var k = 0; k < guildServers.length; k++) | ||
{ | ||
if (guildChannels[i][j].guild_id == guildServers[k].id) | ||
{ | ||
chlngServOne = guildServers[k].name; | ||
} | ||
} | ||
|
||
} | ||
if (chlngServTwoID == guildChannels[i][j].id) | ||
{ | ||
for (var k = 0; k < guildServers.length; k++) | ||
{ | ||
if (guildChannels[i][j].guild_id == guildServers[k].id) | ||
{ | ||
chlngServTwo = guildServers[k].name; | ||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
challengeServer = 1; | ||
sendMessage("Sending Challenge Request to "+chlngServTwo,chlngServOneID); | ||
sendMessage(chlngServOne+" is challenging you to a game of Guess! type ```<@169712284149481472> acceptChallenge``` to start!",chlngServTwoID); | ||
setTimeout(function(){if (challengeServer == 1) {sendMessage("Challenge was dropped nobody picked up call them back later with ``"+commandTag+"servChallenge "+chlngServOneID+"``",chlngServTwoID); chlngServTwoID = 0; challengeServer = 0; sendMessage("Nobody answered the call...",chlngServOneID); chlngServOneID = 0; }},60000); | ||
} | ||
else | ||
{ | ||
sendMessage("Challenge in Progress",chan); | ||
} | ||
} | ||
|
||
function challengeConnected(nothing,chan,nothingg) | ||
{ | ||
console.log(chan); | ||
if ((challengeServer == 1) && (chan == chlngServTwoID)) | ||
{ | ||
sendMessage("Challenge accepted starting game!",chlngServOneID); | ||
sendMessage("Challenge accepted starting game!",chlngServTwoID); | ||
startChallenge(); | ||
challengeServer = 2; | ||
} | ||
|
||
} | ||
|
||
function challengeEnd(txt,chan) | ||
{ | ||
if (challengeServer >= 1) | ||
{ | ||
sendMessage("Challenge Withdrawn",chlngServOneID); | ||
sendMessage("Challenge Withdrawn",chlngServTwoID); | ||
chlngServOneID = 0; | ||
chlngServTwoID = 0; | ||
challengeServer = 0; | ||
} | ||
} | ||
|
||
function challengeSpeak(txt,chan,userId) | ||
{ | ||
txt = txt.replace(commandTag+"describe ", ""); | ||
txt = txt.replaceAll("@everyone","[everyone ping removed!]"); | ||
txt = txt.replaceAll("@here","[here ping removed!]"); | ||
if (challengeServer == 2) | ||
{ | ||
if (chlngServOneID == chan) | ||
{ | ||
sendMessage("*<@"+userId+"> says '"+txt+"' from Server: "+chlngServOne,chlngServTwoID); | ||
} | ||
else if (chlngServTwoID == chan) | ||
{ | ||
sendMessage("*<@"+userId+"> says '"+txt+"' from Server: "+chlngServTwo,chlngServOneID); | ||
} | ||
} | ||
} | ||
|
||
function startChallenge() | ||
{ | ||
sendMessage("Picking a Topic... Please Wait",chlngServTwoID); | ||
sendMessage("Picking a Topic... Please Wait",chlngServOneID); | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
//eval("(function(){return 'Hello'})(self)") | ||
function getCloser(a, b, c) { | ||
b = b || c; | ||
return Math.round(a / b) * b; | ||
} | ||
function convert(txt){ | ||
var tex = "(function(){return 'Hello'})(self)"; | ||
tex = txt; | ||
t="" | ||
j = 0; | ||
for (var i = 0;i<tex.length;i++) | ||
{ | ||
/*if (j!=0) | ||
{ | ||
var z = getCloser(j,0,tex.charCodeAt(i)); | ||
if (z == 0) | ||
{ | ||
j=0; | ||
t+="#"; | ||
} | ||
}*/ | ||
while(j!=tex.charCodeAt(i)) | ||
{ | ||
t+=(j>tex.charCodeAt(i))?"-":"+" | ||
if(j > tex.charCodeAt(i)) | ||
{ | ||
j--; | ||
} | ||
if (j < tex.charCodeAt(i)) | ||
{ | ||
j++; | ||
} | ||
} | ||
t+="<" | ||
} | ||
t+="="; | ||
console.log(t)} | ||
function golfpherHelp(nothing,chan) | ||
{ | ||
var msg="Golfpher is an Esoteric Language that works on a single Char Pointer\nThere are only 4 functions in Golfpher\n+ : Add one to the Char Pointer\n- : Remove one from the Char Pointer\n< : Push the character at the char pointers position onto the stack\n= : execute the code thats on the stack\nEach function must be seperated by a ;"; | ||
sendMessage("Golfpher is an Esoteric Language that works on a single Char Pointer\nThere are only 4 functions in Golfpher\n```+ : Add one to the Char Pointer\n- : Remove one from the Char Pointer\n< : Push the character at the char pointers position onto the stack\n= : execute the code thats on the stack\n```\n\n"+commandTag+"golfpher [code] to execute a golfpher program",chan); | ||
} | ||
function lang(txt,chan) | ||
{ | ||
i=0; | ||
txt = txt.replace(commandTag+"golfpher ",""); | ||
output = txt.split(""); | ||
code=""; | ||
data=""; | ||
for(j = 0;j<output.length;j++) | ||
{ | ||
if(output[j]=="=") | ||
{ | ||
code=code.replaceAll("authToken",""); | ||
data+=eval(code); | ||
} | ||
else if(output[j]=="<") | ||
{ | ||
code+=String.fromCharCode(i); | ||
} | ||
else if(output[j]=="+") | ||
{ | ||
i++; | ||
} | ||
else if (output[j]=="-") | ||
{ | ||
i--; | ||
} | ||
else if (output[j]=="#") | ||
{ | ||
i=0; | ||
} | ||
} | ||
sendMessage(data,chan); | ||
} |
Oops, something went wrong.