This repository has been archived by the owner on Apr 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
admin.dm
5030 lines (4473 loc) · 205 KB
/
admin.dm
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
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/////////////////////
//CONTENTS
//Global Vars and procs
//Topic() - A giant fuck tonne of admin options.
//Admin panels
//Admin procs
//
#define INCLUDE_ANTAGS 1
#define STRIP_ANTAG 1
var/global/noir = 0
////////////////////////////////
/proc/message_admins(var/text, var/asay = 0, var/irc = 0)
var/rendered = "<span class=\"admin\"><span class=\"prefix\">[irc ? "DISCORD:" : "ADMIN LOG:"]</span> <span class=\"message\">[text]</span></span>"
for (var/client/C in clients)
if(!C.holder)
continue
if (!asay && rank_to_level(C.holder.rank) < LEVEL_MOD) // No confidential info for goat farts (Convair880).
continue
if (C.player_mode)
if (asay && C.player_mode_asay)
boutput(C, replacetext(rendered, "%admin_ref%", "\ref[C.holder]"))
else
continue
else
boutput(C, replacetext(rendered, "%admin_ref%", "\ref[C.holder]")) //this doesnt fail if the placeholder doesnt exist ok dont worry
/proc/message_coders(var/text) //Shamelessly adapted from message_admins
var/rendered = "<span class=\"admin\"><span class=\"prefix\">CODER LOG:</span> <span class=\"message\">[text]</span></span>"
for (var/client/C)
if (C.mob && C.holder && rank_to_level(C.holder.rank) >= LEVEL_CODER) //This is for edge cases where a coder needs a goddamn notification when it happens
boutput(C.mob, replacetext(rendered, "%admin_ref%", "\ref[C.holder]"))
/proc/message_coders_vardbg(var/text, var/datum/d)
var/rendered
for (var/client/C)
if (C.mob && C.holder && rank_to_level(C.holder.rank) >= LEVEL_CODER)
var/dbg_html = C.debug_variable("", d, 0)
rendered = "<span class=\"admin\"><span class=\"prefix\">CODER LOG:</span> <span class=\"message\">[text]</span>[dbg_html]</span>"
boutput(C.mob, replacetext(rendered, "%admin_ref%", "\ref[C.holder]"))
/proc/message_attack(var/text) //Sends a message to folks when an attack goes down
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ATTACK LOG:</span> <span class=\"message\">[text]</span></span>"
for (var/client/C)
if (C.mob && C.holder && rank_to_level(C.holder.rank) >= LEVEL_MOD && C.holder.attacktoggle && !C.player_mode)
boutput(C.mob, replacetext(rendered, "%admin_ref%", "\ref[C.holder]"))
/proc/rank_to_level(var/rank)
var/level = 0
switch(rank)
if("Host")
level = LEVEL_HOST
if("Coder")
level = LEVEL_CODER
if("Administrator")
level = LEVEL_ADMIN
if("Primary Administrator")
level = LEVEL_PA
if("Intermediate Administrator")
level = LEVEL_IA
if("Secondary Administrator")
level = LEVEL_SA
if("Moderator")
level = LEVEL_MOD
if("Goat Fart", "Ayn Rand's Armpit")
level = LEVEL_BABBY
return level
/proc/level_to_rank(var/level)
var/rank = "ERROR"
switch(level)
if(LEVEL_HOST)
rank = "Host"
if(LEVEL_CODER)
rank = "Coder"
if(LEVEL_ADMIN)
rank = "Administrator"
if(LEVEL_PA)
rank = "Primary Administrator"
if(LEVEL_IA)
rank = "Intermediate Administrator"
if(LEVEL_SA)
rank = "Secondary Administrator"
if(LEVEL_MOD)
rank = "Moderator"
if(LEVEL_BABBY)
rank = "Goat Fart or Ayn Rand's Armpit"
return rank
/datum/admins/Topic(href, href_list)
..()
if (src.level < 0)
alert("UM, EXCUSE ME?? YOU AREN'T AN ADMIN, GET DOWN FROM THERE!")
usr << csound("sound/voice/farts/poo2.ogg")
return
if (usr.client != src.owner)
message_admins("<span class='internal'>[key_name(usr)] has attempted to override the admin panel!</span>")
logTheThing("admin", usr, null, "tried to use the admin panel without authorization.")
logTheThing("diary", usr, null, "tried to use the admin panel without authorization.", "admin")
return
var/client/targetClient = null
//Wires bad hack to update the player options menu on click, part 1
//Also I guess it has sort of expanded now to correctly pick targets
if (href_list["targetckey"])
var/targetCkey = href_list["targetckey"]
for (var/mob/M in mobs) //Find the mob ref for that nerd
if (M.ckey == targetCkey)
href_list["target"] = "\ref[M]"
targetClient = M.client
break
else if (href_list["targetmob"])// they're logged out or an npc, but we still want to mess with their mob
href_list["target"] = href_list["targetmob"]
var/originWindow
// var/adminCkey = usr.client.ckey
var/client/adminClient = usr.client
if (href_list["origin"])
originWindow = href_list["origin"]
if (!href_list["action"])
//alert("You must define an action! Yell at Wire if you see this.")
return
switch(href_list["action"])
if ("ah_mute")//gguhHUhguHUGH
if (src.level >= LEVEL_PA)
var/client/C = locate(href_list["target"])
if(istype(C))
C.cloud_put("adminhelp_banner", usr.client.key)
src.show_chatbans(C)
if ("ah_unmute")//guHGUHGUGHGUHG
if (src.level >= LEVEL_PA)
var/client/C = locate(href_list["target"])
if(istype(C))
C.cloud_put("adminhelp_banner", "")
src.show_chatbans(C)
if ("mh_mute")//AHDUASHDUHWUDHWDUHWDUWDH
if (src.level >= LEVEL_PA)
var/client/C = locate(href_list["target"])
if(istype(C))
C.cloud_put("mentorhelp_banner", usr.client.key)
src.show_chatbans(C)
if ("mh_unmute")//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
if (src.level >= LEVEL_PA)
var/client/C = locate(href_list["target"])
if(istype(C))
C.cloud_put("mentorhelp_banner", "")
src.show_chatbans(C)
if ("load_admin_prefs")
if (src.level >= LEVEL_MOD)
src.load_admin_prefs()
src.show_pref_window(usr)
if ("save_admin_prefs")
if (src.level >= LEVEL_MOD)
src.save_admin_prefs()
if ("refresh_admin_prefs")
if (src.level >= LEVEL_MOD)
src.show_pref_window(usr)
if ("toggle_extra_verbs")
if (src.level >= LEVEL_CODER)
usr.client.toggle_extra_verbs()
src.show_pref_window(usr)
if ("toggle_popup_verbs")
if (src.level >= LEVEL_MOD)
usr.client.toggle_popup_verbs()
src.show_pref_window(usr)
if ("toggle_server_toggles_tab")
if (src.level >= LEVEL_MOD)
usr.client.toggle_server_toggles_tab()
src.show_pref_window(usr)
if ("toggle_atom_verbs")
if (src.level >= LEVEL_PA)
usr.client.toggle_atom_verbs()
src.show_pref_window(usr)
if ("toggle_attack_messages")
if (src.level >= LEVEL_MOD)
usr.client.toggle_attack_messages()
src.show_pref_window(usr)
if ("toggle_hear_prayers")
if (src.level >= LEVEL_MOD)
usr.client.holder.hear_prayers = !usr.client.holder.hear_prayers
src.show_pref_window(usr)
if ("toggle_audible_prayers")
if (src.level >= LEVEL_MOD)
usr.client.holder.audible_prayers = (usr.client.holder.audible_prayers + 1) % 3
src.show_pref_window(usr)
if ("toggle_audible_ahelps")
if (src.level >= LEVEL_MOD)
switch(usr.client.holder.audible_ahelps)
if (PM_NO_ALERT)
usr.client.holder.audible_ahelps = PM_AUDIBLE_ALERT
if (PM_AUDIBLE_ALERT)
usr.client.holder.audible_ahelps = PM_DECTALK_ALERT
if (PM_DECTALK_ALERT)
usr.client.holder.audible_ahelps = PM_NO_ALERT
src.show_pref_window(usr)
if ("toggle_buildmode_view")
if (src.level >= LEVEL_PA)
usr.client.holder.buildmode_view = !usr.client.holder.buildmode_view
src.show_pref_window(usr)
if ("toggle_category")
var/cat = href_list["cat"]
if(cat in src.hidden_categories)
src.owner?.show_verb_category(ADMIN_CAT_PREFIX + cat)
src.hidden_categories -= cat
else
src.owner?.hide_verb_category(ADMIN_CAT_PREFIX + cat)
src.hidden_categories |= cat
src.show_pref_window(usr)
if ("toggle_spawn_in_loc")
if (src.level >= LEVEL_MOD)
usr.client.holder.spawn_in_loc = !usr.client.holder.spawn_in_loc
src.show_pref_window(usr)
if ("toggle_auto_stealth")
if (src.level >= LEVEL_SA)
src.auto_stealth = !(src.auto_stealth)
boutput(usr, "<span class='notice'>Auto Stealth [src.auto_stealth ? "enabled" : "disabled"].</span>")
if (src.auto_stealth)
if (src.auto_alt_key)
src.auto_alt_key = 0
if (usr.client.alt_key)
src.set_alt_key()
if (!usr.client.stealth && !isnull(src.auto_stealth_name))
src.set_stealth_mode(src.auto_stealth_name)
else if (isnull(src.auto_stealth_name))
var/new_key = input("Enter your desired display name.", "Fake Key", usr.client.key) as null|text
if (!new_key)
src.auto_stealth_name = null
boutput(usr, "<span class='notice'>Auto Stealth name removed.</span>")
return src.show_pref_window(usr)
if (alert("Use \"[new_key]\" as your Auto Stealth name?", "Confirmation", "OK", "Cancel") == "OK")
src.auto_stealth_name = new_key
src.set_stealth_mode(src.auto_stealth_name)
else
src.auto_stealth_name = null
boutput(usr, "<span class='notice'>Auto Stealth name removed.</span>")
return src.show_pref_window(usr)
src.show_pref_window(usr)
if ("set_auto_stealth_name")
if (src.level >= LEVEL_SA)
var/new_key = input("Enter your desired display name.", "Fake Key", usr.client.key) as null|text
if (!new_key)
src.auto_stealth_name = null
boutput(usr, "<span class='notice'>Auto Stealth name removed.</span>")
return
if (alert("Use \"[new_key]\" as your Auto Stealth name?", "Confirmation", "OK", "Cancel") == "OK")
src.auto_stealth_name = new_key
src.show_pref_window(usr)
else
src.auto_stealth_name = null
boutput(usr, "<span class='notice'>Auto Stealth name removed.</span>")
return
if ("toggle_auto_alt_key")
if (src.level >= LEVEL_SA)
src.auto_alt_key = !(src.auto_alt_key)
boutput(usr, "<span class='hint'>Auto Alt Key [src.auto_alt_key ? "enabled" : "disabled"].</span>")
if (src.auto_alt_key)
if (src.auto_stealth)
src.auto_stealth = 0
if (usr.client.stealth)
src.set_stealth_mode()
if (!usr.client.alt_key && !isnull(src.auto_alt_key_name))
src.set_alt_key(src.auto_alt_key_name)
else if (isnull(src.auto_alt_key_name))
var/new_key = input("Enter your desired display name.", "Alt Key", usr.client.key) as null|text
if (!new_key)
src.auto_alt_key_name = null
boutput(usr, "<span class='hint'>Auto Alt Key removed.</span>")
return src.show_pref_window(usr)
if (alert("Use \"[new_key]\" as your Auto Alt Key?", "Confirmation", "OK", "Cancel") == "OK")
src.auto_alt_key_name = new_key
src.set_alt_key(src.auto_alt_key_name)
else
src.auto_alt_key_name = null
boutput(usr, "<span class='hint'>Auto Alt Key removed.</span>")
return src.show_pref_window(usr)
src.show_pref_window(usr)
if ("set_auto_alt_key_name")
if (src.level >= LEVEL_SA)
var/new_key = input("Enter your desired display name.", "Alt Key", usr.client.key) as null|text
if (!new_key)
src.auto_alt_key_name = null
boutput(usr, "<span class='notice'>Auto Alt Key removed.</span>")
return
if (alert("Use \"[new_key]\" as your Auto Alt Key?", "Confirmation", "OK", "Cancel") == "OK")
src.auto_alt_key_name = new_key
src.show_pref_window(usr)
else
src.auto_alt_key_name = null
boutput(usr, "<span class='notice'>Auto Alt Key removed.</span>")
return
if ("refreshoptions")
var/mob/M = locate(href_list["target"])
if (!M) return
usr.client.holder.playeropt(M)
if("call_shuttle")
if (src.level >= LEVEL_SA)
switch(href_list["type"])
if("1")
if ((!( ticker ) || emergency_shuttle.location))
return
var/call_reason = input("Enter the reason for the shuttle call (or just hit OK to give no reason)","Shuttle Call Reason","No reason given.") as null|text
if(!call_reason)
return
emergency_shuttle.incall()
command_announcement(call_reason + "<br><b><span class='alert'>It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</span></b>", "The Emergency Shuttle Has Been Called", css_class = "notice")
logTheThing("admin", usr, null, "called the Emergency Shuttle (reason: [call_reason])")
logTheThing("diary", usr, null, "called the Emergency Shuttle (reason: [call_reason])", "admin")
message_admins("<span class='internal'>[key_name(usr)] called the Emergency Shuttle to the station</span>")
if("2")
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0))
return
switch(emergency_shuttle.direction)
if(-1)
emergency_shuttle.incall()
var/call_reason = input("Enter the reason for the shuttle call (or just hit OK to give no reason)","Shuttle Call Reason","") as null|text
if(!call_reason)
call_reason = "No reason given."
emergency_shuttle.incall()
command_announcement(call_reason + "<br><b><span class='alert'>It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</span></b>", "The Emergency Shuttle Has Been Called", css_class = "notice")
logTheThing("admin", usr, null, "called the Emergency Shuttle (reason: [call_reason])")
logTheThing("diary", usr, null, "called the Emergency Shuttle (reason: [call_reason])", "admin")
message_admins("<span class='internal'>[key_name(usr)] called the Emergency Shuttle to the station</span>")
if(1)
emergency_shuttle.recall()
boutput(world, "<span class='notice'><B>Alert: The shuttle is going back!</B></span>")
logTheThing("admin", usr, null, "sent the Emergency Shuttle back")
logTheThing("diary", usr, null, "sent the Emergency Shuttle back", "admin")
message_admins("<span class='internal'>[key_name(usr)] recalled the Emergency Shuttle</span>")
else
alert("You need to be at least a Secondary Administrator to do a shuttle call.")
if("edit_shuttle_time")
if (src.level >= LEVEL_PA)
var/timeleft = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.timeleft()) as null|num
if (isnull(timeleft))
return
emergency_shuttle.settimeleft(timeleft)
logTheThing("admin", usr, null, "edited the Emergency Shuttle's timeleft to [timeleft]")
logTheThing("diary", usr, null, "edited the Emergency Shuttle's timeleft to [timeleft]", "admin")
message_admins("<span class='internal'>[key_name(usr)] edited the Emergency Shuttle's timeleft to [timeleft]</span>")
else
alert("You need to be at least a Primary Administrator to edit the shuttle timer.")
if("toggle_shuttle_calling")
if (src.level >= LEVEL_PA)
emergency_shuttle.disabled = !emergency_shuttle.disabled
logTheThing("admin", usr, null, "[emergency_shuttle.disabled ? "dis" : "en"]abled calling the Emergency Shuttle")
logTheThing("diary", usr, null, "[emergency_shuttle.disabled ? "dis" : "en"]abled calling the Emergency Shuttle", "admin")
message_admins("<span class='internal'>[key_name(usr)] [emergency_shuttle.disabled ? "dis" : "en"]abled calling the Emergency Shuttle</span>")
// someone forgetting about leaving shuttle calling disabled would be bad so let's inform the Admin Crew if it happens, just in case
var/ircmsg[] = new()
ircmsg["key"] = src.owner:key
ircmsg["name"] = (usr && usr.real_name) ? usr.real_name : "NULL"
ircmsg["msg"] = "Has [emergency_shuttle.disabled ? "dis" : "en"]abled calling the Emergency Shuttle"
ircbot.export("admin", ircmsg)
else
alert("You need to be at least a Primary Administrator to enable/disable shuttle calling.")
if("toggle_shuttle_recalling")
if (src.level >= LEVEL_PA)
emergency_shuttle.can_recall = !emergency_shuttle.can_recall
logTheThing("admin", usr, null, "[emergency_shuttle.can_recall ? "en" : "dis"]abled recalling the Emergency Shuttle")
logTheThing("diary", usr, null, "[emergency_shuttle.can_recall ? "en" : "dis"]abled recalling the Emergency Shuttle", "admin")
message_admins("<span class='internal'>[key_name(usr)] [emergency_shuttle.can_recall ? "en" : "dis"]abled recalling the Emergency Shuttle</span>")
else
alert("You need to be at least a Primary Administrator to enable/disable shuttle recalling.")
if("notes")
var/player = null
var/mob/M = locate(href_list["target"])
if(M)
player = M.ckey
else
player = href_list["target"]
if(!player)
return
src.viewPlayerNotes(player)
if("notes2")
var/player = href_list["target"]
if(!player)
return
switch(href_list["type"])
if("del")
if(src.level < LEVEL_SA)
alert("You need to be at least a Secondary Administrator to delete notes.")
return
if(href_list["id"])
if(alert("Delete This Note?",,"Yes","No") == "No")
return
else
var/noteId = href_list["id"]
deletePlayerNote(noteId)
src.viewPlayerNotes(player)
logTheThing("admin", usr, null, "deleted note [noteId] belonging to [player].")
logTheThing("diary", usr, null, "deleted note [noteId] belonging to [player].", "admin")
message_admins("<span class='internal'>[key_name(usr)] deleted note [noteId] belonging to <A href='?src=%admin_ref%;action=notes&target=[player]'>[player]</A>.</span>")
var/ircmsg[] = new()
ircmsg["key"] = src.owner:key
ircmsg["name"] = (usr && usr.real_name) ? usr.real_name : "NULL"
ircmsg["msg"] = "Deleted note [noteId] belonging to [player]"
ircbot.export("admin", ircmsg)
if("add")
if(src.level < LEVEL_SA)
alert("You need to be at least a Secondary Adminstrator to add notes.")
return
var/the_note = input("Write your note here!", "Note for [player]") as null|message
if (isnull(the_note) || !length(the_note))
return
addPlayerNote(player, usr.ckey, the_note)
SPAWN_DBG(2 SECONDS) src.viewPlayerNotes(player)
logTheThing("admin", usr, null, "added a note for [player]: [the_note]")
logTheThing("diary", usr, null, "added a note for [player]: [the_note]", "admin")
message_admins("<span class='internal'>[key_name(usr)] added a note for <A href='?src=%admin_ref%;action=notes&target=[player]'>[player]</A>: [the_note]</span>")
var/ircmsg[] = new()
ircmsg["key"] = src.owner:key
ircmsg["name"] = (usr && usr.real_name) ? usr.real_name : "NULL"
ircmsg["msg"] = "Added a note for [player]: [the_note]"
ircbot.export("admin", ircmsg)
if("viewcompids")
var/player = href_list["targetckey"]
if(src.tempmin)
logTheThing("admin", usr, player, "tried to access the compIDs of [constructTarget(player,"admin")]")
logTheThing("diary", usr, player, "tried to access the compIDs of [constructTarget(player,"diary")]", "admin")
alert("You need to be an actual admin to view compIDs.")
return
view_client_compid_list(usr, player)
return
/////////////////////////////////////ban stuff
if ("addban") //Add ban
var/mob/M = (href_list["target"] ? locate(href_list["target"]) : null)
usr.client.addBanDialog(M)
if ("sharkban") //Add ban
var/mob/M = (href_list["target"] ? locate(href_list["target"]) : null)
usr.client.sharkban(M)
if("unbane") //Edit ban
if (src.level >= LEVEL_SA)
var/id = html_decode(href_list["id"])
var/ckey = html_decode(href_list["target"])
var/compID = html_decode(href_list["compID"])
var/ip = html_decode(href_list["ip"])
var/reason = html_decode(href_list["reason"])
var/timestamp = html_decode(href_list["timestamp"])
usr.client.editBanDialog(id, ckey, compID, ip, reason, timestamp)
else
alert("You need to be at least a Secondary Administrator to edit bans.")
if("unbanf") //Delete ban
if (src.level >= LEVEL_SA)
var/id = html_decode(href_list["id"])
var/ckey = html_decode(href_list["target"])
var/compID = html_decode(href_list["compID"])
var/ip = html_decode(href_list["ip"])
var/akey = usr.client.ckey
usr.client.deleteBanDialog(id, ckey, compID, ip, akey)
else
alert("You need to be at least a Secondary Administrator to remove bans.")
/////////////////////////////////////end ban stuff
if("jobbanpanel")
var/mob/M = locate(href_list["target"])
var/dat = ""
var/header = "<b>Pick Job to ban this guy from.<br>"
var/body
// var/list/alljobs = get_all_jobs()
var/jobs = ""
if (!M) return
for(var/job in uniquelist(occupations))
if(job in list("Tourist","Mining Supervisor","Atmospheric Technician","Vice Officer"))
continue
if(jobban_isbanned(M, job))
jobs += "<a href='?src=\ref[src];action=jobban;type=[job];target=\ref[M]'><font color=red>[replacetext(job, " ", " ")]</font></a> "
else
jobs += "<a href='?src=\ref[src];action=jobban;type=[job];target=\ref[M]'>[replacetext(job, " ", " ")]</a> " //why doesn't this work
if(jobban_isbanned(M, "Captain"))
jobs += "<a href='?src=\ref[src];action=jobban;type=Captain;target=\ref[M]'><font color=red>Captain</font></a> "
else
jobs += "<a href='?src=\ref[src];action=jobban;type=Captain;target=\ref[M]'>Captain</a> " //why doesn't this work
if(jobban_isbanned(M, "Head of Security"))
jobs += "<a href='?src=\ref[src];action=jobban;type=Head of Security;target=\ref[M]'><font color=red>Head of Security</font></a> "
else
jobs += "<a href='?src=\ref[src];action=jobban;type=Head of Security;target=\ref[M]'>Head of Security</a> "
if(jobban_isbanned(M, "Syndicate"))
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Syndicate;target=\ref[M]'><font color=red>[replacetext("Syndicate", " ", " ")]</font></a> "
else
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Syndicate;target=\ref[M]'>[replacetext("Syndicate", " ", " ")]</a> " //why doesn't this work
if(jobban_isbanned(M, "Special Respawn"))
jobs += " <a href='?src=\ref[src];action=jobban;type=Special Respawn;target=\ref[M]'><font color=red>[replacetext("Special Respawn", " ", " ")]</font></a> "
else
jobs += " <a href='?src=\ref[src];action=jobban;type=Special Respawn;target=\ref[M]'>[replacetext("Special Respawn", " ", " ")]</a> "
if(jobban_isbanned(M, "Engineering Department"))
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Engineering Department;target=\ref[M]'><font color=red>[replacetext("Engineering Department", " ", " ")]</font></a> "
else
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Engineering Department;target=\ref[M]'>[replacetext("Engineering Department", " ", " ")]</a> "
if(jobban_isbanned(M, "Security Department"))
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Security Department;target=\ref[M]'><font color=red>[replacetext("Security Department", " ", " ")]</font></a> "
else
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Security Department;target=\ref[M]'>[replacetext("Security Department", " ", " ")]</a> "
if(jobban_isbanned(M, "Heads of Staff"))
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Heads of Staff;target=\ref[M]'><font color=red>[replacetext("Heads of Staff", " ", " ")]</font></a> "
else
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Heads of Staff;target=\ref[M]'>[replacetext("Heads of Staff", " ", " ")]</a> "
if(jobban_isbanned(M, "Everything Except Assistant"))
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Everything Except Assistant;target=\ref[M]'><font color=red>[replacetext("Everything Except Assistant", " ", " ")]</font></a> "
else
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Everything Except Assistant;target=\ref[M]'>[replacetext("Everything Except Assistant", " ", " ")]</a> "
if(jobban_isbanned(M, "Ghostdrone"))
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Ghostdrone;target=\ref[M]'><font color=red>Ghostdrone</font></a> "
else
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Ghostdrone;target=\ref[M]'>Ghostdrone</a> "
if(jobban_isbanned(M, "Custom Names"))
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Custom Names;target=\ref[M]'><font color=red>[replacetext("Having a Custom Name", " ", " ")]</font></a> "
else
jobs += "<BR><a href='?src=\ref[src];action=jobban;type=Custom Names;target=\ref[M]'>[replacetext("Having a Custom Name", " ", " ")]</a> "
body = "<br>[jobs]<br><br>"
dat = "<tt>[header][body]</tt>"
usr.Browse(dat, "window=jobban2;size=600x150")
if("jobban")
if (src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
var/job = href_list["type"]
if (!M) return
if ((M.client && M.client.holder && (M.client.holder.level > src.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if (jobban_isbanned(M, job))
if(jobban_keylist.Find(text("[M.ckey] - Everything Except Assistant")) && job != "Everything Except Assistant")
alert("This person is banned from Everything Except Assistant. You must lift that ban first.")
return
if(job in list("Mining Supervisor","Engineer","Atmospheric Technician","Miner","Mechanic"))
if(jobban_keylist.Find(text("[M.ckey] - Engineering Department")))
alert("This person is banned from Engineering Department. You must lift that ban first.")
return
if(job in list("Security Officer","Vice Officer","Detective"))
if(jobban_keylist.Find(text("[M.ckey] - Security Department")))
alert("This person is banned from Security Department. You must lift that ban first.")
return
if(job in list("Captain","Head of Personnel","Head of Security","Chief Engineer","Research Director"))
if(jobban_keylist.Find(text("[M.ckey] - Heads of Staff")))
alert("This person is banned from Heads of Staff. You must lift that ban first.")
return
logTheThing("admin", usr, M, "unbanned [constructTarget(M,"admin")] from [job]")
logTheThing("diary", usr, M, "unbanned [constructTarget(M,"diary")] from [job]", "admin")
message_admins("<span class='internal'>[key_name(usr)] unbanned [key_name(M)] from [job]</span>")
addPlayerNote(M.ckey, usr.ckey, "[usr.ckey] unbanned [M.ckey] from [job]")
jobban_unban(M, job)
if (announce_jobbans) boutput(M, "<span class='alert'><b>[key_name(usr)] has lifted your [job] job-ban.</b></span>")
else
logTheThing("admin", usr, M, "banned [constructTarget(M,"admin")] from [job]")
logTheThing("diary", usr, M, "banned [constructTarget(M,"diary")] from [job]", "admin")
message_admins("<span class='internal'>[key_name(usr)] banned [key_name(M)] from [job]</span>")
addPlayerNote(M.ckey, usr.ckey, "[usr.ckey] banned [M.ckey] from [job]")
if(job == "Everything Except Assistant")
if(jobban_keylist.Find(text("[M.ckey] - Engineering Department")))
jobban_unban(M,"Engineering Department")
if(jobban_keylist.Find(text("[M.ckey] - Security Department")))
jobban_unban(M,"Security Department")
if(jobban_keylist.Find(text("[M.ckey] - Heads of Staff")))
jobban_unban(M,"Heads of Staff")
for(var/Trank1 in uniquelist(occupations))
if(jobban_keylist.Find(text("[M.ckey] - [Trank1]")))
jobban_unban(M,Trank1)
else if(job == "Engineering Department")
for(var/Trank2 in list("Mining Supervisor","Engineer","Atmospheric Technician","Miner","Mechanic"))
if(jobban_keylist.Find(text("[M.ckey] - [Trank2]")))
jobban_unban(M,Trank2)
else if(job == "Security Department")
for(var/Trank3 in list("Security Officer","Vice Officer","Detective"))
if(jobban_keylist.Find(text("[M.ckey] - [Trank3]")))
jobban_unban(M,Trank3)
else if(job == "Heads of Staff")
for(var/Trank4 in list("Captain","Head of Personnel","Head of Security","Chief Engineer","Research Director"))
if(jobban_keylist.Find(text("[M.ckey] - [Trank4]")))
jobban_unban(M,Trank4)
jobban_fullban(M, job)
if (announce_jobbans) boutput(M, "<span class='alert'><b>[key_name(usr)] has job-banned you from [job].</b></span>")
else
alert("You need to be at least a Secondary Administrator to work with job bans.")
if ("boot")
var/mob/M = locate(href_list["target"])
usr.client.cmd_boot(M)
if ("removejobban")
if (src.level >= LEVEL_SA)
var/t = href_list["target"]
if(t)
logTheThing("admin", usr, null, "removed [t]")
logTheThing("diary", usr, null, "removed [t]", "admin")
message_admins("<span class='internal'>[key_name(usr)] removed [t]</span>")
jobban_remove(t)
else
alert("You need to be at least a Secondary Administrator to remove job bans.")
if ("mute")
if (src.level >= LEVEL_MOD)
var/mob/M = locate(href_list["target"])
if (ismob(M) && M.client)
var/muted = 0
if (M.client.ismuted())
M.client.unmute()
else
M.client.mute(-1)
muted = 1
logTheThing("admin", usr, M, "has [(muted ? "permanently muted" : "unmuted")] [constructTarget(M,"admin")]")
logTheThing("diary", usr, M, "has [(muted ? "permanently muted" : "unmuted")] [constructTarget(M,"diary")].", "admin")
message_admins("<span class='internal'>[key_name(usr)] has [(muted ? "permanently muted" : "unmuted")] [key_name(M)].</span>")
boutput(M, "You have been [(muted ? "permanently muted" : "unmuted")].")
else
alert("You need to be at least a Moderator to mute people.")
if ("tempmute")
if (src.level >= LEVEL_MOD)
var/mob/M = locate(href_list["target"])
if (ismob(M))
var/muted = 0
if (M.client.ismuted())
M.client.unmute()
else
M.client.mute(60)
muted = 1
logTheThing("admin", usr, M, "has [(muted ? "temporarily muted" : "unmuted")] [constructTarget(M,"admin")]")
logTheThing("diary", usr, M, "has [(muted ? "temporarily muted" : "unmuted")] [constructTarget(M,"diary")].", "admin")
message_admins("<span class='internal'>[key_name(usr)] has [(muted ? "temporarily muted" : "unmuted")] [key_name(M)].</span>")
boutput(M, "You have been [(muted ? "temporarily muted" : "unmuted")].")
else
alert("You need to be at least a Moderator to mute people.")
if ("banooc")
if (src.level >= LEVEL_MOD)
var/mob/M = locate(href_list["target"])
if (ismob(M) && M.client)
var/oocbanned = 0
if (!oocban_isbanned(M))
oocban_fullban(M)
oocbanned = 1
else
oocban_unban(M)
logTheThing("admin", usr, M, "has [(oocbanned ? "OOC Banned" : "OOC Unbanned")] [constructTarget(M,"admin")]")
logTheThing("diary", usr, M, "has [(oocbanned ? "OOC Banned" : "OOC Unbanned")] [constructTarget(M,"diary")].", "admin")
message_admins("<span class='internal'>[key_name(usr)] has [(oocbanned ? "OOC Banned" : "OOC Unbanned")] [key_name(M)].</span>")
if ("toggle_hide_mode")
if (src.level >= LEVEL_SA)
ticker.hide_mode = !ticker.hide_mode
Topic(null, list("src" = "\ref[src]", "action" = "c_mode_panel"))
else
alert("You need to be at least a Secondary Administrator to hide the game mode.")
if ("c_mode_panel") // I removed some broken/discontinued game modes here (Convair880).
if (src.level >= LEVEL_SA)
var/cmd = "c_mode_current"
var/addltext = ""
if (current_state > GAME_STATE_PREGAME)
cmd = "c_mode_next"
addltext = " next round"
var/dat = {"
<html><body><title>Select Round Mode</title>
<B>What mode do you wish to play[addltext]?</B><br>
Current mode is: <i>[master_mode]</i><br>
Mode is <A href='?src=\ref[src];action=toggle_hide_mode'>[ticker.hide_mode ? "hidden" : "not hidden"]</a><br/>
<HR>
<b>Regular Modes:</b><br>
<A href='?src=\ref[src];action=[cmd];type=secret'>Secret</A><br>
<A href='?src=\ref[src];action=[cmd];type=action'>Secret: Action</A><br>
<A href='?src=\ref[src];action=[cmd];type=intrigue'>Secret: Intrigue</A><br>
<A href='?src=\ref[src];action=[cmd];type=mixed'>Mixed (Action)</A><br>
<A href='?src=\ref[src];action=[cmd];type=mixed_rp'>Mixed (Mild)</A><br>
<A href='?src=\ref[src];action=[cmd];type=traitor'>Traitor</A><br>
<A href='?src=\ref[src];action=[cmd];type=nuclear'>Nuclear Emergency</A><br>
<A href='?src=\ref[src];action=[cmd];type=wizard'>Wizard</A><br>
<A href='?src=\ref[src];action=[cmd];type=changeling'>Changeling</A><br>
<A href='?src=\ref[src];action=[cmd];type=vampire'>Vampire</A><br>
<A href='?src=\ref[src];action=[cmd];type=blob'>Blob</A><br>
<A href='?src=\ref[src];action=[cmd];type=conspiracy'>Conspiracy</A><br>
<A href='?src=\ref[src];action=[cmd];type=spy_theft'>Spy Theft</A><br>
<b>Other Modes</b><br>
<A href='?src=\ref[src];action=[cmd];type=extended'>Extended</A><br>
<A href='?src=\ref[src];action=[cmd];type=flock'>Flock(probably wont work. Press at own risk)</A><br>
<A href='?src=\ref[src];action=[cmd];type=disaster'>Disaster (Beta)</A><br>
<A href='?src=\ref[src];action=[cmd];type=spy'>Spy</A><br>
<A href='?src=\ref[src];action=[cmd];type=revolution'>Revolution</A><br>
<A href='?src=\ref[src];action=[cmd];type=revolution_extended'>Revolution (no time limit)</A><br>
<A href='?src=\ref[src];action=[cmd];type=gang'>Gang War (Beta)</A><br>
<A href='?src=\ref[src];action=[cmd];type=battle_royale'>Battle Royale</A><br>
<A href='?src=\ref[src];action=[cmd];type=assday'>Ass Day Classic (For testing only.)</A><br>
<A href='?src=\ref[src];action=[cmd];type=construction'>Construction (For testing only. Don't select this!)</A><br>
<A href='?src=\ref[src];action=[cmd];type=football'>Football (this only works if built with FOOTBALL_MODE sorry too lazy to ifdef here)</A>
</body></html>
"}
usr.Browse(dat, "window=c_mode")
else
alert("You need to be at least a Secondary Adminstrator to change the game mode.")
if ("c_mode_current")
if (src.level >= LEVEL_SA)
if (current_state > GAME_STATE_PREGAME)
return alert(usr, "The game has already started.", null, null, null, null)
var/list/valid_modes = list("secret","action","intrigue","random","traitor","meteor","extended","monkey",
"nuclear","blob","restructuring","wizard","revolution", "revolution_extended","malfunction",
"spy","gang","disaster","changeling","vampire","mixed","mixed_rp", "construction","conspiracy","spy_theft","battle_royale", "vampire","assday", "football", "flock")
var/requestedMode = href_list["type"]
if (requestedMode in valid_modes)
logTheThing("admin", usr, null, "set the mode as [requestedMode].")
logTheThing("diary", usr, null, "set the mode as [requestedMode].", "admin")
message_admins("<span class='internal'>[key_name(usr)] set the mode as [requestedMode].</span>")
world.save_mode(requestedMode)
master_mode = requestedMode
if(master_mode == "battle_royale")
lobby_titlecard.icon_state += "_battle_royale"
else
lobby_titlecard.icon_state = "title_main"
#ifdef MAP_OVERRIDE_OSHAN
lobby_titlecard.icon_state = "title_oshan"
#endif
#ifdef MAP_OVERRIDE_MANTA
lobby_titlecard.icon_state = "title_manta"
#endif
if (alert("Declare mode change to all players?","Mode Change","Yes","No") == "Yes")
boutput(world, "<span class='notice'><b>The mode is now: [requestedMode]</b></span>")
else
boutput(usr, "<span class='alert'><b>That is not a valid game mode!</b></span>")
else
alert("You need to be at least a Secondary Adminstrator to change the game mode.")
if ("c_mode_next")
if (src.level >= LEVEL_SA)
var/newmode = href_list["type"]
logTheThing("admin", usr, null, "set the next round's mode as [newmode].")
logTheThing("diary", usr, null, "set the next round's mode as [newmode].", "admin")
message_admins("<span class='internal'>[key_name(usr)] set the next round's mode as [newmode].</span>")
world.save_mode(newmode)
if (alert("Declare mode change to all players?","Mode Change","Yes","No") == "Yes")
boutput(world, "<span class='notice'><b>The next round's mode will be: [newmode]</b></span>")
else
alert("You need to be at least a Secondary Adminstrator to change the game mode.")
if ("monkeyone")
if (src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
if(!ismob(M))
return
if(ishuman(M))
var/mob/living/carbon/human/N = M
logTheThing("admin", usr, M, "attempting to monkeyize [constructTarget(M,"admin")]")
logTheThing("diary", usr, M, "attempting to monkeyize [constructTarget(M,"diary")]", "admin")
message_admins("<span class='internal'>[key_name(usr)] attempting to monkeyize [key_name(M)]</span>")
N.monkeyize()
else
boutput(usr, "<span class='alert'>You can't transform that mob type into a monkey.</span>")
return
else
alert("You need to be at least a Secondary Adminstrator to monkeyize players.")
if ("forcespeech")
if (src.level >= LEVEL_PA)
var/mob/M = locate(href_list["target"])
if (ismob(M))
var/speech = input("What will [M] say?", "Force speech", "")
if(!speech)
return
M.say(speech)
speech = copytext(sanitize(speech), 1, MAX_MESSAGE_LEN)
logTheThing("admin", usr, M, "forced [constructTarget(M,"admin")] to say: [speech]")
logTheThing("diary", usr, M, "forced [constructTarget(M,"diary")] to say: [speech]", "admin")
message_admins("<span class='internal'>[key_name(usr)] forced [key_name(M)] to say: [speech]</span>")
else
alert("You need to be at least a Primary Administrator to force players to say things.")
if ("prison")
if (src.level >= LEVEL_MOD)
var/mob/M = locate(href_list["target"])
if (!M || !ismob(M)) return
usr.client.cmd_admin_prison_unprison(M)
else
alert("You need to be at least a Moderator to send players to prison.")
if ("shamecube")
if (src.level >= LEVEL_MOD)
var/mob/M = locate(href_list["target"])
if (!M) return
usr.client.cmd_shame_cube(M)
else
alert("You need to be at least a Moderator to shame cube a player.")
if ("tdome")
if (src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
if (!M) return
var/team
var/type = href_list["type"]
if (type == "1")
M.set_loc(pick_landmark(LANDMARK_THUNDERDOME_1))
team = "Team 1"
else if (type == "2")
M.set_loc(pick_landmark(LANDMARK_THUNDERDOME_2))
team = "Team 2"
logTheThing("admin", usr, M, "sent [constructTarget(M,"admin")] to the thunderdome. ([team])")
logTheThing("diary", usr, M, "sent [constructTarget(M,"diary")] to the thunderdome. ([team])", "admin")
message_admins("[key_name(usr)] has sent [key_name(M)] to the thunderdome. ([team])")
boutput(M, "<span class='notice'><b>You have been sent to the Thunderdome. You are on [team].</b></span>")
boutput(M, "<span class='notice'><b>Prepare for combat. If you are not let out of the preparation area within a few minutes, please adminhelp. (F1 key)</b></span>")
else
alert("You need to be at least a Secondary Adminstrator to send players to Thunderdome.")
if ("revive")
if (src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
if (ismob(M))
if(isobserver(M))
alert("You can't revive a ghost! How does that even work?!")
return
if(config.allow_admin_rev)
M.revive()
message_admins("<span class='alert'>Admin [key_name(usr)] healed / revived [key_name(M)]!</span>")
logTheThing("admin", usr, M, "healed / revived [constructTarget(M,"admin")]")
logTheThing("diary", usr, M, "healed / revived [constructTarget(M,"diary")]", "admin")
else
alert("Reviving is currently disabled.")
else
alert("You need to be at least a Primary Adminstrator to revive players.")
if ("makeai")
if (src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
var/mob/newM = usr.client.cmd_admin_makeai(M)
href_list["target"] = "\ref[newM]"
else
alert("You need to be at least a Secondary Adminstrator to turn players into AI units.")
if ("makecyborg")
if (src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
var/mob/newM = usr.client.cmd_admin_makecyborg(M)
href_list["target"] = "\ref[newM]"
else
alert("You need to be at least a Secondary Adminstrator to turn players into Cyborgs.")
if ("makeghostdrone")
if (src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
var/mob/newM = usr.client.cmd_admin_makeghostdrone(M)
href_list["target"] = "\ref[newM]"
else
alert("You need to be at least a Secondary Adminstrator to turn players into Ghostdrones.")
if ("modifylimbs")
if (src.level >= LEVEL_SA)
var/mob/MC = locate(href_list["target"])
if (MC && usr.client)
usr.client.modify_parts(MC, usr)
else
alert("You need to be at least a Secondary Administrator to modify limbs.")
if ("jumpto")
if(src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
if (!M) return
if (!istype(M, /mob/dead/target_observer))
usr.client.jumptomob(M)
else
var/jumptarget = M.eye
if (jumptarget)
usr.client.jumptoturf(get_turf(jumptarget))
else
alert("You need to be at least a Secondary Adminstrator to jump to mobs.")
if ("observe")
if(src.level >= LEVEL_SA)
var/mob/M = locate(href_list["target"])
if (!M) return
if (isobserver(M))
boutput(usr, "<span class='alert'>You can't observe a ghost.</span>")
else
if (!istype(usr, /mob/dead/observer))
boutput(usr, "<span class='alert'>This command only works when you are a ghost.</span>")
return
var/mob/dead/observer/ghost = usr
ghost.insert_observer(M)
else
alert("You need to be at least a Secondary Adminstrator to observe mobs... For some reason.")
if ("jumptocoords")
if(src.level >= LEVEL_SA)
var/list/coords = splittext(href_list["target"], ",")
if (coords.len < 3) return
usr.client.jumptocoord(text2num(coords[1]), text2num(coords[2]), text2num(coords[3]))
else
alert("You need to be at least a Secondary Adminstrator to jump to coords.")
if ("getmob")
if(( src.level >= LEVEL_ADMIN ) || ((src.level >= LEVEL_SA) ))
var/mob/M = locate(href_list["target"])
if (!M) return
usr.client.Getmob(M)
else
alert("If you are below the rank of Administrator, you need to be observing and at least a Secondary Administrator to get a player.")
if ("sendmob")
if(( src.level >= LEVEL_ADMIN ) || ((src.level >= LEVEL_PA) ))
var/mob/M = locate(href_list["target"])
if (!M) return
var/list/areas = list( )
for (var/area/A in world)
areas += A
LAGCHECK(LAG_LOW)
var/area = input(usr, "Select an area") as null|anything in areas
if (area)
usr.client.sendmob(M, area)
else
alert("If you are below the rank of Administrator, you need to be observing and at least a Primary Administrator to get a player.")
if ("gib")
if( src.level >= LEVEL_PA )
var/mob/M = locate(href_list["target"])
if (!M) return
usr.client.cmd_admin_gib(M)
else
alert("You need to be at least a Primary Admin to gib a dude.")
if ("buttgib")
if( src.level >= LEVEL_PA )
var/mob/M = locate(href_list["target"])
if (!M) return
usr.client.cmd_admin_buttgib(M)
else
alert("You need to be at least a Primary Admin to buttgib a dude.")
if ("partygib")
if( src.level >= LEVEL_PA )
var/mob/M = locate(href_list["target"])
if (!M) return
usr.client.cmd_admin_partygib(M)
else
alert("You need to be at least a Primary Admin to party gib a dude.")
if ("owlgib")
if( src.level >= LEVEL_PA )
var/mob/M = locate(href_list["target"])
if (!M) return
usr.client.cmd_admin_owlgib(M)
else
alert("A loud hooting noise is heard. It sounds angry. I guess you aren't allowed to do this.")
if ("firegib")
if( src.level >= LEVEL_PA )
var/mob/M = locate(href_list["target"])
if (!M) return
usr.client.cmd_admin_firegib(M)
else
alert("You need to be at least a Primary Admin to fire gib a dude.")