Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;#####################################
- alias GETURLn {
- if (!%atnd.busy) { set %atnd.busy FALSE | msg #vr-bot [VR-Bot] Attendance.Busy variable wasn't set. Setting it to FALSE now. }
- if (%atnd.busy == FALSE) {
- set %atnd.busy TRUE
- /window @debug | /clear @debug
- set %GODZILLA.IS.WHERE jobbrown.com
- ;since this is an internal command we just trust that $1 will be a command.
- sockopen JOOB. $+ $1 %GODZILLA.IS.WHERE 80
- set %part2 $2
- set %part3 $3
- set %part4 $4
- set %part2on $2-
- set %part3on $3-
- set %responcee $2
- }
- else {
- msg $2 The bot is currently busy processing somebodies elses command - please try again in a few seconds!
- }
- }
- ;##################################################
- ;##################################################
- on *:SOCKOPEN:JOOB.*: {
- if ($sockerr) { halt }
- ;below is based off the socketname from GETURL.
- ;/geturl START will thus trigger the file taged start.
- ;might want to clean up the structure of my if statements, but they work asis.
- var %PDQ.WHAT $right($sockname,-5)
- 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) }
- if (%PDQ.WHAT == STOP) { var %POKEMON.FETCH $+(/Runescape/exptracker-v2/stop.php?username=mike&password=reggin&trackerID=,%part3) }
- if (%PDQ.WHAT == PROCESS) { var %POKEMON.FETCH $+(/Runescape/exptracker-v2/process.php?username=mike&password=reggin&trackerID=,%part3) }
- set %atnd.log.report [VR-Bot] %PDQ.WHAT command activated by %part2 with the following parameters:
- if (%part3) {
- set %atnd.log.report %atnd.log.report %part3on
- }
- msg #vr-bot NEW %atnd.log.report
- sockwrite -nt $sockname GET %POKEMON.FETCH HTTP/1.1
- sockwrite -nt $sockname Host: %GODZILLA.IS.WHERE
- sockwrite -nt $sockname $crlf
- }
- on *:SOCKREAD:JOOB.*:{
- ;
- sockread %read.buf
- tokenize 32 %read.buf
- ;debugging line below, delete/comment it out when not needed
- echo @debug $1-
- if ($1 == START) { var %LOOK YES }
- if ($1 == OUTPUT:) { msg %responcee $2- }
- if ($1 == END) { var %LOOK NO }
- }
- on 1:sockclose:JOOB.*:{
- set %atnd.busy FALSE
- }
- ;##################################################
- ;##################################################
- on *:TEXT:!nstart-tracker *:#: {
- if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
- if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
- if (!$2) {
- msg $nick You didn't supply an event name
- }
- else {
- msg $nick Starting a tracker where the starter is documented as: $nick $+ . Event Name: $2-
- msg $nick It isn't unusual for this process to take 2-3 minutes, please wait - IT IS PROCESSING
- echo @debug start $Nick $2 $3
- /geturln start $nick $2 $3
- }
- }
- else {
- msg $nick Insufficient permissions, sorry!
- }
- }
- on *:TEXT:!nstop-tracker *:#: {
- if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
- if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
- if (!$2) {
- msg $nick You didn't supply a tracker ID
- }
- else {
- msg $nick Stopping tracker with ID: $2
- msg $nick It isn't unusual for this process to take 2-3 minutes, please wait - IT IS PROCESSING
- msg $nick 4You will be told when it has finished processing!
- unset %attendanceAntiSpam.*
- /geturln stop $nick $2
- }
- }
- else {
- msg $nick Insufficient permissions, sorry!
- }
- }
- on *:TEXT:!nprocess *:#: {
- if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
- if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
- if (!$2) {
- msg $nick You must supply a tracking ID
- }
- else {
- msg $nick Starting the processing process, please wait
- /geturln process $nick $2
- }
- }
- else {
- msg $nick Insufficient permissions, sorry!
- }
- }
- on *:TEXT:!nstart-tracker *:?: {
- if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
- if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
- if (!$2) {
- msg $nick You didn't supply an event name
- }
- else {
- msg $nick Starting a tracker where the starter is documented as: $nick $+ . Event Name: $2-
- msg $nick It isn't unusual for this process to take 2-3 minutes, please wait - IT IS PROCESSING
- /geturln start $nick $2-
- }
- }
- else {
- msg $nick Insufficient permissions, sorry!
- }
- }
- on *:TEXT:!nstop-tracker *:?: {
- if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
- if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
- if (!$2) {
- msg $nick You didn't supply a tracker ID
- }
- else {
- msg $nick Stopping tracker with ID: $2
- msg $nick It isn't unusual for this process to take 2-3 minutes, please wait - IT IS PROCESSING
- msg $nick 4You will be told when it has finished processing!
- unset %attendanceAntiSpam.*
- /geturln stop $nick $2
- }
- }
- else {
- msg $nick Insufficient permissions, sorry!
- }
- }
- on *:TEXT:!nprocess *:?: {
- if ($nick isop #vr) || ($nick isop #vr-priv) || ($nick ishop #vr-priv) || ($nick isop #vr-bot) || ($nick == Job) {
- if ($nick == Job) { if ($address($nick,2) != %login) { msg $nick You are not logged on | halt } }
- if (!$2) {
- msg $nick You must supply a tracking ID
- }
- else {
- msg $nick Starting the processing process, please wait
- /geturln process $nick $2
- }
- }
- else {
- msg $nick Insufficient permissions, sorry!
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement