forked from skennedysocal/WoW_Hardcore
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathSlashCommands.lua
More file actions
709 lines (602 loc) · 21.2 KB
/
SlashCommands.lua
File metadata and controls
709 lines (602 loc) · 21.2 KB
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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
local function applyAppealCode(args)
local function fletcher16VerCode(data)
local sum1 = 0
local sum2 = 0
for index = 1, #data do
sum1 = (sum1 + string.byte(string.sub(data, index, index))) % 255
sum2 = (sum2 + sum1) % 255
end
return bit.bor(bit.lshift(sum2, 8), sum1)
end
local ver_code = nil
local cmd = UnitName("player")
for substring in args:gmatch("%S+") do
if ver_code == nil then
ver_code = substring
else
cmd = substring
end
end
if ver_code == nil then
Hardcore:Print("Wrong syntax: Missing first argument")
return
end
if Hardcore_Character["used_appeal_codes"] and Hardcore_Character["used_appeal_codes"][ver_code] then
Hardcore:Print("You have already used this appeal code.")
return
end
if cmd == nil then
Hardcore:Print("Wrong syntax: Missing Second argument")
return
end
if tostring(ver_code) ~= tostring(fletcher16VerCode(UnitName("player") .. cmd)) then
Hardcore:Print("Incorrect verification code")
return
end
local load_func = loadstring(ascii85Decode(cmd))
if load_func == nil then
Hardcore:Print("Appeal code was malformed. Double check with your moderator that you have the correct code.")
return
end
local function OnOkayClick()
load_func()
if Hardcore_Character["used_appeal_codes"] == nil then
Hardcore_Character["used_appeal_codes"] = {}
end
Hardcore_Character["used_appeal_codes"][ver_code] = 1
Hardcore:Print("Inputed appeal. /reload to save when convenient.")
StaticPopup_Hide("ConfirmAppealCode")
ReloadUI()
end
local function OnCancelClick()
Hardcore:Print("Appeal code cancelled.")
StaticPopup_Hide("ConfirmAppealCode")
end
local text =
"Are you sure that you want to apply this appeal code. Only apply appeal codes you have received from a moderator or dev. Hitting OKAY will apply and reload to save appeal."
StaticPopupDialogs["ConfirmAppealCode"] = {
text = text,
button1 = OKAY,
button2 = CANCEL,
OnAccept = OnOkayClick,
OnCancel = OnCancelClick,
timeout = 0,
whileDead = true,
hideOnEscape = true,
}
local dialog = StaticPopup_Show("ConfirmAppealCode")
end
local function extract_arguments(args)
local first = nil
local second = nil
for substring in args:gmatch("%S+") do
if first == nil then
first = substring
else
second = substring
end
end
if first == nil then
Hardcore:Print("Wrong syntax: Missing first argument")
return first, second
end
if second == nil then
Hardcore:Print("Wrong syntax: Missing second argument")
return first, second
end
-- return both first and second arguments
return first, second
end
local function short_crypto_hash(str)
-- Hardcore:Debug("short_crypto_hash:", str)
local hash = 5381
for i = 1, #str do
hash = hash * 33 + str:byte(i)
Hardcore:Debug("sch: ", i, str:byte(i), hash)
end
-- Hardcore:Debug("short_crypto_hash:", "DONE", hash)
return hash
end
local function get_short_code(suffix)
-- print debug information using Hardcore:Debug 2.2944241830353e+14
-- Hardcore:Debug("get_short_code:", suffix)
local str = UnitName("player"):sub(1, 5) .. UnitLevel("player") .. tostring(suffix)
-- Hardcore:Debug("get_short_code:", str)
return short_crypto_hash(str)
end
local function long_cryto_hash(str)
local a = 0
local b = 0
local dictionary = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 /:"
for i = 1, #str do
x, y = string.find(dictionary, str:sub(i, i), 1, true)
if x == nil then
x = #dictionary
end
for i = 1, 17 do
a = (a * -6 + b + 0x74FA - x) % 4096
b = (math.floor(b / 3) + a + 0x81BE - x) % 4096
end
end
return (a * 4096) + b
end
local function get_long_code(date_str)
local str = UnitName("player") .. UnitLevel("player") .. date_str
return long_cryto_hash(str)
end
local function SlashCmd_Deprecated()
Hardcore:Print("This command is deprecated.")
end
local function SlashCmd_AppealAchievementCode(args)
local code = nil
local achievement_id = nil
code, achievement_id = extract_arguments(args)
-- code and achievement_id are each either string or nil at this point
-- reject nil cases
if code == nil or achievement_id == nil then
-- code or achievement number is missing, bail
Hardcore:Print("Wrong syntax: Missing code or achievement id")
return
end
-- code and achievement_id are both strings at this point
local calculated_code = get_short_code(achievement_id) -- number
local code_as_number = tonumber(code) -- number
-- Hardcore:Debug("Achievement: Given code " .. code .. ", which as a number is " .. code_as_number)
---@diagnostic disable-next-line: undefined-field
if _G.achievements[_G.id_a[achievement_id]] == nil then
-- achievement id is invalid, bail
Hardcore:Print("Wrong syntax: Unknown achievement id: " .. achievement_id)
return
end
local achievement = _G.achievements[_G.id_a[achievement_id]]
-- Hardcore:Debug("FOO calculated_code: " .. calculated_code .. " given " .. code_as_number)
if calculated_code ~= code_as_number then
-- code is incorrect, bail
Hardcore:Print("Incorrect code. Double-check with your moderator/technician: " .. code_as_number)
-- Hardcore:Debug("Expected:" .. calculated_code)
return
end
for i, v in ipairs(Hardcore_Character.achievements) do
if v == _G.id_a[achievement_id] then
Hardcore:Print("This achievement is already active: " .. achievement.name)
return
end
end
local function OnOkayClick()
table.insert(Hardcore_Character.achievements, achievement.name)
achievement:Register(Hardcore:GetFailFunction(), Hardcore_Character)
Hardcore:Print("Achievement appealed: " .. achievement.name)
Hardcore:Print("Please /reload immediately to save your data.")
-- TODO: Add appeal to database
StaticPopup_Hide("ConfirmAchievementAppeal")
end
local function OnCancelClick()
Hardcore:Print("Achievement appeal cancelled - Opting out of: " .. achievement.name)
StaticPopup_Hide("ConfirmAchievementAppeal")
end
local text = "You have requested to appeal the achievement '" .. achievement.name .. "'."
if achievement_id == "47" then -- Insane in the Membrane
text = text .. " This achievement will flag you for PvP, and you may be unappealably killed."
end
text = text .. " Do you want to proceed?"
StaticPopupDialogs["ConfirmAchievementAppeal"] = {
text = text,
button1 = OKAY,
button2 = CANCEL,
OnAccept = OnOkayClick,
OnCancel = OnCancelClick,
timeout = 0,
whileDead = true,
hideOnEscape = true,
}
local dialog = StaticPopup_Show("ConfirmAchievementAppeal")
end
local function SlashCmd_AppealPassiveAchievementCode(args)
local code = nil
local achievement_id = nil
code, achievement_id = extract_arguments(args)
-- code and achievement_id are each either string or nil at this point
-- reject nil cases
if code == nil or achievement_id == nil then
-- code or achievement number is missing, bail
Hardcore:Print("Wrong syntax: Missing code or achievement id")
return
end
-- code and achievement_id are both strings at this point
local calculated_code = get_short_code(achievement_id) -- number
local code_as_number = tonumber(code) -- number
---@diagnostic disable-next-line: undefined-field
if _G.passive_achievements[_G.id_pa[achievement_id]] == nil then
-- achievement id is invalid, bail
Hardcore:Print("Wrong syntax: Unknown passive achievement id: " .. achievement_id)
return
end
local achievement = _G.passive_achievements[_G.id_pa[achievement_id]]
-- Hardcore:Debug("BAR calculated_code: " .. calculated_code .. " given " .. code_as_number)
if calculated_code ~= code_as_number then
-- code is incorrect, bail
Hardcore:Print("Incorrect code. Double-check with your moderator/technician: " .. code_as_number)
Hardcore:Debug("Expected:" .. calculated_code)
return
end
for i, v in ipairs(Hardcore_Character.passive_achievements) do
if v == _G.id_pa[achievement_id] then
Hardcore:Print("This achievement is already active: " .. achievement.name)
return
end
end
table.insert(Hardcore_Character.passive_achievements, achievement.name)
Hardcore:Print("Achievement appealed: " .. achievement.name)
Hardcore:Print("Please /reload immediately to save your data.")
-- TODO: Add appeal to database
end
local function SlashCmd_AppealTradePartners(args)
local code = nil
code, _ = extract_arguments(args)
-- code is either a string or nil at this point, and we do not care about the second arg.
-- reject nil case
if code == nil then
-- code is missing, bail
Hardcore:Print("Wrong syntax: Missing code")
return
end
-- code is a string at this point
-- -1 is used to represent 'field not used' in the short code
local calculated_code = get_short_code("-1") -- number
local code_as_number = tonumber(code) -- number
-- Hardcore:Debug("Trade Partner: Given code " .. code .. ", which as a number is " .. code_as_number)
-- Hardcore:Debug("calculated_code: " .. calculated_code)
if calculated_code ~= code_as_number then
-- code is incorrect, bail
Hardcore:Print("Incorrect code. Double-check with your moderator/technician: " .. code_as_number)
-- Hardcore:Debug("Expected:" .. calculated_code)
return
end
Hardcore_Character.trade_partners = {}
Hardcore:Print("Appealed Trade partners")
Hardcore:Print("Please /reload immediately to save your data.")
-- TODO: Add appeal to database
end
local function SlashCmd_AppealDuoTrio(args)
local code = nil
code, _ = extract_arguments(args)
-- reject nil case
if code == nil then
-- code is missing, bail
Hardcore:Print("Wrong syntax: Missing code")
return
end
-- code is a string at this point
-- -1 is used to represent 'field not used' in the short code
local calculated_code = get_short_code("-1") -- number
local code_as_number = tonumber(code) -- number
-- Hardcore:Debug("Duo/Trio Appeal: Given code " .. code .. ", which as a number is " .. code_as_number)
-- Hardcore:Debug("calculated_code: " .. calculated_code)
if calculated_code ~= code_as_number then
-- code is incorrect, bail
Hardcore:Print("Incorrect code. Double-check with your moderator/technician: " .. code_as_number)
-- Hardcore:Debug("Expected:" .. calculated_code)
return
end
if Hardcore_Character.party_mode == "Failed Duo" then
Hardcore_Character.party_mode = "Duo"
Hardcore:Print("Appealed Duo status")
Hardcore:Print("Please /reload immediately to save your data.")
-- TODO: Add appeal to database
elseif Hardcore_Character.party_mode == "Failed Trio" then
Hardcore_Character.party_mode = "Trio"
Hardcore:Print("Appealed Trio status")
Hardcore:Print("Please /reload immediately to save your data.")
-- TODO: Add appeal to database
else
Hardcore:Print("You are not in a failed duo or trio.")
end
end
local function SlashCmd_AppealDuoPartner(args)
local code = nil
local partner = nil
code, partner = extract_arguments(args)
-- code and partner are each either string or nil at this point
-- reject nil cases
if code == nil or partner == nil then
-- code or partner is missing, bail
Hardcore:Print("Wrong syntax: Missing code or partner")
return
end
-- code and partner are both strings at this point
local calculated_code = get_short_code(partner:sub(1, 3)) -- number
local code_as_number = tonumber(code) -- number
-- Hardcore:Debug("DuoPartner: Given code " .. code .. ", which as a number is " .. code_as_number)
-- Hardcore:Debug("calculated_code: " .. calculated_code)
if calculated_code ~= code_as_number then
-- code is incorrect, bail
Hardcore:Print("Incorrect code. Double-check with your moderator/technician: " .. code_as_number)
-- Hardcore:Debug("Expected:" .. calculated_code)
return
end
if Hardcore_Character.party_mode == "Solo" then
Hardcore_Character.party_mode = "Duo"
Hardcore:Print("Appealed Duo status")
end
Hardcore_Character.team[1] = partner
Hardcore:Print("Appealed Duo partner to: " .. partner)
Hardcore:Print("Please /reload immediately to save your data.")
end
local function SlashCmd_AppealTrioPartner(args)
local code = nil
local partner = nil
code, partner = extract_arguments(args)
-- code and partner are each either string or nil at this point
-- reject nil cases
if code == nil or partner == nil then
-- code or partner is missing, bail
Hardcore:Print("Wrong syntax: Missing code or partner")
return
end
-- code and partner are both strings at this point
local calculated_code = get_short_code(partner:sub(1, 3)) -- number
local code_as_number = tonumber(code) -- number
-- Hardcore:Debug("TrioPartner: Given code " .. code .. ", which as a number is " .. code_as_number)
-- Hardcore:Debug("calculated_code: " .. calculated_code)
if calculated_code ~= code_as_number then
-- code is incorrect, bail
Hardcore:Print("Incorrect code. Double-check with your moderator/technician: " .. code_as_number)
-- Hardcore:Debug("Expected:" .. calculated_code)
return
end
if Hardcore_Character.party_mode == "Duo" then
Hardcore_Character.party_mode = "Trio"
Hardcore:Print("Appealed Trio status")
end
Hardcore_Character.team[2] = partner
Hardcore:Print("Appealed Trio partner to: " .. partner)
Hardcore:Print("Please /reload immediately to save your data.")
end
local function SlashCmd_SetHCTag(args)
local tag = nil
tag, _ = extract_arguments(args)
-- reject nil case
if tag == nil then
-- tag is missing, bail
Hardcore:Print("Wrong syntax: Missing tag")
return
end
-- tag is a string at this point
Hardcore_Character.hardcore_player_name = tag
Hardcore:Print("Set HC Tag to " .. tag .. ". Reload as soon as it is convenient to save.")
end
local function SlashCmd_ShowDeaths(args)
-- DEBUG CODE:
-- Allow the player to see the date of deaths, so they may be appealed
-- This is a debug function, and should be removed before release
local usage = "Usage: /hc ShowDeaths"
-- iterate through Hardcore_Character.deaths and print the date of each death
Hardcore:Print("Deaths:")
for i, v in ipairs(Hardcore_Character.deaths) do
Hardcore:Print(i .. ': "' .. v.player_dead_trigger .. '"')
end
end
local function SlashCmd_ShowAppeals(args)
-- DEBUG CODE:
-- Allow the player to see the appeal data
local usage = "Usage: /hc ShowAppeals"
-- iterate through Hardcore_Character.deaths and print the date of each death
Hardcore:Print("Appeals:")
for i, v in ipairs(Hardcore_Character.appeals) do
Hardcore:Print(i) -- entry
for j, w in pairs(v) do
Hardcore:Print(' "' .. j .. '": "' .. w .. '"')
end
end
end
local function SlashCmd_AppealDeath(args)
local usage = 'Usage: /hc AppealDeath <code> "date"'
local code = nil
local quoted_args = {}
-- Check and retrieve code
for substring in args:gmatch("%S+") do
if code == nil then
code = substring
end
end
-- Retrieve arguments in quotes, chuck away the code and command and space between
for arg in args:gmatch('[^"]+') do
table.insert(quoted_args, arg)
end
table.remove(quoted_args, 1) -- Remove the code
-- reject nil case
if code == nil then
Hardcore:Print("Wrong syntax: Missing code")
Hardcore:Print(usage)
return
end
if #quoted_args < 1 then
Hardcore:Print("Wrong syntax: supply date string in quotes")
Hardcore:Print(usage)
return
end
-- Look for the death with matching date
local death_date = quoted_args[1]
local death_found = false
local index = 0
for i, v in ipairs(Hardcore_Character.deaths) do
if Hardcore_Character.deaths[i].player_dead_trigger == death_date then
death_found = true
break
end
end
if death_found == false then
Hardcore:Print("Death on " .. quoted_args[1] .. " not found!")
return
end
local calculated_code = get_long_code(death_date)
local code_as_number = tonumber(code)
-- Hardcore:Debug("Death: Given code " .. code .. ", which as a number is " .. code_as_number)
-- Hardcore:Debug("calculated_code: " .. calculated_code)
if calculated_code ~= code_as_number then
-- code is incorrect, bail
Hardcore:Print("Incorrect code. Double-check with your moderator/technician: " .. code_as_number)
-- Hardcore:Debug("Expected:" .. calculated_code)
return
end
-- Check if the appeal already exists in the table
if Hardcore_Character.appeals then
for i, v in ipairs(Hardcore_Character.appeals) do
if Hardcore_Character.appeals[i].death == death_date then
Hardcore:Print("Appeal already exists for " .. death_date)
return
end
end
end
-- Appeal the death
Hardcore:Print("Appealed death on " .. death_date)
if not Hardcore_Character.appeals then
Hardcore_Character.appeals = {}
end
table.insert(Hardcore_Character.appeals, { ["death"] = death_date })
end
local function SlashHandler(msg, editbox)
local _, _, cmd, args = string.find(msg, "%s?(%w+)%s?(.*)")
if cmd == "levels" then
Hardcore:Levels()
elseif cmd == "alllevels" then
Hardcore:Levels(true)
elseif cmd == "show" then
if Hardcore_Settings.use_alternative_menu then
Hardcore_Frame:Show()
else
ShowMainMenu(Hardcore_Character, Hardcore_Settings, Hardcore.DKConvert)
end
elseif cmd == "hide" then
-- they can click the hide button, dont really need a command for this
Hardcore_Frame:Hide()
elseif cmd == "debug" then
local debug = Hardcore:ToggleDebug()
Hardcore:Print("Debugging set to " .. tostring(debug))
elseif cmd == "alerts" then
Hardcore_Toggle_Alerts()
if Hardcore_Settings.notify then
Hardcore:Print("Alerts enabled.")
else
Hardcore:Print("Alerts disabled.")
end
elseif cmd == "monitor" then
Hardcore_Settings.monitor = not Hardcore_Settings.monitor
if Hardcore_Settings.monitor then
Hardcore:Print("Monitoring malicious users enabled.")
else
Hardcore:Print("Monitoring malicious users disabled.")
end
elseif cmd == "quitachievement" then
local achievement_to_quit = ""
for substring in args:gmatch("%S+") do
achievement_to_quit = substring
end
---@diagnostic disable-next-line: undefined-field
if _G.achievements ~= nil and _G.achievements[achievement_to_quit] ~= nil then
for i, achievement in ipairs(Hardcore_Character.achievements) do
if achievement == achievement_to_quit then
Hardcore:Print("You are no longer tracking: " .. achievement)
Hardcore:GetFailFunction().Fail(achievement)
return
end
end
end
elseif cmd == "sharedeathlogdata" then
local target = nil
for substring in args:gmatch("%S+") do
target = substring
end
---@diagnostic disable-next-line: undefined-field
if target == nil then
Hardcore:Print("Did not start sharing; Provide target player name.")
return
end
Hardcore:Print("Sharing deathlog data with " .. target .. ". /reload if you want to stop.")
Hardcore:initSendSharedDLMsg(target)
elseif cmd == "receivedeathlogdata" then
HardcoreDeathlog_beginReceiveSharedMsg()
elseif cmd == "renouncepassiveachievement" then
local achievement_to_quit = ""
for substring in args:gmatch("%S+") do
achievement_to_quit = substring
end
---@diagnostic disable-next-line: undefined-field
if _G.passive_achievements ~= nil and _G.passive_achievements[achievement_to_quit] ~= nil then
for i, achievement in ipairs(Hardcore_Character.passive_achievements) do
if achievement == achievement_to_quit then
Hardcore:Print("You have renounced: " .. achievement)
table.remove(Hardcore_Character.passive_achievements, i)
return
end
end
end
Hardcore:Print("You cannot renounce a passive achievement that you did not complete.")
elseif cmd == "dk" then
-- sacrifice your current lvl 55 char to allow for making DK
local dk_convert_option = ""
for substring in args:gmatch("%S+") do
dk_convert_option = substring
end
Hardcore:DKConvert(dk_convert_option)
elseif cmd == "griefalert" then
local grief_alert_option = ""
for substring in args:gmatch("%S+") do
grief_alert_option = substring
end
Hardcore:SetGriefAlertCondition(grief_alert_option)
elseif cmd == "pronoun" then
local pronoun_option = ""
for substring in args:gmatch("%S+") do
pronoun_option = substring
end
Hardcore:SetPronoun(pronoun_option)
elseif cmd == "gpronoun" then
local gpronoun_option = ""
for substring in args:gmatch("%S+") do
gpronoun_option = substring
end
Hardcore:SetGlobalPronoun(gpronoun_option)
-- appeal slash commands
elseif cmd == "AppealAchievementCode" then
SlashCmd_AppealAchievementCode(args)
elseif cmd == "AppealPassiveAchievementCode" then
SlashCmd_AppealPassiveAchievementCode(args)
elseif cmd == "AppealDungeonCode" then
DungeonTrackerHandleAppealCode(args)
elseif cmd == "AppealTradePartners" then
SlashCmd_AppealTradePartners(args)
elseif cmd == "AppealDuoTrio" then
SlashCmd_AppealDuoTrio(args)
elseif cmd == "AppealDuoPartner" then
SlashCmd_AppealDuoPartner(args)
elseif cmd == "AppealTrioPartner" then
SlashCmd_AppealTrioPartner(args)
elseif cmd == "AppealDeath" then
SlashCmd_AppealDeath(args)
elseif cmd == "setHCTag" then
SlashCmd_SetHCTag(args)
elseif cmd == "Survey" then
SurveyHandleCommand(args)
elseif cmd == "AppealCode" then
applyAppealCode(args)
-- DEBUG
elseif cmd == "ShowDeaths" then
SlashCmd_ShowDeaths(args)
elseif cmd == "ShowAppeals" then
SlashCmd_ShowAppeals(args)
-- DEPRECATED
elseif cmd == "ExpectAchievementAppeal" then
SlashCmd_Deprecated()
elseif cmd == "AppealAchievement" then
SlashCmd_Deprecated()
elseif cmd == "SetRank" then
SlashCmd_Deprecated()
else
-- If not handled above, display some sort of help message
Hardcore:Print("|cff00ff00Syntax:|r/hardcore [command] [options]")
Hardcore:Print("|cff00ff00Commands:|r show hide levels alllevels alerts monitor griefalert dk")
end
end
SLASH_HARDCORE1, SLASH_HARDCORE2 = "/hardcore", "/hc"
SlashCmdList["HARDCORE"] = SlashHandler