Files
CHOMPStation2/bot/some_but_not_all_2.py
quartz235@gmail.com 4472cecbd2 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
2011-12-23 17:39:47 +00:00

21 lines
459 B
Python

def sbna2(only_one,one_of_these,data):
if type(only_one) != list:
only_one = list(only_one)
if type(data) != list:
data = data.split(" ")
count = 0
for datoid in only_one:
if datoid in data and count >= 1:
return False
elif datoid in data:
count += 1
pass
else:
pass
if count == 0:
return False
for datoid in one_of_these:
if datoid in data:
return True
return False