-
Notifications
You must be signed in to change notification settings - Fork 15
/
BlasBot.mrc
445 lines (402 loc) · 17.1 KB
/
BlasBot.mrc
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BLASBOT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; CREATED BY BLASMAN13 ;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; TWITCH.TV/BLASMAN13 ;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;; CORE MIRC SCRIPT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;; VERSION 1.0.0.9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
/*
This is the main script that sets commonly used variables and contains
commonly used aliases for many of the other scripts found on my GitHub
at https://github.com/Blasman/mIRC-Twitch-Scripts
When first loading this script, you will have to enter some info in input
boxes that will appear. If you change any of this info or enter it
incorrectly, you will need to re-run the setup. You can re-run the setup
by re-loading the script, or by typing /blasbot_setup in mIRC.
*/
alias blasbot_version return 1.0.0.9
menu menubar,channel,status {
BlasBot
.$style(2) Version $blasbot_version:$null
.$style(2) Created by Blasman13:$null
.Visit Twitch.TV/Blasman13:URL -n https://twitch.tv/Blasman13
.Visit GitHub:URL -n https://github.com/Blasman/mIRC-Twitch-Scripts
$chr(36) $+ $chr(36) $+ $chr(36) CLICK HERE TO DONATE $chr(36) $+ $chr(36) $+ $chr(36):URL -n https://twitch.streamlabs.com/blasman13
}
ON *:LOAD: blasbot_setup
ON *:UNLOAD: {
UNSET %CurrencyDB_path
UNSET %EditorsDB_path
UNSET %ExternalSubDB_path
UNSET %GameWispSubDB_path
UNSET %TwitchSubDB_path
UNSET %RegularsDB_path
UNSET %AnkhBot_CurrencyDB
UNSET %AnkhBot_EditorsDB
UNSET %AnkhBot_ExternalSubDB
UNSET %AnkhBot_GameWispSubDB
UNSET %AnkhBot_TwitchSubDB
UNSET %AnkhBot_RegularsDB
UNSET %streamer
UNSET %curname
UNSET %mychan
UNSET %TwitchID
UNSET %botname
}
ON *:START: {
SET %AnkhBot_CurrencyDB $sqlite_open(%CurrencyDB_path)
SET %AnkhBot_EditorsDB $sqlite_open(%EditorsDB_path)
SET %AnkhBot_ExternalSubDB $sqlite_open(%ExternalSubDB_path)
SET %AnkhBot_GameWispSubDB $sqlite_open(%GameWispSubDB_path)
SET %AnkhBot_TwitchSubDB $sqlite_open(%TwitchSubDB_path)
SET %AnkhBot_RegularsDB $sqlite_open(%RegularsDB_path)
IF (!$hget(bot)) HMAKE bot
IF (!$hget(displaynames)) {
IF ($script(hosts.mrc)) {
HMAKE displaynames
IF ($file(displaynames.htb)) HLOAD displaynames displaynames.htb
}
}
UNSET %ActiveGame
}
ON *:EXIT: IF ($hget(displaynames)) HSAVE -o displaynames displaynames.htb
ON $*:TEXT:/^!games\s(on|off)$/iS:%mychan: {
IF ($ModCheck) {
IF ($script(blackjack.mrc)) VAR %games !blackjack -
IF ($script(jackpot.classic.mrc)) VAR %games %games !jackpot -
IF ($script(jackpot.v2.mrc)) VAR %games %games !jackpot -
IF ($script(roulette.mrc)) VAR %games %games !roulette -
IF ($script(dice.mrc)) VAR %games %games !dice -
IF ($script(rps.mrc)) VAR %games %games !rps -
IF ($script(rr.mrc)) VAR %games %games !rr -
IF ($script(scramble.mrc)) VAR %games %games !scramble -
IF ($script(slots.classic.mrc)) VAR %games %games !slots -
IF ($script(slots.v2.mrc)) VAR %games %games !slots -
IF (%games) {
IF ($2 == on) {
IF ($script(blackjack.mrc)) SET %GAMES_BJ_ACTIVE On
IF ($script(jackpot.classic.mrc)) SET %GAMES_JACKPOTC_ACTIVE On
IF ($script(jackpot.v2.mrc)) SET %GAMES_JACKPOT_ACTIVE On
IF ($script(roulette.mrc)) SET %GAMES_ROUL_ACTIVE On
IF ($script(dice.mrc)) SET %GAMES_DICE_ACTIVE On
IF ($script(rps.mrc)) SET %GAMES_RPS_ACTIVE On
IF ($script(rr.mrc)) SET %GAMES_RR_ACTIVE On
IF ($script(scramble.mrc)) SET %GAMES_SCRAM_ACTIVE On
IF ($script(slots.classic.mrc)) SET %GAMES_SLOT_ACTIVE On
IF ($script(slots.v2.mrc)) SET %GAMES_SLOT_ACTIVE On
MSG $chan The following channel games are now active: $left(%games, -1)
}
ELSEIF ($2 == off) {
UNSET %GAMES_*_ACTIVE
MSG $chan The following channel games are now disabled: $left(%games, -1)
}
}
}
}
ON *:TEXT:!blasbot:%mychan: {
IF (!$hget(bot,CD_blasbot)) {
HADD -z bot CD_blasbot 6
MSG %mychan %streamer is running BlasBot Version $blasbot_version by Blasman13. You can check it out at https://github.com/Blasman/mIRC-Twitch-Scripts
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIASES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias blasbot_setup {
IF ($script(JSONForMirc.v0.2.41.mrc)) unload -rs JSONForMirc.v0.2.41.mrc
IF ($script(ankhbot.mrc)) unload -rs ankhbot.mrc
IF (($JSONVersion() == $null) || ($JSONVersion() < 1.0.3006)) {
$dialog(Needs_JSON,Needs_JSON)
url -m https://github.com/Blasman/mIRC-Twitch-Scripts#download-required-scripts
unload -rs BlasBot.mrc
halt
}
IF (!$script(mTwitch.Core.mrc)) {
$dialog(Needs_mTwitch_Core,Needs_mTwitch_Core)
url -m https://github.com/Blasman/mIRC-Twitch-Scripts#download-required-scripts
unload -rs BlasBot.mrc
halt
}
IF (!$script(mTwitch.DisplayName.mrc)) {
$dialog(Needs_mTwitch_DisplayName,Needs_mTwitch_DisplayName)
url -m https://github.com/Blasman/mIRC-Twitch-Scripts#download-required-scripts
unload -rs BlasBot.mrc
halt
}
IF (!$script(msqlite.mrc)) {
$dialog(Needs_msqlite,Needs_msqlite)
url -m https://github.com/Blasman/mIRC-Twitch-Scripts#download-required-scripts
unload -rs BlasBot.mrc
halt
}
fix_mtwitch_displayname
SET %botname $twitch_name($me)
:twitchname
$input(Please enter YOUR Twitch user name (NOT your bots):,eo,Required Input)
IF !$! { ECHO You must enter your Twitch user name! | GOTO twitchname }
ELSE {
SET %streamer $twitch_name($!)
SET %mychan $chr(35) $+ $lower($!)
SET %TwitchID $twitch_id($!)
}
:path
$input(Press "OK" if you did NOT change the default install directory of AnkhBot. Otherwise $+ $chr(44) change this to the PATH ONLY of your AnkhBot's .sqlite files.,eo,Required Input,$sysdir(profile) $+ AppData\Roaming\AnkhHeart\AnkhBotR2\Twitch\Databases\)
IF !$! { ECHO You must enter a valid path! | GOTO path }
ELSE {
IF ($right($!,1) != $chr(92)) VAR %path $! $+ $chr(92)
ELSE VAR %path $!
SET %CurrencyDB_path $qt(%path $+ CurrencyDB.sqlite)
SET %EditorsDB_path $qt(%path $+ EditorsDB.sqlite)
SET %ExternalSubDB_path $qt(%path $+ ExternalSubDB.sqlite)
SET %GameWispSubDB_path $qt(%path $+ GameWispSubDB.sqlite)
SET %TwitchSubDB_path $qt(%path $+ TwitchSubDB.sqlite)
SET %RegularsDB_path $qt(%path $+ RegularsDB.sqlite)
}
:curname
$input(Please enter the name of your channel's currency:,eo,Required Input,points)
IF !$! { ECHO You must enter a valid name! | GOTO curname }
ELSE SET %curname $!
IF (!$hget(bot)) HMAKE bot
ECHO IGNORE THE ERROR MESSAGES ABOVE! All info has been successfully entered!
}
dialog Needs_JSON {
title "IMPORTANT!"
size -1 -1 200 80
option dbu
text "You have NOT loaded the most recent version of JSONForMirc.mrc. This script will NOT work for you until you install it! This script will unload itself and setup will exit once you click Okay and your web browser will load the GitHub page. Please make sure to install all of the Required Scripts listed on the GitHub before loading BlasBot.mrc. If installing a newer version of JSONForMirc, please make sure that you unload and/or delete the old one if it has a different filename.", 1, 8 8 180 50
button "Okay", 3, 80 60 40 12, ok
}
dialog Needs_mTwitch_Core {
title "IMPORTANT!"
size -1 -1 200 80
option dbu
text "You have NOT loaded mTwitch.Core.mrc. This script will NOT work for you until you install it! This script will unload itself and setup will exit once you click Okay and your web browser will load the GitHub page. Please make sure to install all of the other Required Scripts before loading BlasBot.mrc.", 1, 8 8 180 50
button "Okay", 3, 80 60 40 12, ok
}
dialog Needs_mTwitch_DisplayName {
title "IMPORTANT!"
size -1 -1 200 80
option dbu
text "You have NOT loaded mTwitch.DisplayName.mrc. This script will NOT work for you until you install it! This script will unload itself and setup will exit once you click Okay and your web browser will load the GitHub page. Please make sure to install all of the other Required Scripts before loading BlasBot.mrc.", 1, 8 8 180 50
button "Okay", 3, 80 60 40 12, ok
}
dialog Needs_msqlite {
title "IMPORTANT!"
size -1 -1 200 80
option dbu
text "You have NOT loaded msqlite.mrc. This script will NOT work for you until you install it! This script will unload itself and setup will exit once you click Okay and your web browser will load the GitHub page. Please make sure to install all of the other Required Scripts before loading BlasBot.mrc.", 1, 8 8 180 50
button "Okay", 3, 80 60 40 12, ok
}
alias cached_name {
IF (!$hfind(displaynames,$1)) HADD displaynames $twitch_name($1)
RETURN $hfind(displaynames,$1)
}
alias twitch_name {
INC %bb
VAR %nick,%nick $IIF($1,$1,$nick)
JSONOpen -uw twitch_name $+ %bb https://api.twitch.tv/kraken/channels/ $+ %nick
JSONHttpHeader twitch_name $+ %bb Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch twitch_name $+ %bb
VAR %x $json(twitch_name $+ %bb, display_name).value
JSONClose twitch_name $+ %bb
IF ($1 == %x) RETURN %x
ELSEIF (%x != $null) RETURN %nick
}
alias twitch_id {
JSONOpen -uw twitch_id https://api.twitch.tv/kraken/channels/ $+ $IIF($1,$1,$nick)
JSONHttpHeader twitch_id Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch twitch_id
VAR %x $json(twitch_id, _id).value
JSONClose twitch_id
RETURN %x
}
alias followcheck {
INC %bb
JSONOpen -uw followcheck $+ %bb https://api.twitch.tv/kraken/users/ $+ $IIF($1,$1,$nick) $+ /follows/channels/ $+ %streamer
JSONHttpHeader followcheck $+ %bb Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch followcheck $+ %bb
VAR %x $json(followcheck $+ %bb, created_at).value
JSONClose followcheck $+ %bb
RETURN %x
}
alias wdelay {
INC %bb
IF ($calc($hget(bot,wdelay) - $ticks + 1100) > 0) {
VAR %wmsg .timer.whisper $+ %bb -m 1 $v1 $1
HADD bot wdelay $calc($hget(bot,wdelay) + 1100)
return %wmsg
}
ELSE {
HADD bot wdelay $calc($ticks + 1100)
return $1
}
}
alias ModCheck {
IF (($msgtags(mod).key == 1) || ($nick == %streamer) || ($nick isop %mychan)) RETURN $true
ELSE RETURN $false
}
alias AddPoints {
VAR %sql SELECT Points FROM CurrencyUser WHERE Name = ' $+ $1 $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_CurrencyDB, %sql)
sqlite_exec %AnkhBot_CurrencyDB UPDATE CurrencyUser SET Points = Points + $floor($2) WHERE Name = ' $+ $1 $+ ' COLLATE NOCASE
sqlite_free %request
}
alias RemovePoints {
VAR %sql SELECT Points FROM CurrencyUser WHERE Name = ' $+ $1 $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_CurrencyDB, %sql)
sqlite_exec %AnkhBot_CurrencyDB UPDATE CurrencyUser SET Points = Points - $floor($2) WHERE Name = ' $+ $1 $+ ' COLLATE NOCASE
sqlite_free %request
}
alias GetPoints {
VAR %sql SELECT Points FROM CurrencyUser WHERE Name = ' $+ $IIF($1,$1,$nick) $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_CurrencyDB, %sql)
IF ($sqlite_num_rows(%request)) {
$sqlite_fetch_row(%request, GetPoints)
VAR %x $hget(GetPoints, Points)
}
ELSE VAR %x 0
sqlite_free %request
RETURN %x
}
alias isEditor {
VAR %nick $IIF($1,$1,$nick)
IF ((%nick == %streamer) || (%nick == %botname)) RETURN $true
VAR %sql SELECT * FROM Editor WHERE user = ' $+ %nick $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_EditorsDB, %sql)
VAR %x $IIF($sqlite_num_rows(%request),$true,$false)
sqlite_free %request
RETURN %x
}
alias GetMinutes {
VAR %sql SELECT MinutesWatched FROM CurrencyUser WHERE Name = ' $+ $IIF($1,$1,$nick) $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_CurrencyDB, %sql)
IF ($sqlite_num_rows(%request)) {
$sqlite_fetch_row(%request, GetMinutes)
VAR %x $hget(GetMinutes, MinutesWatched)
}
ELSE VAR %x 0
sqlite_free %request
RETURN %x
}
alias isSub {
VAR %nick $IIF($1,$1,$nick)
IF ((%nick == %streamer) || ($isMTSub(%nick)) || ($isABSub(%nick))) RETURN $true
}
alias isMTSub IF (($IIF($1,$1,$nick) == %streamer) || ($msgtags(subscriber).key)) RETURN $true
alias isABSub {
VAR %nick $IIF($1,$1,$nick)
IF (%nick == %streamer) RETURN $true
IF ($isGWSub(%nick)) RETURN $true
IF ($isExtSub(%nick)) RETURN $true
IF ($isTwitchSub(%nick)) RETURN $true
}
alias isExtSub {
VAR %nick $IIF($1,$1,$nick)
IF (%nick == %streamer) RETURN $true
VAR %sql SELECT * FROM ExternalSub WHERE user = ' $+ %nick $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_ExternalSubDB, %sql)
VAR %x $IIF($sqlite_num_rows(%request),$true,$false)
sqlite_free %request
RETURN %x
}
alias isGWSub {
VAR %nick $IIF($1,$1,$nick)
IF (%nick == %streamer) RETURN $true
VAR %sql SELECT * FROM GameWispSub WHERE Name = ' $+ %nick $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_GameWispSubDB, %sql)
VAR %x $IIF($sqlite_num_rows(%request),$true,$false)
sqlite_free %request
RETURN %x
}
alias GWSubCount {
VAR %sql SELECT * FROM GameWispSub
VAR %request $sqlite_query(%AnkhBot_GameWispSubDB, %sql)
VAR %x $sqlite_num_rows(%request)
sqlite_free %request
RETURN %x
}
alias isTwitchSub {
VAR %nick $IIF($1,$1,$nick)
IF (%nick == %streamer) RETURN $true
VAR %sql SELECT * FROM TwitchSub WHERE Name = ' $+ %nick $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_TwitchSubDB, %sql)
VAR %x $IIF($sqlite_num_rows(%request),$true,$false)
sqlite_free %request
RETURN %x
}
alias isRegular {
VAR %nick $IIF($1,$1,$nick)
IF (%nick == %streamer) RETURN $true
VAR %sql SELECT * FROM Regular WHERE User = ' $+ %nick $+ ' COLLATE NOCASE
VAR %request $sqlite_query(%AnkhBot_RegularDB, %sql)
VAR %x $IIF($sqlite_num_rows(%request),$true,$false)
sqlite_free %request
RETURN %x
}
alias end_game {
IF (%queue) .timer.queue_run 1 1 queue_run
ELSE UNSET %ActiveGame
}
alias queue_run {
VAR %player $gettok($gettok(%queue,1,32),1,46)
VAR %game $gettok($gettok(%queue,1,32),2,46)
IF (%game == slot) VAR %bet $gettok($gettok(%queue,1,32),3,46)
SET %queue $deltok(%queue,1,32)
IF (%queue == $null) UNSET %queue
play_ [ $+ [ %game ] ] %player %bet
}
alias livecheck {
JSONOpen -uw livecheck https://api.twitch.tv/kraken/streams/ $+ $1 $+ ?nocache= $+ $ticks
JSONHttpHeader livecheck Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
JSONHttpFetch livecheck
VAR %x $IIF($json(livecheck,stream,created_at).value,$true,$false)
JSONClose livecheck
RETURN %x
}
; TwitchTime alias written by SReject and friends
alias TwitchTime {
if ($regex($1-, /^(\d\d(?:\d\d)?)-(\d\d)-(\d\d)T(\d\d)\:(\d\d)\:(\d\d)(?:(?:Z$)|(?:([+-])(\d\d)\:(\d+)))?$/i)) {
var %m = $Gettok(January February March April May June July August September October November December, $regml(2), 32), %d = $ord($base($regml(3),10,10)), %o = +0, %t
if ($regml(0) > 6) %o = $regml(7) $+ $calc($regml(8) * 3600 + $regml(9))
%t = $calc($ctime(%m %d $regml(1) $regml(4) $+ : $+ $regml(5) $+ : $+ $regml(6)) - %o)
if ($asctime(zz) !== 0 && $regex($v1, /^([+-])(\d\d)(\d+)$/)) {
%o = $regml(1) $+ $calc($regml(2) * 3600 + $regml(3))
%t = $calc(%t + %o )
}
return %t
}
}
alias GetSecs {
IF ($regex($1,\d+)) {
VAR %result
IF ($regex($1,(\d+)(s|$))) VAR %result $calc($regml(1))
IF ($regex($1,((\d+)(\.\d+)?)m)) VAR %result $calc($regml(1) * 60 + %result)
IF ($regex($1,((\d+)(\.\d+)?)h)) VAR %result $calc($regml(1) * 3600 + %result)
IF ($regex($1,((\d+)(\.\d+)?)d)) VAR %result $calc($regml(1) * 86400 + %result)
RETURN $round(%result,0)
}
}
alias Ext_Dur {
VAR %result $left($replacex($duration($1),wks,$chr(32) weeks $+ $chr(44),wk,$chr(32) week $+ $chr(44),days,$chr(32) days $+ $chr(44),day,$chr(32) day $+ $chr(44),hrs,$chr(32) hours $+ $chr(44),hr,$chr(32) hour $+ $chr(44),mins,$chr(32) minutes $+ $chr(44),min,$chr(32) minute $+ $chr(44),secs,$chr(32) seconds $+ $chr(44),sec,$chr(32) second $+ $chr(44)),-1)
IF ($numtok(%result,32) > 2) RETURN $replace(%result,$gettok(%result,$calc($numtok(%result,32) - 2),32),$replace($gettok(%result,$calc($numtok(%result,32) - 2),32),$chr(44),$chr(32) and))
ELSE RETURN %result
}
alias MakeList {
IF ($numtok($1-,32) > 1) {
VAR %list $1-
VAR %list $left($replace(%list,$gettok(%list,$calc($numtok(%list,32) - 1),32),$replace($gettok(%list,$calc($numtok(%list,32) - 1),32),$chr(44),$chr(32) and)),-1)
RETURN %list
}
ELSEIF ($1) RETURN $left($1,-1)
}
alias fix_mtwitch_displayname {
IF ($script(mTwitch.DisplayName.mrc)) {
IF ($read(mTwitch.DisplayName.mrc, nw, *if $chr(40) $+ $chr(37) $+ dnick !== $chr(36) $+ null && $chr(37) $+ dnick !=== $chr(37) $+ nick $+ $chr(41) $chr(123))) {
WRITE -l $+ $readn mTwitch.DisplayName.mrc IF $chr(40) $+ $chr(40) $+ $chr(37) $+ dnick == $chr(37) $+ nick $+ $chr(41) && $chr(40) $+ $chr(37) $+ dnick !=== $chr(37) $+ nick $+ $chr(41) $+ $chr(41) $chr(123)
RELOAD -rs mTwitch.DisplayName.mrc
ECHO -s 4mTwitch.DisplayName.mrc was successfully modified for use with AnkhBot!
}
ELSE ECHO -s 4mTwitch.DisplayName.mrc was not modified! (may have already been modified)
}
ELSE ECHO -s 4mTwitch.DisplayName.mrc not found!
}