Skip to content

Commit dcefdf3

Browse files
committed
Repair message citation
1 parent a304745 commit dcefdf3

File tree

3 files changed

+48
-5
lines changed

3 files changed

+48
-5
lines changed

cursewords.log

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
INFO:root:TwitchBot connected to #dddaaannn999 as dddaaannn999bot
2+
INFO:root:Matched message: :[email protected] JOIN #dddaaannn999
3+
:dddaaannn999bot.tmi.twitch.tv 353 dddaaannn999bot = #dddaaannn999 :dddaaannn999bot
4+
:dddaaannn999bot.tmi.twitch.tv 366 dddaaannn999bot #dddaaannn999 :End of /NAMES list
5+
6+
INFO:root:Matched message: @badge-info=;badges=broadcaster/1;client-nonce=9aedfad0bab09326f6e35a99346ee02a;color=;display-name=dddaaannn999;emotes=;flags=;id=6ecdff0b-5b0d-4d6d-b886-4fb7260f9e23;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383229726;turbo=0;user-id=30861463;user-type= :[email protected] PRIVMSG #dddaaannn999 :testing one two mojito testing
7+
8+
INFO:root:Matched message: @badge-info=;badges=broadcaster/1;client-nonce=e55fa66c51cafbcf665e69ed03bfc9c7;color=;display-name=dddaaannn999;emotes=;flags=;id=730d8552-08f2-4b13-ae5a-607bab771ce1;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383240582;turbo=0;user-id=30861463;user-type= :[email protected] PRIVMSG #dddaaannn999 :actually someone else say mojito
9+
10+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=6ad1a503a2f062414ae55a57910a8468;color=;display-name=gphxor;emotes=;flags=;id=25b7ee58-6251-4735-b611-76c40cf2ad8b;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383244398;turbo=0;user-id=138897497;user-type= :[email protected] PRIVMSG #dddaaannn999 :!clue 17a
11+
12+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=cc55753d6341c8dbd2040a2db53782bd;color=#008000;display-name=hazelnym;emotes=;flags=;id=5aed0497-7166-4d9d-98ce-463a89dfaef0;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383245437;turbo=0;user-id=56063825;user-type= :[email protected] PRIVMSG #dddaaannn999 :mojito
13+
14+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=1e53c8edbc3c4ddf8888d13b0a4b1e2a;color=;display-name=gphxor;emotes=;flags=;id=3e549084-cdb7-4274-a187-90cb4494ac8d;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383247647;turbo=0;user-id=138897497;user-type= :[email protected] PRIVMSG #dddaaannn999 :mojito
15+
16+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=edeee4ca1653add620970c3821a11ff8;color=#008000;display-name=hazelnym;emotes=;flags=;id=4e8fdea3-dd4b-48d1-96b0-f34d8062979a;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383253284;turbo=0;user-id=56063825;user-type= :[email protected] PRIVMSG #dddaaannn999 :jinx
17+
18+
INFO:root:TwitchBot connected to #dddaaannn999 as dddaaannn999bot
19+
INFO:root:Matched message: :[email protected] JOIN #dddaaannn999
20+
:dddaaannn999bot.tmi.twitch.tv 353 dddaaannn999bot = #dddaaannn999 :dddaaannn999bot
21+
:dddaaannn999bot.tmi.twitch.tv 366 dddaaannn999bot #dddaaannn999 :End of /NAMES list
22+
:tmi.twitch.tv CAP * ACK :twitch.tv/tags twitch.tv/commands
23+
24+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=1e95bb5d46c05ff0136b486b085d8ba7;color=#008000;display-name=hazelnym;emotes=;flags=;id=992172eb-4641-402f-b225-d7e6f1e7f043;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383396773;turbo=0;user-id=56063825;user-type= :[email protected] PRIVMSG #dddaaannn999 :seattle's top of my places-to-visit once that's feasible again!
25+
26+
INFO:root:Matched message: @badge-info=;badges=broadcaster/1;client-nonce=cf23d7f33da3b47698d873e9c64c2083;color=;display-name=dddaaannn999;emotes=;flags=;id=df444825-1b65-4706-ae55-89c295cba53d;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383397160;turbo=0;user-id=30861463;user-type= :[email protected] PRIVMSG #dddaaannn999 :ok shout mojito
27+
28+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=6675d59477e630106b1153f5d55af431;color=#008000;display-name=hazelnym;emotes=;flags=;id=d4dc50d6-3108-4b14-9b4c-9638b4769131;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383401033;turbo=0;user-id=56063825;user-type= :[email protected] PRIVMSG #dddaaannn999 :MOJITO
29+
30+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=3a781bd3a0148e6759446b40019bb324;color=;display-name=gphxor;emotes=;flags=;id=d6238d5d-7616-4577-bfb8-897c1b9650aa;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383407409;turbo=0;user-id=138897497;user-type= :[email protected] PRIVMSG #dddaaannn999 :Mo? Jito!
31+
32+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=ad597741e5aded582302f912b0643916;color=#008000;display-name=hazelnym;emotes=;flags=;id=02ded39d-3ffe-4a90-8790-b0a0f46a5336;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383410367;turbo=0;user-id=56063825;user-type= :[email protected] PRIVMSG #dddaaannn999 :if i say it three times in a mirror, will one apear?
33+
34+
INFO:root:Matched message: @badge-info=;badges=premium/1;client-nonce=af328848d0b5dab81c12f4499948db09;color=#00006B;display-name=Elipsis;emotes=;flags=;id=4e5f16a3-d95d-4d1c-aff7-a03cec5c261c;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383412662;turbo=0;user-id=50033115;user-type= :[email protected] PRIVMSG #dddaaannn999 :NOJITO
35+
36+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=f6ffd611d459bbc6e6c87e65ec19c9b8;color=#008000;display-name=hazelnym;emotes=;flags=;id=f7ca7500-7f86-450b-b0b8-9dc3cd98230c;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383415071;turbo=0;user-id=56063825;user-type= :[email protected] PRIVMSG #dddaaannn999 :*appear
37+
38+
INFO:root:Matched message: @badge-info=;badges=;client-nonce=87ea660311f62c1dde7179b3e2a39582;color=#008000;display-name=hazelnym;emotes=;flags=;id=85bfe33e-e37f-4d83-a683-7c01357ca445;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383416729;turbo=0;user-id=56063825;user-type= :[email protected] PRIVMSG #dddaaannn999 :mojito mojito mojito
39+
40+
INFO:root:Matched message: @badge-info=;badges=premium/1;client-nonce=843d865092a4706367c654f155826fa0;color=#00006B;display-name=Elipsis;emotes=;flags=;id=3004f3c8-199b-4f95-8888-892fffdcb7c2;mod=0;room-id=30861463;subscriber=0;tmi-sent-ts=1619383419284;turbo=0;user-id=50033115;user-type= :[email protected] PRIVMSG #dddaaannn999 :(refusal to shout mojito)
41+

