Finally ready to like add this now oh man this is a huge thing sort of

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
This commit is contained in:
quartz235@gmail.com
2011-12-23 17:39:47 +00:00
parent 240a9bfac5
commit 4472cecbd2
33 changed files with 5954 additions and 2 deletions

30
bot/C_sarcasticball.py Normal file
View File

@@ -0,0 +1,30 @@
from random import choice as fsample
sarcastic_responses = ["Yeah right","What do I look like to you?","Are you kidding me?",#UsF
"As much as you","You don't believe that yourself","When pigs fly",#UsF
"Like your grandma","You would like to know, wouldn't you?", #UsF
"Like your mom", #Spectre
"Totally","Not at all", #Spectre
"AHAHAHahahaha, No.", #Strumpetplaya
"Not as much as USER","As much as USER",
"Really, you expect me to tell you that?",
"Right, and you've been building NOUNs for those USERs in the LOCATION, haven't you?" ] #Richard
locations = ["woods","baystation","ditch"]
nouns = ["bomb","toilet","robot","cyborg",
"garbage can","gun","cake",
"missile"]
def sarcasticball(data,debug,sender,users,prefix):
arg = data.lower().replace(prefix+"sarcasticball ","")
arg = arg.replace(prefix+"sball ","")
if debug:
print sender+":"+prefix+"sarcasticball", arg
choice = fsample(sarcastic_responses)
if "USER" in choice:
choice = choice.replace("USER",fsample(users),1)
choice = choice.replace("USER",fsample(users),1)
if "NOUN" in choice:
choice = choice.replace("NOUN",fsample(nouns),1)
if "LOCATION" in choice:
choice = choice.replace("LOCATION",fsample(locations),1)
if debug:
print "Responded with", choice
return(choice)