Files
VOREStation/bot/gen_fml.py
T
Hawk-v3 095299ed0a Subject: [PATCH 089/285] TG Updates: 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 instancesend2irc(hello, world) would come out as "CC_NanoTrasen: Hello | World
2012-03-01 21:09:27 +00:00

16 lines
453 B
Python

from FMLformatter import formatter
from urllib2 import urlopen
try:
from hashlib import md5
except:
from md5 import md5
from save_load import save,load
import CORE_DATA
directory = CORE_DATA.directory
FML = urlopen("http://www.fmylife.com/random")
formatted = formatter(FML.read().split("\n"))
for Quote in formatted:
exact = Quote[:Quote.find("#")]
# print exact
save(directory+"fmlquotes/"+md5(exact).hexdigest()+".txt",exact)