Skip to content

Instantly share code, notes, and snippets.

@leewardbound
Last active December 12, 2015 00:48
Show Gist options
  • Save leewardbound/4686320 to your computer and use it in GitHub Desktop.
Save leewardbound/4686320 to your computer and use it in GitHub Desktop.
Quits all group chatrooms with IlyaBLT in them. We don't trust him, and a ghost is bad for communities like ours. Read the install instructions at the top of the file below.
#!/usr/bin/env python
"""
Needs 2 dependencies --
+ Install python 2.6-2.8 (Only necessary on windows, because OS-X and linux have it)
+ Install Skype4Py library
download it from here: https://github.com/awahlig/Skype4Py
then from a command line:
cd /path/to/Skype4Py/
python setup.py install
Then just save this file as "bltbot.py" and double-click.
"""
import Skype4Py
print 'Starting...'
# Instatinate Skype object, all further actions are done
# using this object.
skype = Skype4Py.Skype()
# Start Skype if it's not already running.
if not skype.Client.IsRunning:
skype.Client.Start()
# Set our application name.
skype.FriendlyName = 'Skype4Py'
# Attach to Skype. This may cause Skype to open a confirmation
# dialog.
skype.Attach()
while True:
# Set up an event handler.
def new_skype_status(status):
# If Skype is closed and reopened, it informs us about it
# so we can reattach.
if status == Skype4Py.apiAttachAvailable:
skype.Attach()
skype.OnAttachmentStatus = new_skype_status
from time import sleep
from random import choice
ilyachats = [c for c in skype.Chats if len(c.Members) > 3 and [m for m in c.Members if 'buylinkstoday' in m.Handle]]
for icu in ilyachats:
try:
try:
icu.Topic = "http://buylinkstoday.com | 133 10v35 y0u"
except:
pass
icu.SendMessage("THE ELEVENTH COMMANDMENT:")
sleep(2)
icu.SendMessage("thou shalt not allow ghosts in thy community")
sleep(3)
icu.SendMessage("i refuse to be in any group chat with ilya, and you can too")
sleep(2)
icu.SendMessage("the source of this bot is available at http://buylinkstoday.com")
sleep(2)
choices = [
"https://www.dropbox.com/s/7hnkerc9gucrs06/2012-12-09%2017.49.26.jpg",
"https://www.dropbox.com/s/wo8tujg3z1mcrlq/2012-12-27%2011.49.16.jpg",
"https://www.dropbox.com/s/1mn6mcbyexz0i3r/2012-11-28%2011.20.04.jpg",
"https://www.dropbox.com/s/12hrjuqayxytg1t/2012-11-28%2014.31.16.jpg",
"https://www.dropbox.com/s/j5gvs1484wsix18/2012-11-30%2010.09.17.jpg",
"https://www.dropbox.com/s/758g5bjokr7e1av/2012-07-09%2021.59.44.jpg",
]
sent = []
for i in range(3):
sleep(5)
pic = choice([c for c in choices if not c in sent])
sent.append(pic)
icu.SendMessage(pic)
sleep(2)
try:
icu.Leave()
except:
pass
except: pass
sleep(60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment