-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxVotemap.cs
2850 lines (2491 loc) · 265 KB
/
xVotemap.cs
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
/* support:
* https://forum.myrcon.com/showthread.php?6524-xVotemap-1-5-3-0
*
* grizzlybeer
* https://forum.myrcon.com/member.php?13930-grizzlybeer
*
* TODO:
* ok - editable yell banner
* ok - options: yell nextmap, say nextmap
* - settings block for each gamemode
* ok - sync vips
*
*/
using System;
using System.IO;
using System.Text;
using System.Reflection;
using System.Collections.Generic;
using System.Data;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
//using System.Drawing;
using PRoCon.Core;
using PRoCon.Core.Plugin;
using PRoCon.Core.Plugin.Commands;
using PRoCon.Core.Players;
using PRoCon.Core.Players.Items;
using PRoCon.Core.Battlemap;
using PRoCon.Core.Maps;
using System.Net;
namespace PRoConEvents {
public class xVotemap : PRoConPluginAPI, IPRoConPluginInterface
{
#region Variables and Constructors
private object derplock=new object();
private string m_strHostName;
private string m_strPort;
private string m_strPRoConVersion;
private DateTime lastcheck = DateTime.Now.AddMinutes(-3.0);
private DateTime lastupdatecheck = DateTime.Now.AddHours(-4);
// User Settings
private int m_iVoteThres = 1;
private int m_iRandomness = 5;
private int m_iNumOfMapOptions = 4;
private int m_iVotingDuration = 300;
private int m_iStopVoteTime = 180;
private int m_iRushVoteStartTime = 600; // in seconds
private int m_iCalVoteStartTime = 600; // in seconds
private int minimumPlayers = 0;
private int maximumPlayers = 70;
private string m_strHosVotePrefix =@"/";
private string m_strTrigger = "Automatic";
private string m_strEnableVoteBanner = "First";
private string m_strBannerType = "Both";
private int m_iBannerYellDuration = 5;
private enumBoolYesNo m_enumExcludeCurrMap = enumBoolYesNo.Yes;
private enumBoolYesNo m_enumExcludeCurrMode = enumBoolYesNo.No;
private int m_iVotingOptionsInterval = 60;
private int m_iNextMapDisplayInterval = 600;
private enumBoolYesNo m_enumShowGamemode = enumBoolYesNo.Yes;
private int m_iDebugLevel = 3;
// The Rest
private List<TeamScore> m_listCurrTeamScore = new List<TeamScore>();
//private List<CPlayerInfo> m_listCurrPlayers = new List<CPlayerInfo>();
private List<MaplistEntry> m_listCurrMapList = new List<MaplistEntry>();
private Dictionary<string, int> m_dictVoting = new Dictionary<string, int>(); // Player Name, Vote
private List<string> m_listMapOptions; // Map name
private List<string> m_listGamemodeOptions; // gamemode
private List<MaplistEntry> m_listPastMaps = new List<MaplistEntry>();
private int m_iCurrPlayerCount = 0;
private DateTime m_timeServerInfoCheck = DateTime.Now;
private string mapSortSettings = "Map and Gametype";
private string m_strCurrentGameMode = "";
private string m_strCurrentMap = "";
private string m_strNextMap = "";
private string m_strNextMode = "";
private int m_iNextMapIndex = -1;
private int m_iCurrMapIndex = -1;
private int m_iCurrentRoundTime = 0;
private Players m_players = new Players();
private List<string> m_listOptsDisplay;
private bool m_boolVotemapEnabled = true;
private bool m_boolVotingStarted = false;
private bool m_boolVotingSystemEnabled = false;
private bool m_boolOnLastRound = true;
private enumBoolYesNo showNextMapBeforeVote = enumBoolYesNo.No;
private bool nextmapShown = false;
private enumBoolYesNo disableVoteResults = enumBoolYesNo.No;
//string m_strLastMessage = "";
private DateTime m_timeVoteStart;
private DateTime m_timeVoteEnd;
private int m_iEndTimeLeeway = 60; // seconds
private TimeSpan m_tsStartVote = TimeSpan.FromHours(1);
private DateTime m_timePrevious = DateTime.Now;
private int[] m_iPrevTicket;
private int ticketCounter = 100;
private int currentMcom = 0;
private Dictionary<char, double> m_dictLetterSizes = new Dictionary<char, double>();
private enumBoolYesNo syncreservedslots = enumBoolYesNo.Yes;
private List<string> vips = new List<string>();
private int vipvotecount = 3;
private enumBoolYesNo confirmpub = enumBoolYesNo.No;
private string pubconfirmmsg = "%pn% voted for %map%";
private enumBoolYesNo Check4Update = enumBoolYesNo.Yes;
private Dictionary<string, int> myvotes = new Dictionary<string, int>();
//private Dictionary<string, int> myvipvotes = new Dictionary<string, int>();
//int numteams = 2;
private List<string> VoteBanner = new List<string>(){"%%%%%%%%%%%%%%%%%%%%%%%","%%%%%%%%%%%%%%%%%%%%%%%","%%%% VOTE NEXT MAP %%%%","%%%%%%%%%%%%%%%%%%%%%%%","%%%%%%%%%%%%%%%%%%%%%%%","%%%%%%%%%%%%%%%%%%%%%%%","%%%%%%%%%%%%%%%%%%%%%%%","%%%% VOTE NEXT MAP %%%%","%%%%%%%%%%%%%%%%%%%%%%%", "%%%%%%%%%%%%%%%%%%%%%%%"};
private string YellVoteBanner = "Vote Next Map Now!";
private enumBoolYesNo SayVoteResult = enumBoolYesNo.Yes;
private enumBoolYesNo YellVoteResult = enumBoolYesNo.No;
private enumBoolYesNo SayNextMap = enumBoolYesNo.Yes;
private enumBoolYesNo YellNextMap = enumBoolYesNo.No;
private enumBoolYesNo displayvotescount = enumBoolYesNo.Yes;
private class Players
{
private List<Player> m_listPlayers = new List<Player>();
public void UpdatePlayer(CPlayerInfo player)
{
bool updated = false;
foreach (Player p in m_listPlayers)
{
if (p.SoldierName == player.SoldierName)
{
p.TeamID = player.TeamID;
p.SquadID = player.SquadID;
updated = true;
break;
}
}
if (!updated)
{
Add(player.SoldierName, player.TeamID, player.SquadID);
}
}
public bool SetVote(string name, int vote)
{
foreach (Player p in m_listPlayers)
{
if (p.SoldierName == name)
{
p.Vote = vote;
return true;
}
}
return false;
}
public Player GetPlayer(string name)
{
foreach (Player p in m_listPlayers)
{
if (p.SoldierName == name)
{
return p;
}
}
return null;
}
public List<Squad> GetNonvotedSquads()
{
List<Squad> squads = new List<Squad>();
foreach (Player p in m_listPlayers)
{
if (p.Vote == -1 && !(p.TeamID == 0 && p.SquadID == 0))
{
bool found = false;
foreach (Squad s in squads)
{
if (s.TeamID == p.TeamID && s.SquadID == p.SquadID)
{
found = true;
break;
}
}
if (!found)
{
squads.Add(new Squad(p.TeamID, p.SquadID));
}
}
}
squads.Sort();
return squads;
}
public void Add(string name, int teamId, int squadId)
{
if (!this.Contains(name))
{
m_listPlayers.Add(new Player(name, teamId, squadId));
}
}
public void Remove(string name)
{
foreach (Player p in m_listPlayers)
{
if (p.SoldierName == name)
{
m_listPlayers.Remove(p);
}
}
}
public int Count
{
get { return m_listPlayers.Count; }
}
public bool Contains(string name)
{
foreach (Player p in m_listPlayers)
{
if (p.SoldierName == name)
{
return true;
}
}
return false;
}
public class Player
{
private string m_Name = "";
private int m_TeamId = -1;
private int m_SquadId = -1;
private int m_Vote = -1;
public Player(string name, int teamId, int squadId)
{
m_Name = name;
m_TeamId = teamId;
m_SquadId = squadId;
m_Vote = -1;
}
public string SoldierName {
get {return m_Name;}
private set{m_Name = value;}
}
public int TeamID {
get { return m_TeamId; }
set { m_TeamId = value; }
}
public int SquadID {
get { return m_SquadId; }
set { m_SquadId = value; }
}
public int Vote {
get { return m_Vote; }
set { m_Vote = value; }
}
}
public class Squad : IComparable<Squad>
{
private int m_TeamId = -1;
private int m_SquadId = -1;
public Squad(int team, int squad)
{
m_TeamId = team;
m_SquadId = squad;
}
public int TeamID
{
get { return m_TeamId; }
}
public int SquadID
{
get { return m_SquadId; }
}
public int CompareTo(Squad other)
{
if (this.TeamID == other.TeamID)
{
return this.SquadID.CompareTo(other.SquadID);
}
return this.TeamID.CompareTo(other.TeamID);
}
}
}
public xVotemap()
{
#region Char Dictionary
m_strHosVotePrefix = @"/";
m_dictLetterSizes.Add(' ',0.50);
m_dictLetterSizes.Add('a',0.90);
m_dictLetterSizes.Add('b',0.90);
m_dictLetterSizes.Add('c',0.78);
m_dictLetterSizes.Add('d',0.90);
m_dictLetterSizes.Add('e',0.90);
m_dictLetterSizes.Add('f',0.56);
m_dictLetterSizes.Add('g',0.90);
m_dictLetterSizes.Add('h',0.90);
m_dictLetterSizes.Add('i',0.40);
m_dictLetterSizes.Add('j',0.50);
m_dictLetterSizes.Add('k',0.86);
m_dictLetterSizes.Add('l',0.40);
m_dictLetterSizes.Add('m',1.40);
m_dictLetterSizes.Add('n',0.90);
m_dictLetterSizes.Add('o',0.90);
m_dictLetterSizes.Add('p',0.90);
m_dictLetterSizes.Add('q',0.90);
m_dictLetterSizes.Add('r',0.62);
m_dictLetterSizes.Add('s',0.76);
m_dictLetterSizes.Add('t',0.55);
m_dictLetterSizes.Add('u',0.90);
m_dictLetterSizes.Add('v',0.85);
m_dictLetterSizes.Add('w',1.28);
m_dictLetterSizes.Add('x',0.82);
m_dictLetterSizes.Add('y',0.85);
m_dictLetterSizes.Add('z',0.78);
m_dictLetterSizes.Add('A',1.00);
m_dictLetterSizes.Add('B',1.00);
m_dictLetterSizes.Add('C',1.00);
m_dictLetterSizes.Add('D',1.12);
m_dictLetterSizes.Add('E',1.00);
m_dictLetterSizes.Add('F',0.90);
m_dictLetterSizes.Add('G',1.18);
m_dictLetterSizes.Add('H',1.12);
m_dictLetterSizes.Add('I',0.62);
m_dictLetterSizes.Add('J',0.70);
m_dictLetterSizes.Add('K',1.00);
m_dictLetterSizes.Add('L',0.85);
m_dictLetterSizes.Add('M',1.32);
m_dictLetterSizes.Add('N',1.11);
m_dictLetterSizes.Add('O',1.20);
m_dictLetterSizes.Add('P',0.92);
m_dictLetterSizes.Add('Q',1.20);
m_dictLetterSizes.Add('R',1.05);
m_dictLetterSizes.Add('S',0.91);
m_dictLetterSizes.Add('T',1.00);
m_dictLetterSizes.Add('U',1.12);
m_dictLetterSizes.Add('V',1.00);
m_dictLetterSizes.Add('W',1.55);
m_dictLetterSizes.Add('X',1.00);
m_dictLetterSizes.Add('Y',1.00);
m_dictLetterSizes.Add('Z',0.92);
#endregion
}
#endregion
#region PluginSetup
public string GetPluginName() {
return "xVotemap";
}
public string GetPluginVersion() {
return "1.5.6.0";
}
public string GetPluginAuthor() {
return "onegrizzlybeer/grizzlybeer, Hexacanon EG modification, Hand of Shadow, versions <=1.3.1 by aether";
}
public string GetPluginWebsite() {
return "forum.myrcon.com/showthread.php?6524-xVotemap";
}
public string GetPluginDescription() {
return @"
<p>If you liked my plugins, feel free to show your support.</p>
<form action=""https://www.paypal.com/cgi-bin/webscr"" method=""post"" target=""_blank"">
<input type=""hidden"" name=""cmd"" value=""_s-xclick"">
<input type=""hidden"" name=""encrypted"" value=""-----BEGIN PKCS7-----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-----END PKCS7-----"">
<input type=""image"" src=""https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"" border=""0"" name=""submit"" alt=""PayPal - The safer, easier way to pay online!"">
<img alt="""" border=""0"" src=""https://www.paypalobjects.com/en_US/i/scr/pixel.gif"" width=""1"" height=""1"">
</form>
<h2>Description</h2>
<p>Calls an in-game vote for the next map near the end on the round. Randomly selects four maps (by default, can be adjusted) from the current maplist to vote on. Before the options are displayed, a banner can be shown to get the players attention that voting is about to commence.<br>
The votes are tallied and if there are more votes than the set threshold, the winner is the map with the most votes. If there is a tie, the winner is selected at random from the tied maps. The next map is announced and it can be periodically displayed until the end of the round.</p>
<h2>In-game Commands</h2><br>
<blockquote>
<h4>/#</h4>While a vote is in progress, votes for the option represented by the #.
</blockquote>
<blockquote>
<h4>/v</h4>Displays the vote options while a vote is in progress. If typed before a vote, it will display the predicted amount of time before the vote begins.
</blockquote>
<blockquote>
<h4>/nextmap</h4>Displays the next map.
</blockquote>
<blockquote>
<h4>/votemap</h4>Initiates/restarts a votemap if the player has map changing priviledges in Procon.
</blockquote>
<blockquote>
<h4>enablevotemap</h4>Enables the votemap plugin if the player has map changing priviledges in Procon.
</blockquote>
<blockquote>
<h4>disablevotemap</h4>Disables the votemap plugin if the player has map changing priviledges in Procon.
</blockquote>
<h2>Settings</h2><br>
<h3>Display</h3><br>
<blockquote>
<h4>Enable Vote Banner?</h4>Is the banner (designed to get the attention of players) displayed before the first voting options list (First), before every map option display (All), or never displayed (disabled).
</blockquote>
<blockquote>
<h4>Show Gamemode in Voting Options?</h4> Determines if the shorthand notation for the gamemode is displayed in the voting options. This is most useful for those running mixed mode servers, especially if the same map is in the maplist with different gamemodes.
</blockquote>
<blockquote>
<h4>Show Nextmap Before Vote?</h4> If 'yes', then the default next map is shown before the vote options so people can decide if they want to vote or not.
</blockquote>
<blockquote>
<h4>Voting Options Interval</h4>Integer, in seconds, representing how often the map vote options are displayed once the voting poll opens.
</blockquote>
<blockquote>
<h4>Next Map Display Interval</h4>Integer, in seconds, representing how often the winning next map is displayed after the voting is over but the round hasn't ended yet. A value of [b]-1[/b] will disable nextmap messages.
</blockquote>
<blockquote>
<h4>Disable Vote Results Display?</h4>If 'yes' then the results of the vote will NOT be displayed. It will still say when voting ends or if the vote failed.
</blockquote>
<blockquote>
<h4>Uservote Prefix</h4>Prefix character for the voting number. !!! USE ONLY one character e.g /;@;*;#...
</blockquote>
<h3>Map Options</h3><br>
<blockquote>
<h4>Number of Vote Options</h4>Integer, between 2 and 8, representing the number of vote options to be displayed when a mapvote is called.
</blockquote>
<blockquote>
<h4>Exclude Current Map From Vote Options?</h4>If yes, the current map with be excluded from the next map voting options, so to not allow the same map to be played twice.
</blockquote>
<blockquote>
<h4>Sort the Maplist by:</h4>If 'Map Only' is selected, when a map is played all the gametypes for that map will be pushed to the end of the list. 'Map and Gametype' will only push that particular map and gametpye to the end of the list. 'Gametype Only' will push all maps with that gametype to the end of the list.
</blockquote>
<blockquote>
<h4>Randomness</h4>An integer between 0 and 10 representing the randomness of the map options for a vote. The algorithm changes the probability of each map and gamemode pair being selected as a vote option depending on how long ago it was last played.<br>
eg. If the maplist has 13 maps and number of vote options is set to 4. The maplist is sorted from played a long time ago (1) to played last map (13).<br>
<img border=""0"" src=""http://i.imgur.com/kCvSK.png""><br>
Randomness = 0: Will rotate through the maplist, only showing the maps that haven't been played in a long time. Players should end up playing every map in the cycle.<br><br>
<img border=""0"" src=""http://i.imgur.com/fZPGC.png""><br><br>
<img border=""0"" src=""http://i.imgur.com/CmULh.png""><br>
Randomness = 5: Maps that haven't been played in a long time will have the highest probablity and recently played maps will have the lowest probability of being selected as vote options.<br><br>
<img border=""0"" src=""http://i.imgur.com/fHtpu.png""><br><br>
<img border=""0"" src=""http://i.imgur.com/nlYTd.png""><br>
Randomness = 10: Every map has the same chance of being selected as an option. Players will tend to play the most popular maps repeatedly.<br><br>
</blockquote>
<h3>Voting</h3><br>
<blockquote>
<h4>Trigger</h4>If Automatic, the voting will be triggered automatically near the end of the round. If Manual, the voting will have to be triggered manually with the /votemap command.
</blockquote>
<blockquote>
<h4>Voting Threshold</h4>Integer, representing the minimum total number of votes that must cast for the highest voted map to become the nextmap. If no map reaches this threshold, then the map will just roll over to the next map in the maplist.
</blockquote>
<blockquote>
<h4>Voting Duration</h4>Integer, in seconds, representing the target length of time the voting poll is open for.
</blockquote>
<blockquote>
<h4>Time between Voting End and Round End (Conquest)</h4>Integer, in seconds, representing how long from the end of the round the voting will finish. In other words, at what time you want the voting to take place, mear seconds before the end of round or in the middle of round sometime.
</blockquote>
<blockquote>
<h4>Voting Start Time from Start of Round (Rush and Defuse (Elimination))</h4>Integer, representing the time when voting will start, in seconds from the start of the round. In rush, there is no way to predict when the round will finish with the current RCON information, as the status of MCOMs are unknown. So you must estimate how long the shortest rush round would take and start the vote a couple of minutes earlier in order to ensure a vote will take place.
</blockquote>
<blockquote>
<h4>Minimum Players for Start</h4>Integer, representing the minimum number for players required in the server at the time of vote for the vote to start.
</blockquote>
<blockquote>
<h4>Maximum Players for Start</h4>Integer, representing the maximum number for players allowed in the server at the time of vote for the vote to start.
</blockquote>
<h3>Xtras</h3><br>
<blockquote>
<h4>Debug Level</h4>Integer between 0 and 5, where 0 outputs no plugin debug messages, and 5 which outputs even the most mundane steps.
</blockquote>
<h2>Development</h2><br>
<h3>Known issues BF3/BF4</h3><br>
<ul>
<li>If the maplist is changed during a vote the winning map will not correctly be the next map.</li>
</ul>
<h3>Known issues BF4</h3><br>
<ul>
<li>For TDM the gameserver reports 4 teams. (There are only 2)</li>
</ul>
<h3>Future Work</h3><br>
<ul>
<li>Improve Auto Triggers</li>
<li>Improve map sorting algorithm</li>
<li>Add maplist change event</li>
</ul>
<h3>Change Log</h3><br>
<h4>1.5.6.0</h4><br>
<ul>
<li>NEW: New gamemode Chain Link (Dragon's Teeth DLC) is now supported.</li>
</ul>
<h4>1.5.5.1</h4><br>
<ul>
<li>Fix: added missing gamemode [CA] (CarrierAssaultSmall0) to vote options.</li>
</ul>
<h4>1.5.5.0</h4><br>
<ul>
<li>NEW: New gamemode Carrier Assault (Naval Strike DLC) is now supported</li>
<li>Fix: Next map display on round over scoreboard limited to last round</li>
<li>Fix: vote threshold display did not take vipvotes into account</li>
</ul>
<h4>1.5.4.2</h4><br>
<ul>
<li>Fix: Restarting a running vote did not properly reset the votes</li>
</ul>
<h4>1.5.4.1</h4><br>
<ul>
<li>NEW: Options (say, yell) to control the display of the next map/winning map</li>
<li>Fix: Added next map display when the scoreboard is displayed (THX to Hand of Shadow)</li>
<li>Fix: Changed Include/Exclude VIPs to Sync VIPs</li>
</ul>
<h4>1.5.4.0</h4><br>
<ul>
<li>NEW: Automatic Update Check</li>
<li>NEW: customizable votebanner</li>
<li>NEW: Show number of votes for each map</li>
<li>NEW: exclude current gamemode from vote options</li>
<li>NEW: time limit effective for all gamemodes (bf4 round time limit)</li>
<li>Fix: increase possible number of vote options</li>
<li>Fix: fixed error removing duplicates</li>
<li>Fix: Version Number</li>
</ul>
<h4>1.5.3</h4><br>
<ul>
<li>FIX: EXCEPTION CAUGHT IN: SetVoteStartAndEndTimes is now fixed (for all gamemodes)</li>
<li>FIX: Changed some messages to better reflect the current status</li>
<li>FIX: If the gameserver (for whatever reason) reports total-rounds = 0, votemap will asume total-rounds = 1. This should fix a bug some users are having. (votemap just not running, saying 'not next round')</li>
</ul>
<h4>1.5.2</h4><br>
<ul>
<li>FIX: EXCEPTION CAUGHT IN: SetVoteStartAndEndTimes is now fixed</li>
<li>FIX: increased max players to start to 70</li>
<li>NEW: Dynamic prefix vote options. THX to Hand of Shadow</li>
</ul>
<h4>1.5.1</h4><br>
<ul>
<li>FIX: Short Tags for BF4 GameModes. Thx BFTALON</li>
</ul>
<h4>1.5</h4><br>
<ul>
<li>NEW: BF4 Support</li>
</ul>
<h4>1.4.4</h4><br>
<ul>
<li>FIX: too many reservedSlots (ServerVIPs) requests</li>
<li>NEW: some things i forgot :D</li>
</ul>
<h4>1.4.3</h4><br>
<ul>
<li>Added: End Game Modes (CTF)</li>
</ul>
<h4>1.4.2</h4><br>
<ul>
<li>Fix: Public confirmation message was not updating correctly</li>
<li>Fix: Removal of duplicates in vote options was not working under certain circumstances</li>
</ul>
<h4>1.4.1</h4><br>
<ul>
<li>Added: Aftermath Modes (Scavenger)</li>
<li>Added: Option to enable/disable auto including ServerVIPs/ReservedSlots in VIP List</li>
</ul>
<h4>1.4.0</h4><br>
<ul>
<li>Added: VIP List</li>
<li>Added: VIP VoteCount</li>
<li>Fixed: show maps only once if they are double in maplist.</li>
<li>Fixed: GameModes</li>
</ul>
<h4>1.3.1</h4><br>
<ul>
<li>Fixed: /votemap to start a map vote.</li>
</ul>
<h4>1.3.0</h4><br>
<ul>
<li>Added: Yell announcement.</li>
<li>Added: In-game enable and disable.</li>
</ul>
<h4>1.2.3</h4><br>
<ul>
<li>Fixed: Mapnames fixed from patch.</li>
</ul>
<h4>1.2.2</h4><br>
<ul>
<li>Fixed: Maplist sort for 'Map Only' and 'Gametype Only'. Will still work on a better algorithm too.</li>
</ul>
<h4>1.2.1</h4><br>
<ul>
<li>Added: Information link with Ultimate Map Manager to ensure the voted map will be the next map if the maplist needs to change and it is still in the maplist.</li>
<li>Fixed: Remove current map bug.</li>
<li>Added: Improved map options display. Should reduce the chance of very long options.</li>
<li>Fixed: Gamemode should appear throughout the in-game message, if turned on.</li>
</ul>
<h4>1.2.0</h4><br>
<ul>
<li>Added: Ability to disable vote results from being displayed.</li>
<li>Added: Option to change the way the maplist is sorted.</li>
<li>Added: Option to display the nextmap before the vote.</li>
<li>Added: Option to set minimum and maximum player count limits for if the vote will take place.</li>
</ul>
<h4>1.1.5</h4><br>
<ul>
<li>Added: More debug messages</li>
<li>Fix: Serverinfo bug possibly =\</li>
<li>Change: Renamed to xVotemap. Delete old CxVotemap.</li>
</ul>
<h4>1.1.4</h4><br>
<ul>
<li>Fix: /votemap command now works on all rounds</li>
<li>Fix: Between rounds error bug.</li>
</ul>
<h4>1.1.3</h4><br>
<ul>
<li>Fix: Votemap starting too early.</li>
</ul>
<h4>1.1.2</h4><br>
<ul>
<li>Fix: Minimal changes</li>
</ul>
<h4>1.1.1</h4><br>
<ul>
<li>Fix: Several bugs that were in the new randomness code. A lot of console debug text has been added, most will be removed or suppressed when this version is proved stable.</li>
</ul>
<h4>1.1.0</h4><br>
<ul>
<li>Added: Randomness, a new algorithm to decide which maps are chosen to be vote options.</li>
<li>Added: Ability to disable votemap starting automatically.</li>
</ul>
<h4>1.0.1</h4><br>
<ul>
<li>Fixed: Tweaked various algorithms</li>
<li>Fixed: Squad rush bug</li>
</ul>
<h4>1.0.0</h4><br>
<ul>
<li>Added: Warning for incorrect vote command</li>
</ul>
<h4>0.0.8</h4><br>
<ul>
<li>Fix: Exclude current map</li>
<li>Fix: Change to rush start time estimate. Needs testing again.</li>
</ul>
<h4>0.0.7</h4><br>
<ul>
<li>Fix: Mixed-mode bug. Needs testing to check if it succeeded.</li>
<li>Added: Customizable number of vote options</li>
<li>Added: Option to display the gamemode in the vote options</li>
<li>Added: Admins with mapchanging privileges can initiate/restart the Votemap in-game with /votemap </li>
</ul>
<h4>0.0.6</h4><br>
<ul>
<li>Fix: Bug where the last map in the maplist would not be selected.</li>
<li>Added: /nextmap command</li>
</ul>
<h4>0.0.5</h4><br>
<ul>
<li>Fixed, Last round bug</li>
</ul>
<h4>0.0.4</h4><br>
<ul>
<li>Added, 'Exclude current map' as an option in the settings.</li>
<li>Fixed, xVotemap stopping due to a rush map being detected.</li>
</ul>
<h4>0.0.3</h4><br>
<ul>
<li>Changed the vote threshold to be compared to the total votes cast, rather than the winning map.</li>
<li>In the event of a draw, now, a random map out of the drawn maps will be chosen.</li>
<li>Added Rush and Deathmatch support, expect bugs, please report bugs and provide feedback.</li>
</ul>
<h4>0.0.2</h4><br>
<ul>
<li>Fix for vote banner not showing.</li>
</ul>
<h4>0.0.1</h4><br>
<ul>
<li>Initial Beta. Find all of the bugs! <img border=""0"" src=""http://i.imgur.com/88jZM.png"" width=""50"" height=""50""></li>
</ul>
";
}
public List<CPluginVariable> GetDisplayPluginVariables()
{
List<CPluginVariable> lstReturn = new List<CPluginVariable>();
lstReturn.Add(new CPluginVariable("Display|Enable Vote Banner?", "enum.VoteBanner(Disabled|First|All)", this.m_strEnableVoteBanner));
if (this.m_strEnableVoteBanner == "First" || this.m_strEnableVoteBanner == "All")
{
lstReturn.Add(new CPluginVariable("Display|Banner Type", "enum.VoteBannerType(Chat|Yell|Both)", this.m_strBannerType));
if (this.m_strBannerType == "Yell" || this.m_strBannerType == "Both")
{
lstReturn.Add(new CPluginVariable("Display|Banner Yell Duration (s)", this.m_iBannerYellDuration.GetType(), this.m_iBannerYellDuration));
}
lstReturn.Add(new CPluginVariable("Display|Vote Banner", typeof(string[]), this.VoteBanner.ToArray()));
lstReturn.Add(new CPluginVariable("Display|Vote Banner Yell", YellVoteBanner.GetType(), this.YellVoteBanner));
}
lstReturn.Add(new CPluginVariable("Display|Voting Options Interval (s)", this.m_iVotingOptionsInterval.GetType(), this.m_iVotingOptionsInterval));
lstReturn.Add(new CPluginVariable("Display|Show Nextmap Before Vote?", typeof(enumBoolYesNo), this.showNextMapBeforeVote));
lstReturn.Add(new CPluginVariable("Display|Next Map Display Interval (s)", this.m_iNextMapDisplayInterval.GetType(), this.m_iNextMapDisplayInterval));
lstReturn.Add(new CPluginVariable("Display|Say Next Map?", typeof(enumBoolYesNo), this.SayNextMap));
lstReturn.Add(new CPluginVariable("Display|Yell Next Map?", typeof(enumBoolYesNo), this.YellNextMap));
lstReturn.Add(new CPluginVariable("Display|Show Gamemode in Voting Options?", typeof(enumBoolYesNo), this.m_enumShowGamemode));
lstReturn.Add(new CPluginVariable("Display|Display Number of Votes for each Option", typeof(enumBoolYesNo), this.displayvotescount));
lstReturn.Add(new CPluginVariable("Display|Disable Vote Results Display?", typeof(enumBoolYesNo), this.disableVoteResults));
lstReturn.Add(new CPluginVariable("Display|Say Vote Results?", typeof(enumBoolYesNo), this.SayVoteResult));
lstReturn.Add(new CPluginVariable("Display|Yell Vote Results?", typeof(enumBoolYesNo), this.YellVoteResult));
lstReturn.Add(new CPluginVariable("Display|Confirm Vote publically?", typeof(enumBoolYesNo), this.confirmpub));
if (this.confirmpub == enumBoolYesNo.Yes)
lstReturn.Add(new CPluginVariable("Display|Message to be displayed", this.pubconfirmmsg.GetType(), this.pubconfirmmsg));
lstReturn.Add(new CPluginVariable("Map Options|Number of Vote Options", this.m_iNumOfMapOptions.GetType(), this.m_iNumOfMapOptions));
lstReturn.Add(new CPluginVariable("Map Options|Exclude Current Map From Vote Options?", typeof(enumBoolYesNo), this.m_enumExcludeCurrMap));
lstReturn.Add(new CPluginVariable("Map Options|Exclude Current Mode From Vote Options?", typeof(enumBoolYesNo), this.m_enumExcludeCurrMode));
lstReturn.Add(new CPluginVariable("Map Options|Sort the Maplist by:", "enum.MapGametype(Map Only|Map and Gametype|Gametype Only)", this.mapSortSettings));
lstReturn.Add(new CPluginVariable("Map Options|Randomness", this.m_iRandomness.GetType(), this.m_iRandomness));
lstReturn.Add(new CPluginVariable("Voting|Trigger", "enum.VotingTrigger(Manual|Automatic)", this.m_strTrigger));
lstReturn.Add(new CPluginVariable("Voting|Uservote prefix", this.m_strHosVotePrefix.GetType(), this.m_strHosVotePrefix));
lstReturn.Add(new CPluginVariable("Voting|Votes Threshold (votes)", this.m_iVoteThres.GetType(), this.m_iVoteThres));
lstReturn.Add(new CPluginVariable("Voting|Voting Duration (s)", this.m_iVotingDuration.GetType(), this.m_iVotingDuration));
lstReturn.Add(new CPluginVariable("Voting|Time between Voting End and Round End (s) (Conquest)", this.m_iStopVoteTime.GetType(), this.m_iStopVoteTime));
lstReturn.Add(new CPluginVariable("Voting|Voting Start Time from Start of Round (s) (Carrier Assault)", this.m_iCalVoteStartTime.GetType(), this.m_iCalVoteStartTime));
lstReturn.Add(new CPluginVariable("Voting|Voting Start Time from Start of Round (s) (Rush and Defuse (Elimination))", this.m_iRushVoteStartTime.GetType(), this.m_iRushVoteStartTime));
lstReturn.Add(new CPluginVariable("Voting|Minimum Players for Start", this.minimumPlayers.GetType(), this.minimumPlayers));
lstReturn.Add(new CPluginVariable("Voting|Maximum Players for Start", this.maximumPlayers.GetType(), this.maximumPlayers));
lstReturn.Add(new CPluginVariable("Xtras|Debug Level", this.m_iDebugLevel.GetType(), this.m_iDebugLevel));
lstReturn.Add(new CPluginVariable("Xtras|Vip list", typeof(string[]), this.vips.ToArray()));
lstReturn.Add(new CPluginVariable("Xtras|Sync ServerVIPs/ReservedSlots", typeof(enumBoolYesNo), this.syncreservedslots));
lstReturn.Add(new CPluginVariable("Xtras|VIP Vote Count", vipvotecount.GetType(), vipvotecount));
lstReturn.Add(new CPluginVariable("Xtras|Check for Update?", this.Check4Update.GetType(), this.Check4Update));
return lstReturn;
}
public List<CPluginVariable> GetPluginVariables()
{
List<CPluginVariable> lstReturn = new List<CPluginVariable>();
lstReturn.Add(new CPluginVariable("Enable Vote Banner?", "enum.VoteBanner(Disabled|First|All)", this.m_strEnableVoteBanner));
lstReturn.Add(new CPluginVariable("Banner Type", "enum.VoteBannerType(Chat|Yell|Both)", this.m_strBannerType));
lstReturn.Add(new CPluginVariable("Banner Yell Duration (s)", this.m_iBannerYellDuration.GetType(), this.m_iBannerYellDuration));
lstReturn.Add(new CPluginVariable("Vote Banner", typeof(string[]), this.VoteBanner.ToArray()));
lstReturn.Add(new CPluginVariable("Vote Banner Yell", YellVoteBanner.GetType(), this.YellVoteBanner));
lstReturn.Add(new CPluginVariable("Voting Options Interval (s)", this.m_iVotingOptionsInterval.GetType(), this.m_iVotingOptionsInterval));
lstReturn.Add(new CPluginVariable("Show Nextmap Before Vote?", typeof(enumBoolYesNo), this.showNextMapBeforeVote));
lstReturn.Add(new CPluginVariable("Next Map Display Interval (s)", this.m_iNextMapDisplayInterval.GetType(), this.m_iNextMapDisplayInterval));
lstReturn.Add(new CPluginVariable("Say Next Map?", typeof(enumBoolYesNo), this.SayNextMap));
lstReturn.Add(new CPluginVariable("Yell Next Map?", typeof(enumBoolYesNo), this.YellNextMap));
lstReturn.Add(new CPluginVariable("Show Gamemode in Voting Options?", typeof(enumBoolYesNo), this.m_enumShowGamemode));
lstReturn.Add(new CPluginVariable("Display Number of Votes for each Option", typeof(enumBoolYesNo), this.displayvotescount));
lstReturn.Add(new CPluginVariable("Disable Vote Results Display?", typeof(enumBoolYesNo), this.disableVoteResults));
lstReturn.Add(new CPluginVariable("Say Vote Results?", typeof(enumBoolYesNo), this.SayVoteResult));
lstReturn.Add(new CPluginVariable("Yell Vote Results?", typeof(enumBoolYesNo), this.YellVoteResult));
lstReturn.Add(new CPluginVariable("Confirm Vote publically?", typeof(enumBoolYesNo), this.confirmpub));
lstReturn.Add(new CPluginVariable("Message to be displayed", this.pubconfirmmsg.GetType(), this.pubconfirmmsg));
lstReturn.Add(new CPluginVariable("Number of Vote Options", this.m_iNumOfMapOptions.GetType(), this.m_iNumOfMapOptions));
lstReturn.Add(new CPluginVariable("Exclude Current Map From Vote Options?", typeof(enumBoolYesNo), this.m_enumExcludeCurrMap));
lstReturn.Add(new CPluginVariable("Exclude Current Mode From Vote Options?", typeof(enumBoolYesNo), this.m_enumExcludeCurrMode));
lstReturn.Add(new CPluginVariable("Sort the Maplist by:", "enum.MapGametype(Map Only|Map and Gametype|Gametype Only)", this.mapSortSettings));
lstReturn.Add(new CPluginVariable("Randomness", this.m_iRandomness.GetType(), this.m_iRandomness));
lstReturn.Add(new CPluginVariable("Trigger", "enum.VotingTrigger(Manual|Automatic)", this.m_strTrigger));
lstReturn.Add(new CPluginVariable("Uservote prefix", this.m_strHosVotePrefix.GetType(), this.m_strHosVotePrefix));
lstReturn.Add(new CPluginVariable("Votes Threshold (votes)", this.m_iVoteThres.GetType(), this.m_iVoteThres));
lstReturn.Add(new CPluginVariable("Voting Duration (s)", this.m_iVotingDuration.GetType(), this.m_iVotingDuration));
lstReturn.Add(new CPluginVariable("Time between Voting End and Round End (s) (Conquest)", this.m_iStopVoteTime.GetType(), this.m_iStopVoteTime));
lstReturn.Add(new CPluginVariable("Voting Start Time from Start of Round (s) (Carrier Assault)", this.m_iCalVoteStartTime.GetType(), this.m_iCalVoteStartTime));
lstReturn.Add(new CPluginVariable("Voting Start Time from Start of Round (s) (Rush and Defuse (Elimination))", this.m_iRushVoteStartTime.GetType(), this.m_iRushVoteStartTime));
lstReturn.Add(new CPluginVariable("Minimum Players for Start", this.minimumPlayers.GetType(), this.minimumPlayers));
lstReturn.Add(new CPluginVariable("Maximum Players for Start", this.maximumPlayers.GetType(), this.maximumPlayers));
lstReturn.Add(new CPluginVariable("Debug Level", this.m_iDebugLevel.GetType(), this.m_iDebugLevel));
lstReturn.Add(new CPluginVariable("Vip list", typeof(string[]), this.vips.ToArray()));
lstReturn.Add(new CPluginVariable("Sync ServerVIPs/ReservedSlots", typeof(enumBoolYesNo), this.syncreservedslots));
lstReturn.Add(new CPluginVariable("VIP Vote Count", vipvotecount.GetType(), vipvotecount));
lstReturn.Add(new CPluginVariable("Check for Update?", this.Check4Update.GetType(), this.Check4Update));
return lstReturn;
}
public void SetPluginVariable(string strVariable, string strValue)
{
int iValue = 0;
if (strVariable.CompareTo("Sync ServerVIPs/ReservedSlots") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.syncreservedslots = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Say Next Map?") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.SayNextMap = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Yell Next Map?") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.YellNextMap = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Say Vote Results?") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.SayVoteResult = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Yell Vote Results?") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.YellVoteResult = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Confirm Vote publically?") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.confirmpub = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Message to be displayed") == 0)
{
this.pubconfirmmsg = strValue;
}
else if (strVariable.CompareTo("Exclude Current Map From Vote Options?") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.m_enumExcludeCurrMap = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Exclude Current Mode From Vote Options?") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.m_enumExcludeCurrMode = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Randomness") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iRandomness = iValue;
if (iValue < 0)
{
this.m_iRandomness = 0;
}
else if (iValue > 10)
{
this.m_iRandomness = 10;
}
}
else if (strVariable.CompareTo("Sort the Maplist by:") == 0)
{
this.mapSortSettings = strValue;
}
else if (strVariable.CompareTo("Number of Vote Options") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iNumOfMapOptions = iValue;
if (iValue < 2)
{
this.m_iNumOfMapOptions = 2;
}
else if (iValue > 14)
{
this.m_iNumOfMapOptions = 14;
}
}
else if (strVariable.CompareTo("Voting Duration (s)") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iVotingDuration = iValue;
if (iValue < 30)
{
this.m_iVotingDuration = 30;
}
}
else if (strVariable.CompareTo("Time between Voting End and Round End (s) (Conquest)") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iStopVoteTime = iValue;
if (iValue < 90)
{
this.m_iStopVoteTime = 90;
}
}
else if (strVariable.CompareTo("Voting Options Interval (s)") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iVotingOptionsInterval = iValue;
if (iValue < 10)
{
this.m_iVotingOptionsInterval = 10;
}
}
if (strVariable.CompareTo("Show Nextmap Before Vote?") == 0 && Enum.IsDefined(typeof(enumBoolYesNo), strValue) == true)
{
this.showNextMapBeforeVote = (enumBoolYesNo)Enum.Parse(typeof(enumBoolYesNo), strValue);
}
else if (strVariable.CompareTo("Next Map Display Interval (s)") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iNextMapDisplayInterval = iValue;
if (iValue < -1)
{
this.m_iNextMapDisplayInterval = -1;
}
}
else if (strVariable.CompareTo("Trigger") == 0)
{
this.m_strTrigger = strValue;
}
else if (strVariable.CompareTo("Votes Threshold (votes)") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iVoteThres = iValue;
if (iValue < 1)
{
this.m_iVoteThres = 0;
}
else if (iValue > 64)
{
this.m_iVoteThres = 64;
}
}
else if (strVariable.CompareTo("Voting Start Time from Start of Round (s) (Rush and Defuse (Elimination))") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iRushVoteStartTime = iValue;
if (iValue < 1)
{
this.m_iRushVoteStartTime = 1;
}
}
else if (strVariable.CompareTo("Voting Start Time from Start of Round (s) (Carrier Assault)") == 0 && int.TryParse(strValue, out iValue) == true)
{
this.m_iCalVoteStartTime = iValue;
if (iValue < 1)
{
this.m_iCalVoteStartTime = 1;