Skip to content

Commit e1a0288

Browse files
committed
Move cheers to cheer.py
1 parent bf07869 commit e1a0288

2 files changed

Lines changed: 29 additions & 29 deletions

File tree

plugins/badwords.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@
55
from cloudbot import hook
66

77

8-
cheers = [
9-
"FUCK YEAH!",
10-
"HOORAH!",
11-
"HURRAY!",
12-
"OORAH!",
13-
"YAY!",
14-
"*\o/* CHEERS! *\o/*",
15-
"HOOHAH!",
16-
"HOOYAH!",
17-
"HUAH!",
18-
"♪ ┏(°.°)┛ ┗(°.°)┓ ♬"
19-
]
208
db_ready = []
219

2210

@@ -134,20 +122,3 @@ def test_badwords(event, db, conn, message):
134122
conn.send(out)
135123
else:
136124
pass
137-
138-
139-
140-
141-
cheer_re = re.compile('\\\\o\/', re.IGNORECASE)
142-
143-
144-
@hook.regex(cheer_re)
145-
def cheer(match, conn, nick, chan, message):
146-
"""
147-
:type match: re.__Match
148-
:type conn: cloudbot.client.Client
149-
:type chan: str
150-
"""
151-
if chan not in ["#yogscast"]:
152-
shit = random.choice(cheers)
153-
message(shit, chan)

plugins/cheer.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import random
2+
import re
3+
4+
from cloudbot import hook
5+
6+
cheers = [
7+
"FUCK YEAH!",
8+
"HOORAH!",
9+
"HURRAY!",
10+
"OORAH!",
11+
"YAY!",
12+
"*\o/* CHEERS! *\o/*",
13+
"HOOHAH!",
14+
"HOOYAH!",
15+
"HUAH!",
16+
"♪ ┏(°.°)┛ ┗(°.°)┓ ♬",
17+
]
18+
19+
cheer_re = re.compile(r'\\o/', re.IGNORECASE)
20+
21+
22+
@hook.regex(cheer_re)
23+
def cheer(chan, message):
24+
"""
25+
:type chan: str
26+
"""
27+
if chan not in ["#yogscast"]:
28+
shit = random.choice(cheers)
29+
message(shit, chan)

0 commit comments

Comments
 (0)