Advertisement
intersys

Rcon Tracker

Feb 16th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.58 KB | None | 0 0
  1. ;;;;Dialog;;;;
  2.  
  3. alias RTrack $iif(!$dialog(RTrack),dialog -m RTrack RTrack,echo -a 04Error! 14The dialog already open ...)
  4. dialog RTrack {
  5. title "Rcon Tracker"
  6. size -1 -1 253 330
  7. option dbu
  8. text "Rcon Tracker By interSys", 1, 87 3 80 8, disable center
  9. text "SteamID:", 2, 10 22 26 8, center
  10. edit "", 3, 38 21 75 10
  11. button "Search", 4, 114 21 50 10
  12. text "Previous Nicknames", 5, 16 62 55 8, center
  13. list 6, 8 73 76 72, size vsbar
  14. edit "SteamID Status", 7, 10 43 156 10, disable read center
  15. text "Previous ips", 8, 102 62 44 8, center
  16. list 9, 86 73 76 72, size vsbar
  17. button "Remove all the tracks", 10, 8 148 236 10
  18. text "Date And Time", 12, 180 62 39 8, center
  19. list 13, 165 73 76 72, size vsbar
  20. box "", 14, 4 14 166 42
  21. box "", 15, 4 55 245 109
  22. box "Blacklist Panel Control", 16, 4 167 245 119
  23. list 17, 8 195 188 70, size
  24. text "SteamID:", 11, 9 180 26 8, center
  25. edit "", 18, 38 178 75 10
  26. button "Search", 19, 118 178 39 10
  27. button "Add Blacklist", 20, 198 196 46 12
  28. button "Remove Blacklist", 21, 198 215 47 12
  29. button "Clear Blacklist", 23, 198 234 47 12
  30. button "Show all Blacklist", 24, 9 269 76 12
  31. button "Clear Blacklist Window", 25, 88 269 76 12
  32. button "Clear windows", 26, 88 33 76 9
  33. button "Open tracks file", 27, 10 33 76 9
  34. box "Search steamid by nick/ip", 28, 171 14 78 42
  35. edit "", 29, 174 23 73 10
  36. button "Search", 30, 174 34 73 9
  37. edit "status win", 31, 174 44 73 10, read autohs center
  38. box "Rcon Command", 32, 4 286 245 40
  39. text "Send rcon command to the server:", 33, 8 299 84 8
  40. edit "", 34, 95 298 150 10
  41. button "Send ", 35, 10 312 234 10
  42. button "Open blacklist file", 22, 198 252 47 12
  43. }
  44.  
  45. on *:dialog:RTrack:*:*:{
  46. if ($devent == init) {
  47. showblist
  48. }
  49. if ($devent == sclick) {
  50. if ($did = 4) {
  51. did -r $dname 6,9,13,7
  52. if ($ini(Tracks.ini,$did($dname,3).text) == 0) { did -a $dname 6,7,9,13 The SteamID not found! }
  53. else {
  54. did -a $dname 7 Last connection from the user was in $readini(Tracks.ini,$did($dname,3).text,$+(Date,$var($+(%,$did($dname,3).text),1).value))) $&
  55. - $readini(Tracks.ini,$did($dname,3).text,$+(time,$var($+(%,$did($dname,3).text),1).value)))
  56. var %x = 1
  57. while (%x <= $var($+(%,$did($dname,3).text),1).value) {
  58. did -a $dname 6 $+(Nick,%x,:) $readini(Tracks.ini,$did($dname,3).text,$+(nick,%x))
  59. did -a $dname 9 $+(IP,%x,:) $readini(Tracks.ini,$did($dname,3).text,$+(IP,%x))
  60. did -a $dname 13 $+(%x,:) $readini(Tracks.ini,$did($dname,3).text,$+(Date,%x)) - $readini(Tracks.ini,$did($dname,3).text,$+(time,%x))
  61. inc %x
  62. }
  63. }
  64. }
  65. elseif ($did = 26) { did -r $dname 6,9,13,7 | did -a $dname 7 SteamID Status }
  66. elseif ($did = 10) { did -r $dname 6,9,13,7 | did -a $dname 7 All the tracks removed, You can find them in recycle bin for restore. | remove -b Tracks.ini }
  67. elseif ($did = 27) { run Tracks.ini }
  68. elseif ($did = 22) { run Blacklist.ini }
  69. elseif ($did = 19) {
  70. if ($ini(Blacklist.ini,$did($dname,18).text) == 1) {
  71. did -ra $dname 17 Nick: $readini(blacklist.ini,$did($dname,18).text,Nick) $chr(124) SteamID: $did($dname,18).text $chr(124) Reason: $readini(blacklist.ini,$did($dname,18).text,Reason)
  72. }
  73. else { did -ra $dname 17 SteamID Not Found! }
  74. }
  75. elseif ($did = 30) { did -ra $dname 31 $iif($srcsid($did($dname,29).text) != $false,$srcsid($did($dname,29).text),SteamID Not Found!) }
  76. elseif ($did = 20) {
  77. var %stmid = $$?="Enter a SteamID:" | if (%stmid) { var %nck = $$?="Enter a Nickname:" | if (%nck) { var %rsn = $$?="Enter a Reason:"
  78. writeini -n Blacklist.ini %stmid Nick %nck
  79. writeini -n Blacklist.ini %stmid Reason %rsn
  80. echo -ag $+(04,%nck,01) added to the blacklist with the steamid: $+(04,%stmid,01,$chr(44)) and the reason: $+(04,%rsn,01,.)
  81. }
  82. }
  83. }
  84. elseif ($did = 21) {
  85. if ($did($dname,17).sel) {
  86. noop $regex($did($dname,17).seltext,/SteamID:(.+)\|/i)
  87. .remini -n blacklist.ini $regml(1)
  88. echo -ag $+(04,$regml(1),01) has Removed Succsesfuly!
  89. showblist
  90. }
  91. elseif (!$did($dname,17)) {
  92. var %x = $$?="Enter the SteamID of the user:"
  93. if ($ini(blacklist.ini,%x)) { remini -n blacklist.ini %x | echo -ag $+(04,%x,01) has Removed Succsesfuly! | showblist }
  94. else { echo -ag $+(04,%x,01) has Not Found! }
  95. }
  96. }
  97. elseif ($did = 25) { did -ra $dname 17 }
  98. elseif ($did = 24) { showblist }
  99. elseif ($did = 35) { rcon $did(34) }
  100. }
  101. if ($devent == dclick) {
  102. if ($did = 6) { noop $regex($did($dname,6).seltext,/Nick([\d]):(.+)/i) | clipboard $regml(2) | echo -s $+(04,$cb,01) copied to you clipboard. }
  103. elseif ($did = 9) { noop $regex($did($dname,9).seltext,/IP([\d]):(.+)/i) | clipboard $regml(2) | echo -s $+(04,$cb,01) copied to you clipboard. }
  104. elseif ($did = 13) { noop $regex($did($dname,13).seltext,/([\d]):(.+)/i) | clipboard $regml(2) | echo -s $+(04,$cb,01) copied to you clipboard. }
  105. }
  106. }
  107. alias showblist {
  108. did -r RTrack 17
  109. var %i = 1
  110. while ($ini(blacklist.ini,%i)) {
  111. did -a RTrack 17 Nick: $readini(blacklist.ini,$ifmatch,Nick) $chr(124) SteamID: $ini(blacklist.ini,%i) $chr(124) Reason: $readini(blacklist.ini,$ifmatch,Reason)
  112. inc %i
  113. }
  114. }
  115. alias srcsid {
  116. if ($regex($read(tracks.ini,w,$+(*,$1,*)),/(.+?)=(.+)/g)) {
  117. var %x = 1
  118. while ($ini(tracks.ini,%x)) {
  119. if ($readini(tracks.ini,$ifmatch,$regml(1)) == $regml(2)) {
  120. return $ini(tracks.ini,%x)
  121. }
  122. inc %x
  123. }
  124. }
  125. else return $false
  126. }
  127. ;;;;Get Rcon Logs;;;;
  128.  
  129. alias challengercon {
  130. sockudp -k rcon $gettok(%iport,1,58) $gettok(%iport,2,58) ÿÿÿÿChallenge Rcon
  131. window @kills
  132. window @joined
  133. window @Console
  134. window @say
  135. }
  136. alias getchall {
  137. var %i = 1
  138. while ($mid($mid($1-,%i,1),1) != $null) {
  139. if ($v1 isnum) { var %c = %c $+ $v1 }
  140. inc %i
  141. }
  142. return %c
  143. }
  144. on *:udpread:rcon:{
  145. sockread &t | breplace &t 0 254 32 160
  146. tokenize 160 $bvar(&t,1-).text
  147. if ($getchall($1-) isnum) {
  148. set %challnum $getchall($1-)
  149. echo -a %challnum
  150. }
  151. rcon logaddress $ip 1337
  152. sockclose rcon
  153. }
  154.  
  155. alias rcon {
  156. sockudp rcon.cmd $gettok(%iport,1,58) $gettok(%iport,2,58) ÿÿÿÿrcon %challnum $+(",%SRcon,") $1-
  157. }
  158.  
  159. ;/startrcon <port>
  160. alias startrcon {
  161. sockudp -k rcon.cmd 1337
  162. challengercon
  163. }
  164. on *:UDPREAD:rcon.cmd:{
  165. sockread &x | breplace &x 0 254 32 160
  166. tokenize 160 $bvar(&x,1-).text
  167. var %action = $gettok($gettok($1-,3,34),1,32), %steamid = $gettok($gettok($1-,3,$asc(<)),1,$asc(>)), %userid = $gettok($gettok($1-,2,$asc(<)),1,$asc(>))
  168. var %nick = $gettok($gettok($1-,2,$asc(")),1,$asc(<)), %team = $iif($gettok($gettok($1-,4,$asc(<)),1,$asc(>)) == CT,12CT,4T)
  169.  
  170. if (%action == say) {
  171. aline @say Nick: %nick (USERID: %userid STEAMID: %steamid TEAM: %team $+ ) said: $gettok($1-,4,$asc("))
  172. }
  173. elseif (%action == killed) {
  174. aline @kills Nick: %nick (USERID: %userid STEAMID: %steamid TEAM: %team $+ ) killed $gettok($gettok($1-,4,$asc(")),1,$asc(<)) $&
  175. (USERID: $gettok($gettok($1-,5,$asc(<)),1,$asc(>)) STEAMID: $gettok($gettok($1-,6,$asc(<)),1,$asc(>)) $&
  176. TEAM: $iif($gettok($gettok($1-,7,$asc(<)),1,$asc(>)) == CT,12CT,4T) $+ ) Gun: $gettok($1-,6,$asc("))
  177. }
  178. elseif (%action == connected,) {
  179. noop $regex($1-,/address "(.+?):/i)
  180. aline @joined Nick: %nick (USERID: %userid STEAMID: %steamid TEAM: None) Connected with address $regml(1)
  181. set $+(%,%steamid) $iif($+(%,%steamid), $calc($+(%,%steamid) +1), 1)
  182. writeini -n Tracks.ini %steamid IP $+ $var($+(%,%steamid),1).value $regml(1)
  183. writeini -n Tracks.ini %steamid Date $+ $var($+(%,%steamid),1).value $date
  184. writeini -n Tracks.ini %steamid Time $+ $var($+(%,%steamid),1).value $time
  185. writeini -n Tracks.ini %steamid Nick $+ $var($+(%,%steamid),1).value %nick
  186. }
  187. elseif (%action == entered) {
  188. if ($ini(blacklist.ini,%steamid)) {
  189. rcon kick %nick
  190. rcon admin_command admin_kick %steamid
  191. rcon admin_command admin_ssay [AUTOKICK] %nick ( $+ %steamid $+ ) blacklist user.
  192. }
  193. aline @joined Nick: %nick (USERID: %userid STEAMID: %steamid TEAM: None $+ ) Entered the game
  194. }
  195. elseif (%action == joined) {
  196. aline @joined nick: %nick (USERID: %userid STEAMID: %steamid TEAM: %team $+ ) Joined team %team
  197. }
  198. elseif ($gettok($1-,6,32) == World) {
  199. $iif($gettok($1-,2,34) == Round_Start,aline @Console New Round started!,$iif($gettok($1-,2,34) == Round_End,aline @Console End of New ROUND))
  200. }
  201. else {
  202. aline @Console $1-
  203. }
  204. }
  205.  
  206. ;;;;Menu;;;;
  207. menu * {
  208. Rcon Tracks: RTrack
  209. Set Server IPort: Set %IPort $$?="Type The Server ip and the port"
  210. Set Server Rcon Password: Set %SRcon $$?="Type The Server Rcon Password"
  211. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement