-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into heatengine
- Loading branch information
Showing
1,193 changed files
with
778,891 additions
and
778,303 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = tab | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{dme,dmf,dmm,dm}] | ||
end_of_line = crlf | ||
indent_style = tab | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Dockerfile] | ||
indent_style = space | ||
indent_size = 2 |
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 |
---|---|---|
@@ -1,25 +1,51 @@ | ||
* text=auto | ||
|
||
## Enforce text mode and LF line breaks | ||
*.bat text eol=lf | ||
*.cjs text eol=lf | ||
*.css text eol=lf | ||
*.dm text eol=lf | ||
*.dme text eol=lf | ||
*.dmf text eol=lf | ||
*.htm text eol=lf | ||
*.html text eol=lf | ||
*.js text eol=lf | ||
*.json text eol=lf | ||
*.jsx text eol=lf | ||
*.md text eol=lf | ||
*.ps1 text eol=lf | ||
*.py text eol=lf | ||
*.scss text eol=lf | ||
*.sh text eol=lf | ||
*.sql text eol=lf | ||
*.svg text eol=lf | ||
*.ts text eol=lf | ||
*.tsx text eol=lf | ||
*.txt text eol=lf | ||
*.yaml text eol=lf | ||
*.yml text eol=lf | ||
|
||
## Enforce binary mode | ||
*.bmp binary | ||
*.dll binary | ||
*.dmb binary | ||
*.exe binary | ||
*.gif binary | ||
*.jpg binary | ||
*.png binary | ||
*.so binary | ||
*.zip binary | ||
|
||
# dmm map merger hook | ||
# needs additional setup, see tools/mapmerge/install.txt | ||
# *.dmm merge=merge-dmm | ||
## Merger hooks, run tools/hooks/install.bat or install.sh to set up | ||
#*.dmm text eol=lf merge=dmm | ||
#*.dmi binary merge=dmi | ||
|
||
# dmi icon merger hook | ||
# old dmi icon merger hook | ||
# needs additional setup, see tools/dmitool/merging.txt | ||
*.dmi merge=merge-dmi | ||
|
||
## Force tab indents on dm files | ||
*.dm whitespace=indent-with-non-tab | ||
|
||
# force changelog merging to use union | ||
html/changelog.html merge=union |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
Name = "CC_NanoTrasen" #The name he uses to connect | ||
no_absolute_paths = True | ||
debug_on = False | ||
SName = ["cc","nt","trasen","nano","nanotrasen"] #Other names he will respond to, in lowercase | ||
DISABLE_ALL_NON_MANDATORY_SOCKET_CONNECTIONS = False | ||
directory = "bot/directory/here/" # Directory the bot is located in, make sure to keep the "/" at the end | ||
version = "TG CC-BY-SA 6" | ||
Network = 'YOUR.SERVER.HERE' #e.g. "irc.rizon.net" | ||
channel = "#YOUR CHANNEL HERE" #what channel you want the bot in | ||
channels = ["#YOUR CHANNEL HERE"] #same as above | ||
greeting = "Welcome!" #what he says when a person he hasn't seen before joins | ||
prefix = "!" #prefix for bot commands | ||
Port = 7000 | ||
Name = "CC_NanoTrasen" #The name he uses to connect | ||
no_absolute_paths = True | ||
debug_on = False | ||
SName = ["cc","nt","trasen","nano","nanotrasen"] #Other names he will respond to, in lowercase | ||
DISABLE_ALL_NON_MANDATORY_SOCKET_CONNECTIONS = False | ||
directory = "bot/directory/here/" # Directory the bot is located in, make sure to keep the "/" at the end | ||
version = "TG CC-BY-SA 6" | ||
Network = 'YOUR.SERVER.HERE' #e.g. "irc.rizon.net" | ||
channel = "#YOUR CHANNEL HERE" #what channel you want the bot in | ||
channels = ["#YOUR CHANNEL HERE"] #same as above | ||
greeting = "Welcome!" #what he says when a person he hasn't seen before joins | ||
prefix = "!" #prefix for bot commands | ||
Port = 7000 |
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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
from random import choice as fsample #Yay for added speed! | ||
global responses | ||
responses = ['Yes','Too bad','Will you turn me off if I tell you?','Absolutely', | ||
"Not at all", "Nope", "It does", "No", "All the time", | ||
"I don't really know", "Could be","Possibly","You're still here?",# Chaoticag | ||
"No idea", "Of course", "Would you turn me off if I tell you?", | ||
"Sweet!","Nah","Certainly","Yeah","Yup","I am quite confident that the answer is Yes", | ||
"Perhaps", "Yeeeeaah... No.", "Indubitably" ] # Richard | ||
def eightball(data,debug,sender,prefix): | ||
global responses | ||
arg = data.lower().replace(prefix+"eightball ","") | ||
arg = arg.replace(prefix+"8ball ","") | ||
if debug: | ||
print sender+":"+prefix+"eightball", arg | ||
if "answer" in arg and "everything" in arg and "to" in arg: | ||
if debug: | ||
print "Responded with",42 | ||
return "42" | ||
elif arg == "derp": | ||
if debug: | ||
print "Responded with herp" | ||
return("herp") | ||
elif arg == "herp": | ||
if debug: | ||
print "Responded with derp" | ||
return("derp") | ||
else: | ||
#choice = sample(responses,1)[0] | ||
choice = fsample(responses) | ||
if debug: | ||
print "Responded with", choice | ||
return(choice) | ||
from random import choice as fsample #Yay for added speed! | ||
global responses | ||
responses = ['Yes','Too bad','Will you turn me off if I tell you?','Absolutely', | ||
"Not at all", "Nope", "It does", "No", "All the time", | ||
"I don't really know", "Could be","Possibly","You're still here?",# Chaoticag | ||
"No idea", "Of course", "Would you turn me off if I tell you?", | ||
"Sweet!","Nah","Certainly","Yeah","Yup","I am quite confident that the answer is Yes", | ||
"Perhaps", "Yeeeeaah... No.", "Indubitably" ] # Richard | ||
def eightball(data,debug,sender,prefix): | ||
global responses | ||
arg = data.lower().replace(prefix+"eightball ","") | ||
arg = arg.replace(prefix+"8ball ","") | ||
if debug: | ||
print sender+":"+prefix+"eightball", arg | ||
if "answer" in arg and "everything" in arg and "to" in arg: | ||
if debug: | ||
print "Responded with",42 | ||
return "42" | ||
elif arg == "derp": | ||
if debug: | ||
print "Responded with herp" | ||
return("herp") | ||
elif arg == "herp": | ||
if debug: | ||
print "Responded with derp" | ||
return("derp") | ||
else: | ||
#choice = sample(responses,1)[0] | ||
choice = fsample(responses) | ||
if debug: | ||
print "Responded with", choice | ||
return(choice) |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#Throws a coin, simple. | ||
from random import random | ||
def heaortai(debug,sender): return("Heads" if random() > 0.5 else "Tails") | ||
# Takes 1/6th the time of doing it with random.randint(0,1) | ||
# This file used to be a lot bigger, now it's kind of useless. | ||
#Throws a coin, simple. | ||
from random import random | ||
def heaortai(debug,sender): return("Heads" if random() > 0.5 else "Tails") | ||
# Takes 1/6th the time of doing it with random.randint(0,1) | ||
# This file used to be a lot bigger, now it's kind of useless. |
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
from save_load import save | ||
from os import listdir | ||
import CORE_DATA | ||
directory = CORE_DATA.directory | ||
def mkquote(prefix,influx,sender,debug): | ||
arg = influx[10+len(prefix):] | ||
if debug: | ||
print sender+":"+prefix+"makequote "+str(len(arg))+" Characters" | ||
if len(arg) == 0: | ||
return("Type something to a quote") | ||
else: | ||
files = listdir(directory+"userquotes") | ||
numb = 0 | ||
while True: | ||
numb += 1 | ||
if sender.lower()+str(numb) in files: | ||
pass | ||
else: | ||
save(directory+"userquotes/"+sender.lower()+str(numb),[arg,sender.lower()]) | ||
return("Saved as:"+sender.lower()+str(numb)) | ||
break | ||
from save_load import save | ||
from os import listdir | ||
import CORE_DATA | ||
directory = CORE_DATA.directory | ||
def mkquote(prefix,influx,sender,debug): | ||
arg = influx[10+len(prefix):] | ||
if debug: | ||
print sender+":"+prefix+"makequote "+str(len(arg))+" Characters" | ||
if len(arg) == 0: | ||
return("Type something to a quote") | ||
else: | ||
files = listdir(directory+"userquotes") | ||
numb = 0 | ||
while True: | ||
numb += 1 | ||
if sender.lower()+str(numb) in files: | ||
pass | ||
else: | ||
save(directory+"userquotes/"+sender.lower()+str(numb),[arg,sender.lower()]) | ||
return("Saved as:"+sender.lower()+str(numb)) | ||
break |
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 |
---|---|---|
@@ -1,70 +1,70 @@ | ||
### EXPERIMENTAL PROTOTYPE ### | ||
# e = 2.7182818284590452353602874713526624977572 | ||
# pi = math.pi | ||
from __future__ import division #PYTHON Y U NO TELL ME THIS BEFORE | ||
import math | ||
import random | ||
import re | ||
e = "2.7182818284590452353602874713526624977572" | ||
pi = str(math.pi) | ||
global pre | ||
pre = len("maths ") | ||
def maths(influx,prefix="!",sender="NaN",debug=True,method="n"): | ||
global pre | ||
influx = influx.lower() | ||
influx = influx[len(prefix)+pre:] | ||
influx = influx.replace("pie",pi+"*"+e) | ||
influx = influx.replace("e*",e+"*") | ||
influx = influx.replace("*e","*"+e) | ||
influx = influx.replace("pi",pi) | ||
if debug: | ||
print sender+":"+prefix+"maths" | ||
if influx.count("**") == 0 and influx.count('"') == 0 and influx.count("'") == 0 and influx.count(";") == 0 and influx.count(":") == 0: | ||
influx_low = influx.lower() | ||
influx_hi = influx.upper() | ||
if "0b" in influx_low: | ||
influx_low = re.sub("0b[0-1]*","",influx_low) | ||
influx_hi = re.sub("0B[0-1]*","",influx_hi) | ||
if "0x" in influx_low: | ||
influx_low = re.sub("0x[a-f0-9]*","",influx_low) | ||
influx_hi = re.sub("0X[A-F0-9]*","",influx_hi) | ||
if "rand" in influx_low: | ||
influx_low = re.sub("rand","",influx_low) | ||
influx_hi = re.sub("RAND","",influx_hi) | ||
if influx_low == influx_hi: | ||
influx = re.sub("rand","random.random()",influx) | ||
try: | ||
result = eval(influx.lower()) | ||
except ZeroDivisionError: | ||
return "Divide by zero detected." | ||
except SyntaxError: | ||
return "Syntax Error detected." | ||
except TypeError: | ||
return "Type Error detected." | ||
except: | ||
return "Unknown Error detected." | ||
else: | ||
if method == "n": #Normal | ||
return result | ||
elif method == "i": #Forced Int | ||
return int(result) | ||
elif method == "h": #Hex | ||
try: | ||
if "L" in hex(result)[2:]: | ||
return hex(result)[2:-1] | ||
else: | ||
return hex(result)[2:].upper() | ||
except TypeError: | ||
return "That value (%s) cannot be interpreted properly using !hmaths" %(str(result)) | ||
elif method == "b": #Binary | ||
try: | ||
return bin(result)[2:].upper() | ||
except TypeError: | ||
return "That value (%s) cannot be interpreted properly using !bmaths" %(str(result)) | ||
else: | ||
return result | ||
else: | ||
return "What are you trying to make me do again?" | ||
else: | ||
return "Those are likely to make me hang" | ||
|
||
### EXPERIMENTAL PROTOTYPE ### | ||
# e = 2.7182818284590452353602874713526624977572 | ||
# pi = math.pi | ||
from __future__ import division #PYTHON Y U NO TELL ME THIS BEFORE | ||
import math | ||
import random | ||
import re | ||
e = "2.7182818284590452353602874713526624977572" | ||
pi = str(math.pi) | ||
global pre | ||
pre = len("maths ") | ||
def maths(influx,prefix="!",sender="NaN",debug=True,method="n"): | ||
global pre | ||
influx = influx.lower() | ||
influx = influx[len(prefix)+pre:] | ||
influx = influx.replace("pie",pi+"*"+e) | ||
influx = influx.replace("e*",e+"*") | ||
influx = influx.replace("*e","*"+e) | ||
influx = influx.replace("pi",pi) | ||
if debug: | ||
print sender+":"+prefix+"maths" | ||
if influx.count("**") == 0 and influx.count('"') == 0 and influx.count("'") == 0 and influx.count(";") == 0 and influx.count(":") == 0: | ||
influx_low = influx.lower() | ||
influx_hi = influx.upper() | ||
if "0b" in influx_low: | ||
influx_low = re.sub("0b[0-1]*","",influx_low) | ||
influx_hi = re.sub("0B[0-1]*","",influx_hi) | ||
if "0x" in influx_low: | ||
influx_low = re.sub("0x[a-f0-9]*","",influx_low) | ||
influx_hi = re.sub("0X[A-F0-9]*","",influx_hi) | ||
if "rand" in influx_low: | ||
influx_low = re.sub("rand","",influx_low) | ||
influx_hi = re.sub("RAND","",influx_hi) | ||
if influx_low == influx_hi: | ||
influx = re.sub("rand","random.random()",influx) | ||
try: | ||
result = eval(influx.lower()) | ||
except ZeroDivisionError: | ||
return "Divide by zero detected." | ||
except SyntaxError: | ||
return "Syntax Error detected." | ||
except TypeError: | ||
return "Type Error detected." | ||
except: | ||
return "Unknown Error detected." | ||
else: | ||
if method == "n": #Normal | ||
return result | ||
elif method == "i": #Forced Int | ||
return int(result) | ||
elif method == "h": #Hex | ||
try: | ||
if "L" in hex(result)[2:]: | ||
return hex(result)[2:-1] | ||
else: | ||
return hex(result)[2:].upper() | ||
except TypeError: | ||
return "That value (%s) cannot be interpreted properly using !hmaths" %(str(result)) | ||
elif method == "b": #Binary | ||
try: | ||
return bin(result)[2:].upper() | ||
except TypeError: | ||
return "That value (%s) cannot be interpreted properly using !bmaths" %(str(result)) | ||
else: | ||
return result | ||
else: | ||
return "What are you trying to make me do again?" | ||
else: | ||
return "Those are likely to make me hang" | ||
|
Oops, something went wrong.