mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 18:11:47 +00:00
Added CC-Nanotrasen, an IRC bot made by Skibiliano and given to us by him under CC-BY-SA 3.0 licensing WHAT DOES THIS MEAN? It means all servers running this SVN now have the option to use an easy to configure IRC bot capable of relaying adminhelps from ingame to the server/channel of their choice. - Runs on python 2.6 scripts with psyco support - Relaying can be toggled from config.txt (so you don't runtime with every adminhelp if you decide not to use it) - Comes with a bunch of other useful and fun tools too - Added a new global proc, send2irc(msg,msg2) YOU'LL NEVER GUESS WHAT IT DOES CONSIDERING WHAT I JUST MENTIONED ----msg and msg2 are just what text gets relayed to irc, separated by a |, for instance send2irc(hello, world) would come out as "CC_NanoTrasen: Hello | World git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2783 316c924e-a436-60f5-8080-3fe189b3f50e
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
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)
|