|
4 | 4 | -- add_ace Adminrole taz.admin allow |
5 | 5 | -- add_principal identifier.steam:[hexid] Adminrole |
6 | 6 |
|
7 | | -local Owner = "taz.owner" |
8 | | -local Management = "taz.management" |
9 | | -local Senior_Admin = "taz.snradmin" |
10 | | -local Admin = "taz.admin" |
11 | | -local Moderator = "taz.mod" |
12 | | -local Tmod = "taz.tmod" |
13 | | - |
14 | 7 | AddEventHandler('chatMessage', function(source, Name, Msg) |
15 | 8 | args = stringsplit(Msg, " ") |
16 | 9 | CancelEvent() |
@@ -42,3 +35,36 @@ function stringsplit(inputstr, sep) |
42 | 35 | end |
43 | 36 | return t |
44 | 37 | end |
| 38 | + |
| 39 | + |
| 40 | +-- version checker |
| 41 | +local CurrentVersion = '1.3' |
| 42 | +local GithubResourceName = 'roleschat' |
| 43 | +local githubacct = "Tazi0" |
| 44 | +local resourceName = GetCurrentResourceName() |
| 45 | +local versionurl = "https://raw.githubusercontent.com/"..githubacct.."/"..GithubResourceName.."/master/VERSION" |
| 46 | +local changesurl = "https://raw.githubusercontent.com/"..githubacct.."/"..GithubResourceName.."/master/CHANGES" |
| 47 | + |
| 48 | +PerformHttpRequest(versionurl, function(Error, NewestVersion, Header) |
| 49 | + PerformHttpRequest(changesurl, function(Error, Changes, Header) |
| 50 | + print('\n') |
| 51 | + print('====================================================================') |
| 52 | + print('') |
| 53 | + print('ChatRoles ('..resourceName..')') |
| 54 | + print('') |
| 55 | + print('Current Version: ' .. CurrentVersion) |
| 56 | + print('Newest Version: ' .. NewestVersion) |
| 57 | + print('you can download the newest version at: \n https://github.com/'..githubacct.."/"..GithubResourceName.."/") |
| 58 | + io.write("") |
| 59 | + print('Changelog: \n' .. Changes) |
| 60 | + print('') |
| 61 | + if CurrentVersion ~= NewestVersion then |
| 62 | + print('====================================================================') |
| 63 | + else |
| 64 | + print('===================') |
| 65 | + print('=== Up to date! ===') |
| 66 | + print('===================') |
| 67 | + end |
| 68 | + print('\n') |
| 69 | +end) |
| 70 | +end) |
0 commit comments