├── .hgignore
├── README.md
├── SMDJ Web Interface
├── admin.php
├── black.css
├── config.php
├── counter-strike.css
├── default.css
├── footer.php
├── header.php
├── help.php
├── index.php
├── player_mp3_maxi.swf
├── player_mp3_multi.swf
├── playlist.php
├── shuffle.php
├── tf2.css
├── tf2build.eot
├── tf2build.ttf
├── tf2secondary.eot
└── tf2secondary.ttf
├── SMDJ_Web_Interface.zip
├── anticapslock.txt
├── anyteleporter.txt
├── arena_reloaded.txt
├── automatic_steam_update.txt
├── backpack-tf.txt
├── backpack_viewer.txt
├── botmanager-names.txt
├── botmanager-randomdifficulty.txt
├── botmanager.txt
├── chatcolors.txt
├── chatcolorsclantagmodule.txt
├── chatcolorsdistinguishmodule.txt
├── chatcolorsmysqlmodule.txt
├── chatcolorstogglemodule.txt
├── citybans.txt
├── configs
└── custom-chatcolors.cfg
├── connect_method.txt
├── convarfaker.txt
├── data
└── backpack_viewer.txt
├── endless_ctf.txt
├── enhanced_items.txt
├── game_desc_override.txt
├── gamedata
├── arena-reloaded.games.txt
└── detect_os.games.txt
├── humiliationconditions.txt
├── humiliationglow.txt
├── itemserver.txt
├── kartify.txt
├── motd_text_http.txt
├── mutecheck.txt
├── namechange_fix.txt
├── namelock.txt
├── no_enemy_in_spawn.txt
├── player_analytics.txt
├── plugins
├── anticapslock.smx
├── anyteleporter.smx
├── arena_reloaded.smx
├── auto_steam_update.smx
├── backpack-tf.smx
├── backpack_viewer.smx
├── botmanager-names.smx
├── botmanager-randomdifficulty.smx
├── botmanager.smx
├── citybans.smx
├── connect_method.smx
├── convarfaker.smx
├── custom-chatcolors-clantag.smx
├── custom-chatcolors-distinguish.smx
├── custom-chatcolors-mysql.smx
├── custom-chatcolors-toggle.smx
├── custom-chatcolors.smx
├── endless_ctf.smx
├── enhanced_items.smx
├── humiliationconditions.smx
├── humiliationglow.smx
├── itemserver.smx
├── kartify.smx
├── motd_text_http.smx
├── mutecheck.smx
├── namechange_fix.smx
├── namelock.smx
├── no_enemy_in_spawn.smx
├── player_analytics.smx
├── rainbowize.smx
├── really_no_weapons.smx
├── short_circuit_nerf.smx
├── shutdowncountdown.smx
├── smac_autodemo.smx
├── smdj.smx
├── st_gamedesc_override.smx
├── steamrep_checker.smx
├── sticky_jumper_bombz.smx
├── teamscores.smx
├── tidykick.smx
├── unrestricted_fov.smx
├── votekick_switcher.smx
└── votescramble.smx
├── rainbowize.txt
├── really_no_weapons.txt
├── scripting
├── anticapslock.sp
├── anyteleporter.sp
├── arena_reloaded.sp
├── auto_steam_update.sp
├── backpack-tf.sp
├── backpack_viewer.sp
├── botmanager-names.sp
├── botmanager-randomdifficulty.sp
├── botmanager.sp
├── citybans.sp
├── connect_method.sp
├── convarfaker.sp
├── custom-chatcolors-clantag.sp
├── custom-chatcolors-distinguish.sp
├── custom-chatcolors-mysql.sp
├── custom-chatcolors-toggle.sp
├── custom-chatcolors.sp
├── endless_ctf.sp
├── enhanced_items.sp
├── humiliationconditions.sp
├── humiliationglow.sp
├── include
│ ├── advanced_motd.inc
│ ├── botmanager.inc
│ ├── bytebuffer.inc
│ ├── ccc.inc
│ ├── morecolors.inc
│ ├── player_analytics.inc
│ ├── smdj.inc
│ └── tidykick.inc
├── itemserver.sp
├── kartify.sp
├── mckayupdater.sp
├── motd_text_http.sp
├── mutecheck.sp
├── namechange_fix.sp
├── namelock.sp
├── no_enemy_in_spawn.sp
├── player_analytics.sp
├── rainbowize.sp
├── really_no_weapons.sp
├── short_circuit_nerf.sp
├── shutdowncountdown.sp
├── smac_autodemo.sp
├── smdj.sp
├── st_gamedesc_override.sp
├── steamrep_checker.sp
├── sticky_jumper_bombz.sp
├── teamscores.sp
├── tidykick.sp
├── unrestricted_fov.sp
├── votekick_switcher.sp
└── votescramble.sp
├── short_circuit_nerf.txt
├── shutdowncountdown.txt
├── smac-autodemo.txt
├── smdj_version.txt
├── steamrep.txt
├── sticky_jumper_bombz.txt
├── teamscores.txt
├── tidykick.txt
├── translations
├── backpack-tf.phrases.txt
├── da
│ └── backpack-tf.phrases.txt
├── de
│ └── backpack-tf.phrases.txt
├── es
│ └── backpack-tf.phrases.txt
├── nl
│ └── backpack-tf.phrases.txt
├── pl
│ └── backpack-tf.phrases.txt
└── ru
│ └── backpack-tf.phrases.txt
├── unrestricted_fov.txt
├── votekick_switcher.txt
└── votescramble.txt
/.hgignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DoctorMcKay/sourcemod-plugins/6c7ffca2b580b3b313ee2027ac4dd12b7fad226a/.hgignore
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Public SourceMod Plugins
2 |
3 | This repository contains all of the SourceMod plugins that I have [publicly released](http://www.doctormckay.com/projects.php).
4 |
5 | * [SourceMod](http://www.sourcemod.net)
6 | * [AlliedModders](https://forums.alliedmods.net)
--------------------------------------------------------------------------------
/SMDJ Web Interface/admin.php:
--------------------------------------------------------------------------------
1 | Incorrect password specified.
'; }
11 | echo 'Please provide your password below.
';
12 | echo '
';
16 | require('./footer.php');
17 | exit;
18 | }
19 | if(isset($_GET['upload'])) {
20 | require('./header.php');
21 | if($_GET['error'] == 1) { echo 'The song title is required.
'; }
22 | if($_GET['error'] == 2) { echo 'Filetype must be MP3 (given ' . $_GET['type'] . ')
'; }
23 | if($_GET['error'] == 3) { echo 'Unable to connect to the FTP server.
'; }
24 | if($_GET['error'] == 4) { echo 'Unable to upload the file to the FTP server.
'; }
25 | if($_GET['errorcode']) { echo 'There was an error while uploading the file. Error code: ' . $_GET['errorcode'] . '
'; }
26 | echo 'Upload A Song
';
27 | echo '
';
35 | echo 'Back To Management';
36 | require('./footer.php');
37 | exit;
38 | }
39 | if(isset($_GET['deleteall'])) {
40 | require('./header.php');
41 | echo 'Delete All Songs
';
42 | echo 'WARNING! You are about to nuke your database! All your songs will be permanently cleared.
';
43 | echo 'If you understand what you are doing and want to continue, click the "NUKE!" button below. Otherwise, click the Return link.
';
44 | echo '
';
47 | echo 'Return';
48 | require('./footer.php');
49 | exit;
50 | }
51 | if($_POST['nuke']) {
52 | mysql_query('TRUNCATE TABLE `smdj_songs`');
53 | header('location: admin.php');
54 | exit;
55 | }
56 | if($_POST['submit']) {
57 | if($_POST['do'] == 'upload') {
58 | if(empty($_POST['title'])) {
59 | header('location: admin.php?upload&error=1');
60 | exit;
61 | }
62 | if($_FILES['file']['error'] > 0) {
63 | header('location: admin.php?upload&errorcode=' . $_FILES['file']['error']);
64 | exit;
65 | }
66 | if($_FILES['file']['type'] != 'audio/mp3' && $_FILES['file']['type'] != 'audio/mpeg') {
67 | header('location: admin.php?upload&error=2&type=' . urlencode($_FILES['file']['type']));
68 | exit;
69 | }
70 | if($uploadmethod == 'local') {
71 | move_uploaded_file($_FILES['file']['tmp_name'], './music/' . $_FILES['file']['name']);
72 | $url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
73 | $url = substr($url, 0, strlen($url) - 10);
74 | $url = $url . '/music/' . $_FILES['file']['name'];
75 | }
76 | if($uploadmethod == 'ftp') {
77 | $ftpcon = ftp_connect($ftp['host']);
78 | $login = ftp_login($ftpcon, $ftp['user'], $ftp['pass']);
79 | if(!$ftpcon || !$login) {
80 | header('location: admin.php?upload&error=3');
81 | exit;
82 | }
83 | $upload = ftp_put($ftpcon, $ftp['path'] . '/' . $_FILES['file']['name'], $_FILES['file']['tmp_name'], FTP_BINARY);
84 | if(!$upload) {
85 | header('location: admin.php?upload&error=1');
86 | exit;
87 | }
88 | ftp_close($ftpcon);
89 | $url = 'http://' . $ftp['http'] . '/' . $_FILES['file']['name'];
90 | }
91 | $q = mysql_fetch_array(mysql_query("SELECT * FROM `smdj_songs` ORDER BY id DESC"));
92 | $id = ++$q['id'];
93 | mysql_query("INSERT INTO `smdj_songs` (id, title, url) VALUES ('$id', '" . mysql_real_escape_string($_POST['title']) . "', '$url')");
94 | header('location: admin.php?done=1');
95 | exit;
96 | } elseif($_POST['do'] == 'add') {
97 | if(empty($_POST['title']) || empty($_POST['url'])) {
98 | header('location: admin.php?error=1');
99 | exit;
100 | }
101 | $q = mysql_fetch_array(mysql_query("SELECT * FROM `smdj_songs` ORDER BY id DESC"));
102 | $id = ++$q['id'];
103 | mysql_query("INSERT INTO `smdj_songs` (id, title, url) VALUES ('$id', '" . mysql_real_escape_string($_POST['title']) . "', '" . mysql_real_escape_string($_POST['url']) . "')");
104 | header('location: admin.php?done=1');
105 | exit;
106 | } elseif($_POST['do'] == 'modify') {
107 | if(empty($_POST['title']) || empty($_POST['url'])) {
108 | header('location: admin.php?error=1&id=' . $_POST['id']);
109 | exit;
110 | }
111 | mysql_query("UPDATE `smdj_songs` SET title = '" . mysql_real_escape_string($_POST['title']) . "', url = '" . mysql_real_escape_string($_POST['url']) . "' WHERE id = '" . mysql_real_escape_string($_POST['id']) . "'");
112 | header('location: admin.php?done=2');
113 | exit;
114 | } elseif($_POST['delete']) {
115 | mysql_query("DELETE FROM `smdj_songs` WHERE id = '" . mysql_real_escape_string($_POST['delete']) . "'");
116 | header('location: admin.php?done=3');
117 | exit;
118 | }
119 | }
120 | require('./header.php');
121 | if($_GET['error'] == 1) { echo 'The song title and MP3 URL are required.
'; }
122 | if($_GET['done'] == 1) { echo 'The song has been added.
'; }
123 | if($_GET['done'] == 2) { echo 'The song has been updated.
'; }
124 | if($_GET['done'] == 3) { echo 'The song has been deleted.
'; }
125 | $version_check = file_get_contents('https://bitbucket.org/Doctor_McKay/public-plugins/raw/default/smdj_version.txt');
126 | if($version_check !== false && $version_check != SMDJ_VERSION) echo 'The SMDJ Web Interface is out-of-date. You are running v' . SMDJ_VERSION . ', and the most recent version is v' . $version_check . '
';
127 | if($_GET['id']) {
128 | if(!mysql_num_rows($query = mysql_query("SELECT * FROM `smdj_songs` WHERE id = '" . mysql_real_escape_string($_GET['id']) . "'"))) {
129 | echo 'Invalid song ID!';
130 | } else {
131 | $query = mysql_fetch_array($query);
132 | echo '' . $query['title'] . '
';
133 | echo '';
142 | echo 'Be sure to include the protocol (i.e. http://
) in the URL!
';
143 | echo '
';
147 | echo 'Return To Song List';
148 | }
149 | } else {
150 | echo 'Plugin Config Variables: | ';
151 | echo 'smdj_auth_token | "' . md5(sha1($config['pass'])) . '" |
';
152 | echo 'smdj_url | "http://' . $_SERVER['HTTP_HOST'] . str_replace('/admin.php', '', $_SERVER['SCRIPT_NAME']) . '" |
';
153 | echo '
';
154 | echo 'Edit A Song
';
155 | $query = mysql_query("SELECT * FROM `smdj_songs` ORDER BY title ASC");
156 | while($arr = mysql_fetch_array($query)) {
157 | echo '' . $arr['title'] . '
';
158 | }
159 | echo 'Add A Song
';
160 | echo 'Upload A Song
';
161 | echo '';
169 | echo 'Be sure to include the protocol (i.e. http://
) in the URL!
';
170 | echo 'Return To Front-End
';
171 | echo 'Delete All Songs
';
172 | }
173 | require('./footer.php');
174 | ?>
--------------------------------------------------------------------------------
/SMDJ Web Interface/black.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 |
3 | body {
4 | font-family:Verdana, Arial, sans-serif;
5 | font-size:14px;
6 | text-align:center;
7 | background-color:#000000;
8 | color:#FFFFFF;
9 | }
10 |
11 | div#footer {
12 | font-size:10px;
13 | margin-top:40px;
14 | }
15 |
16 | a {
17 | color:#FFFFFF;
18 | text-decoration:underline;
19 | }
20 |
21 | a:hover {
22 | text-decoration:none;
23 | }
24 |
25 | a:active {
26 | text-decoration:underline;
27 | }
28 |
29 | table {
30 | margin:auto;
31 | }
32 |
33 | td {
34 | text-align:left;
35 | }
36 |
37 | th {
38 | font-family:Verdana, Arial, sans-serif;
39 | font-weight:bold;
40 | }
41 |
42 | .success {
43 | width:90%;
44 | font-weight:bold;
45 | border:2px solid #00FF00;
46 | border-radius:10px;
47 | padding:5px;
48 | margin:auto;
49 | }
50 |
51 | .error {
52 | width:90%;
53 | font-weight:bold;
54 | border:2px solid #FF0000;
55 | border-radius:10px;
56 | padding:5px;
57 | margin:auto;
58 | }
59 |
60 | .right {
61 | text-align:right;
62 | }
--------------------------------------------------------------------------------
/SMDJ Web Interface/config.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/SMDJ Web Interface/counter-strike.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 |
3 | body {
4 | font-family:Calibri, Candara, Segoe, Geneva, Tahoma, Arial, sans-serif;
5 | font-size:14px;
6 | text-align:center;
7 | background-color:#003300;
8 | color:#FFFFFF;
9 | }
10 |
11 | div#footer {
12 | font-size:10px;
13 | margin-top:40px;
14 | }
15 |
16 | a {
17 | color:#FFFFFF;
18 | text-decoration:underline;
19 | }
20 |
21 | a:hover {
22 | text-decoration:none;
23 | }
24 |
25 | a:active {
26 | text-decoration:underline;
27 | }
28 |
29 | table {
30 | margin:auto;
31 | }
32 |
33 | td {
34 | text-align:left;
35 | }
36 |
37 | th {
38 | font-family:Calibri, Candara, Segoe, Geneva, Tahoma, Arial, sans-serif;
39 | font-weight:bold;
40 | }
41 |
42 | .success {
43 | width:90%;
44 | font-weight:bold;
45 | border:2px solid #00FF00;
46 | border-radius:10px;
47 | padding:5px;
48 | margin:auto;
49 | }
50 |
51 | .error {
52 | width:90%;
53 | font-weight:bold;
54 | border:2px solid #FF0000;
55 | border-radius:10px;
56 | padding:5px;
57 | margin:auto;
58 | }
59 |
60 | .right {
61 | text-align:right;
62 | }
--------------------------------------------------------------------------------
/SMDJ Web Interface/default.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 |
3 | body {
4 | font-family:Verdana, Arial;
5 | font-size:14px;
6 | text-align:center;
7 | }
8 |
9 | div#footer {
10 | color:#666666;
11 | font-size:10px;
12 | margin-top:40px;
13 | }
14 |
15 | table {
16 | margin:auto;
17 | }
18 |
19 | td {
20 | text-align:left;
21 | }
22 |
23 | th {
24 | font-family:Verdana, Arial, sans-serif;
25 | font-weight:bold;
26 | }
27 |
28 | .success {
29 | width:90%;
30 | font-weight:bold;
31 | border:2px solid #00FF00;
32 | border-radius:10px;
33 | padding:5px;
34 | margin:auto;
35 | }
36 |
37 | .error {
38 | width:90%;
39 | font-weight:bold;
40 | border:2px solid #FF0000;
41 | border-radius:10px;
42 | padding:5px;
43 | margin:auto;
44 | }
45 |
46 | .right {
47 | text-align:right;
48 | }
--------------------------------------------------------------------------------
/SMDJ Web Interface/footer.php:
--------------------------------------------------------------------------------
1 |
2 |