cursewords.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ log_to_file = false
1111

1212
[twitch]
1313
# Set this to "true" to enable Twitch support.
14-
enable = false
14+
enable = true
1515

1616
# Viewers can guess words in the puzzle and cause things to happen.
1717
enable_guessing = true
@@ -20,10 +20,10 @@ enable_guessing = true
2020
enable_clue = true
2121

2222
# The Twitch account that Cursewords should use to connect.
23-
nickname = "..."
23+
nickname = "dddaaannn999bot"
2424

2525
# The Twitch channel that Cursewords should join.
26-
channel = "..."
26+
channel = "dddaaannn999"
2727

2828
# The OAuth token is a temporary password that Cursewords will use to connect
2929
# to Twitch. This is *not* the Twitch password for the account.
@@ -38,7 +38,7 @@ channel = "..."
3838
# To revoke access for this token, sign in to Twitch.tv with the bot account,
3939
# go to Settings, then select the Connections tab. Locate the "Twitch
4040
# Developer" connection then click Disconnect.
41-
oauth_token = "oauth:..."
41+
oauth_token = "oauth:znw6owgbyx27dit5o7gsmtf0mm9bbe"
4242

4343
# If enable_clue is true, the number of seconds a given user must wait between
4444
# clue requests.

cursewords/twitch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def __init__(
5252

5353
self.message_handlers = [
5454
(re.compile(r'PING (.*)\r\n'), self.handle_ping),
55-
(re.compile(r'.* PRIVMSG #(\S+) :(.*)\r\n'), self.handle_chat_msg),
55+
(re.compile(r'.*:(\w+)!\S* PRIVMSG #\S+ :(.*)\r\n'),
56+
self.handle_chat_msg),
5657
(re.compile(r'.* WHISPER (\S+) :(.*)\r\n'), self.handle_whisper),
5758
(re.compile(r'.* JOIN #(.*)\r\n'), self.handle_join),
5859
(re.compile(r'.* NOTICE #(\S*) (.*)\r\n'), self.handle_notice)
@@ -121,6 +122,7 @@ async def event_loop(self):
121122
for (pat, func) in self.message_handlers:
122123
m = pat.search(resp)
123124
if m:
125+
logging.info('Matched message: ' + resp)
124126
await func(*m.groups())
125127
except asyncio.exceptions.TimeoutError:
126128
pass

0 commit comments

Comments
 (0)