Skip to content

Commit e1fa716

Browse files
committed
Merge branch 'gonzobot' of github.com:edwardslabs/CloudBot into gonzobot
2 parents 1d6d678 + f964753 commit e1fa716

5 files changed

Lines changed: 76 additions & 7 deletions

File tree

plugins/dwi.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,28 @@
2424
]
2525

2626

27+
Facepalmacros = ['https://i.imgur.com/iWKad22r.jpg',
28+
'https://i.imgur.com/3Jauxrw.jpg',
29+
'https://i.imgur.com/kFyKOgj.gif',
30+
'https://i.imgur.com/5JaFlhU.jpg?1',
31+
'https://i.imgur.com/qbnNXWy.gif',
32+
'https://i.imgur.com/h46ycmx.png',
33+
'https://i.imgur.com/gPNQzaf.jpg',
34+
'https://i.imgur.com/9I8A9C5.jpg']
2735

2836

2937
@hook.command('dwi','dealwithit')
3038

3139
def DWI(text, message):
32-
'''Tell some one in the channel to deal with it'''
40+
'''Tell some one in the channel to deal with it. File located in dwi.py'''
3341
PersonNeedsToDeal = text.strip()
3442

3543
message('{} {}'.format(random.choice(DWIphrases).format(PersonNeedsToDeal), random.choice(DWImacros)))
44+
45+
@hook.command('fp','facepalm')
46+
47+
def FP(text,message):
48+
''' Expresses your frustration with another user. File located in dwi.py'''
49+
FacePalmer = text.strip()
50+
51+
message('Dammit {} {}'.format(FacePalmer, random.choice(Facepalmacros)))

plugins/halal.py

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,71 @@
3232
'Fish Makkanwala',
3333
'Szechwan'
3434
]
35+
kdish = ['gefilte fish',
36+
'matzo ball soup',
37+
'cholent',
38+
'sufganiyot',
39+
'cream cheese with lox bagel',
40+
'lamb merguez with lentils and pears',
41+
'warm apple streusel with ice cream on top',
42+
'mushroom and truffle pizza',
43+
'lemon and rosemary salad with a side of rice',
44+
'latkes with applesauce',
45+
'challah french toast',
46+
'grilled fish tacos with chili-lime dressing',
47+
'date charoset',
48+
'huevos haminados',
49+
'baba-ghanouj',
50+
'bastani with freshly baked pita',
51+
'hummus with perfectly fried falafel',
52+
'mujadrah with warm bread',
53+
'shishlik with red peppers, mushrooms, and onion',
54+
'spicy shakshouka with french bread',
55+
'hadgi badah with a tall glass of apple juice',
56+
'malawah with a large glass of milk',
57+
'sweet kugel with extra sugar on top',
58+
'hamantaschen with date and raspberry filling',
59+
'marbled halva with almonds on top',
60+
'labna with a side of chili sauce',
61+
'polow shirin with extra pomegranate',
62+
'lamb bademjan'
63+
'beef kubbeh with extra chili peppers',
64+
'beef shawarma with a side of hummus and rice',
65+
'lamb and mushroom kofta with a large coke',
66+
'cheese and spinach sambousek',
67+
'bamieh with a side of grilled chicken',
68+
'chicken tagine with saffron rice and a slice of lechuch',
69+
'kofta mishmisheya with grilled vegetables',
70+
'charoset with day old matzah',
71+
'sour cherry rugelach',
72+
'orange-scented flan with dulce de leche syrup',
73+
'brisket with potatoes and a spinach salad',
74+
'bouikos con kashkaval',
75+
'lemon-rice soup with soda crackers'
76+
]
77+
78+
3579

3680
@hook.command('halaal', 'halal', autohelp = False)
3781
def serving(text, action):
3882
'''Serves halaal dishes to some one in the channel'''
3983
diner = text.strip()
4084

4185
if diner =='':
42-
action('Has {} {} {}'.format(random.choice(quantity), random.choice(quality), random.choice(dish)))
86+
action('has {} {} {}'.format(random.choice(quantity), random.choice(quality), random.choice(dish)))
4387

4488
else:
4589
action('Serves {} {} {} {}'.format(diner, random.choice(quantity), random.choice(quality), random.choice(dish)))
4690

91+
@hook.command('kosher', autohelp=False)
92+
def kserving(text, action):
93+
94+
'''Servers a Kosher dish to some one in the channel. Part of halal.py. Made with help of snoonet user Yat'''
95+
kdiner = text.strip()
96+
if kdiner =='':
97+
action('has {} {} {}'.format(random.choice(quantity), random.choice(quality), random.choice(kdish)))
98+
else:
99+
action('Serves {} {} {} {}'.format(kdiner, random.choice(quantity), random.choice(quality), random.choice(kdish)))
47100

48101
#written by ilgnome
49102
#find me in #gonzobot

plugins/jokes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def load_jokes(bot):
2929

3030
with codecs.open(os.path.join(bot.data_dir, "wisdom.txt"), encoding="utf-8") as f:
3131
wisdom = [line.strip() for line in f.readlines() if not line.startswith("//")]
32-
32+
3333
with codecs.open(os.path.join(bot.data_dir, "book_puns.txt"), encoding="utf-8") as f:
3434
book_puns = [line.strip() for line in f.readlines() if not line.startswith("//")]
3535

plugins/karma.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def points(text, chan, db, conn):
103103
score = 0
104104
karma = ""
105105
thing = ""
106-
if text.endswith("-global"):
106+
if text.endswith("-global") or text.endswith(" global"):
107107
thing = text[:-7].strip()
108108
karma = db.execute("select score from karma where thing = :thing", {'thing': thing.lower()}).fetchall()
109109
else:
@@ -132,7 +132,7 @@ def pointstop(text, chan, db, message, conn, notice):
132132
points = defaultdict(int)
133133
items = ""
134134
out = ""
135-
if text == "global":
135+
if text == "global" or text == "-global":
136136
items = db.execute("select thing, score from karma").fetchall()
137137
out = "The top {} favorite things in all channels are: "
138138
else:
@@ -162,7 +162,7 @@ def pointsbottom(text, chan, db, message, conn, notice):
162162
points = defaultdict(int)
163163
items = ""
164164
out = ""
165-
if text == "global":
165+
if text == "global" or text == "-global":
166166
items = db.execute("select thing, score from karma").fetchall()
167167
out = "The {} most hated things in all channels are: "
168168
else:

plugins/tell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def tell_cmd(text, nick, db, notice, conn):
167167
notice("Invalid nick '{}'.".format(target))
168168
return
169169

170-
if not re.match("^[a-z0-9_|.\-\]\[]*$", target.lower()):
170+
if not re.match("^[a-z0-9_|.\-\`\]\[]*$", target.lower()):
171171
notice("Invalid nick '{}'.".format(target))
172172
return
173173

0 commit comments

Comments
 (0)