Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. ;#####################################
  2. alias GETURLn {
  3. if (!%atnd.busy) { set %atnd.busy FALSE | msg #vr-bot [VR-Bot] Attendance.Busy variable wasn't set. Setting it to FALSE now. }
  4. if (%atnd.busy == FALSE) {
  5. set %atnd.busy TRUE
  6. /window @debug | /clear @debug
  7. set %GODZILLA.IS.WHERE jobbrown.com
  8. ;since this is an internal command we just trust that $1 will be a command.
  9. sockopen JOOB. $+ $1 %GODZILLA.IS.WHERE 80
  10.  
  11. set %part2 $2
  12. set %part3 $3
  13. set %part4 $4
  14. set %part2on $2-
  15. set %part3on $3-
  16.  
  17.  
  18. set %responcee $2
  19. }
  20. else {
  21. msg $2 The bot is currently busy processing somebodies elses command - please try again in a few seconds!
  22.  
  23. }
  24. }
  25. ;##################################################
  26. ;##################################################
  27.  
  28.  
  29. on *:SOCKOPEN:JOOB.*: {
  30. if ($sockerr) { halt }
  31.  
  32. ;below is based off the socketname from GETURL.
  33. ;/geturl START will thus trigger the file taged start.
  34. ;might want to clean up the structure of my if statements, but they work asis.
  35.  
  36. var %PDQ.WHAT $right($sockname,-5)
  37. if (%PDQ.WHAT == START) { set %part3on $replace(%part3on,$chr(32),$chr(37) $+ 20) | var %POKEMON.FETCH $+(/Runescape/exptracker-v2/start.php?username=mike&password=reggin&eventStarter=,%part2,&eventName=,%part3,&opponent=,%part4) }
  38. if (%PDQ.WHAT == STOP) { var %POKEMON.FETCH $+(/Runescape/exptracker-v2/stop.php?username=mike&password=reggin&trackerID=,%part3) }
  39. if (%PDQ.WHAT == PROCESS) { var %POKEMON.FETCH $+(/Runescape/exptracker-v2/process.php?username=mike&password=reggin&trackerID=,%part3) }
  40. set %atnd.log.report [VR-Bot] %PDQ.WHAT command activated by %part2 with the following parameters:
  41. if (%part3) {
  42. set %atnd.log.report %atnd.log.report %part3on
  43. }
  44.  
  45. msg #vr-bot NEW %atnd.log.report
  46.  
  47.  
  48. sockwrite -nt $sockname GET %POKEMON.FETCH HTTP/1.1
  49. sockwrite -nt $sockname Host: %GODZILLA.IS.WHERE
  50. sockwrite -nt $sockname $crlf
  51. }
  52.  
  53. on *:SOCKREAD:JOOB.*:{
  54. ;
  55. sockread %read.buf
  56. tokenize 32 %read.buf
  57. ;debugging line below, delete/comment it out when not needed
  58. echo @debug $1-
  59.  
  60. if ($1 == START) { var %LOOK YES }
  61.  
  62. if ($1 == OUTPUT:) { msg %responcee $2- }
  63.  
  64. if ($1 == END) { var %LOOK NO }
  65.  
  66. }
  67.  
  68. on 1:sockclose:JOOB.*:{
  69. set %atnd.busy FALSE
  70. }
  71. ;##################################################
  72. ;##################################################
  73.  
  74. on *:TEXT:!nstart-tracker *:#: {
  75. if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
  76. if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
  77.  
  78. if (!$2) {
  79. msg $nick You didn't supply an event name
  80. }
  81. else {
  82. msg $nick Starting a tracker where the starter is documented as: $nick $+ . Event Name: $2-
  83. msg $nick It isn't unusual for this process to take 2-3 minutes, please wait - IT IS PROCESSING
  84. echo @debug start $Nick $2 $3
  85. /geturln start $nick $2 $3
  86. }
  87. }
  88. else {
  89. msg $nick Insufficient permissions, sorry!
  90. }
  91. }
  92.  
  93. on *:TEXT:!nstop-tracker *:#: {
  94. if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
  95. if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
  96.  
  97. if (!$2) {
  98. msg $nick You didn't supply a tracker ID
  99. }
  100. else {
  101. msg $nick Stopping tracker with ID: $2
  102. msg $nick It isn't unusual for this process to take 2-3 minutes, please wait - IT IS PROCESSING
  103. msg $nick 4You will be told when it has finished processing!
  104. unset %attendanceAntiSpam.*
  105. /geturln stop $nick $2
  106. }
  107. }
  108. else {
  109. msg $nick Insufficient permissions, sorry!
  110. }
  111. }
  112.  
  113. on *:TEXT:!nprocess *:#: {
  114. if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
  115. if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
  116.  
  117.  
  118. if (!$2) {
  119. msg $nick You must supply a tracking ID
  120. }
  121. else {
  122. msg $nick Starting the processing process, please wait
  123. /geturln process $nick $2
  124. }
  125. }
  126. else {
  127. msg $nick Insufficient permissions, sorry!
  128. }
  129. }
  130.  
  131. on *:TEXT:!nstart-tracker *:?: {
  132. if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
  133. if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
  134.  
  135.  
  136.  
  137. if (!$2) {
  138. msg $nick You didn't supply an event name
  139. }
  140. else {
  141. msg $nick Starting a tracker where the starter is documented as: $nick $+ . Event Name: $2-
  142. msg $nick It isn't unusual for this process to take 2-3 minutes, please wait - IT IS PROCESSING
  143. /geturln start $nick $2-
  144. }
  145. }
  146. else {
  147. msg $nick Insufficient permissions, sorry!
  148. }
  149. }
  150.  
  151. on *:TEXT:!nstop-tracker *:?: {
  152. if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
  153. if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
  154.  
  155.  
  156.  
  157. if (!$2) {
  158. msg $nick You didn't supply a tracker ID
  159. }
  160. else {
  161. msg $nick Stopping tracker with ID: $2
  162. msg $nick It isn't unusual for this process to take 2-3 minutes, please wait - IT IS PROCESSING
  163. msg $nick 4You will be told when it has finished processing!
  164. unset %attendanceAntiSpam.*
  165. /geturln stop $nick $2
  166. }
  167. }
  168. else {
  169. msg $nick Insufficient permissions, sorry!
  170. }
  171. }
  172.  
  173. on *:TEXT:!nprocess *:?: {
  174. if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
  175. if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
  176.  
  177.  
  178. if (!$2) {
  179. msg $nick You must supply a tracking ID
  180. }
  181. else {
  182. msg $nick Starting the processing process, please wait
  183. /geturln process $nick $2
  184. }
  185. }
  186. else {
  187. msg $nick Insufficient permissions, sorry!
  188. }
  189. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement