-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplugin_mock.py
More file actions
34 lines (29 loc) · 935 Bytes
/
Copy pathplugin_mock.py
File metadata and controls
34 lines (29 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Magnet2 by Grom PE. Public domain.
import urllib2
from magnet_api import *
from magnet_utils import *
def event_room_message(bot, (message, room, nick)):
if message.getType() != 'groupchat': return
if not 'mock' in bot.get_config(room, 'options'): return
if nick == bot.self_nick[room]: return
text = message.getBody()
if text:
res = None
if text == 'O.o': res = 'o.O'
elif text == 'o.O': res = 'O.o'
elif text == 'o.o': res = 'O.O'
elif text == 'O_o': res = 'o_O'
elif text == 'o_O': res = 'O_o'
elif text == '...': res = 'Pacman will get you!'
elif text == '....': res = 'Pacman will get you!'
elif text == '?': res = u'\xbf'
elif text == 'k': res = 'You forgot "o".'
elif text == 'lol': res = '/me laughs out loud.'
if res:
bot.send_room_message(room, res)
def load(bot):
pass
def unload(bot):
pass
def info(bot):
return 'Mock plugin v1.0'