+job/mail ...not mailing??
-
I'm completely stumped. My +job/mail is not actually mailing the players in question. I don't get it! HELP.
CMD_JOB/MAIL: $+job/mail *=*:@switch [u(%va/HAS_ACCESS,%#)][u(%va/MAIL_ACCESS,%#)][setq(0,u(%va/FN_FIND-JOB,%0))][isdbref(%q0)][u(%va/FN_ACCESSCHECK,parent(%q0),%#,%q0)][u(%va/IS_PUBLIC,%q0)][not(u(%va/IS_LOCKED,%q0,%#))][udefault(%q0/MAI_ACCESS,1,%#)]=0*,{@pemit %#=Permission denied.},10*,{@pemit %#=Permission denied.},110*,{@pemit %#=There is no job by that number.},1110*,{@pemit %#=You do not have access to that job.},11110*,{@pemit %#=+job/mail cannot be used on the job because the bucket in which it is stored is not set PUBLIC %(+myjobs-accessible%).},111110*,{@pemit %#=That job is presently [ifelse(u(%va/FN_HASATTRP,%q0,CHECKOUT),checked out to [name(first(get(%q0/CHECKOUT)))],locked)]},1111110*,{@pemit %#=That action is not available for that job.},{@pemit %#=You have mailed [u(%va/FN_PLAYERLIST,%q0)] about [name(%q0)], with the comments: [trim(%1)];@trigger %va/TRIG_ADD=%q0,[u(%va/FN_STRTRUNC,ansi(h,Mail sent to [u(%va/FN_PLAYERLIST,%q0)]:)%r%r[trim(%1)],get(%va/BUFFER))],%#,MAI;@trigger %va/TRIG_BROADCAST=%q0,%#,MAI,%q1}
Job Global Object <JGO>(#35)} ‘[u(%va/HAS_ACCESS,%#)][u(%va/MAIL_ACCESS,%#)][setq(0,u(%va/FN_FIND-JOB,%0))][isdbref(%q0)][u(%va/FN_ACCESSCHECK,parent(%q0),%#,%q0)][u(%va/IS_PUBLIC,%q0)][not(u(%va/IS_LOCKED,%q0,%#))][udefault(%q0/MAI_ACCESS,1,%#)]’ -> ‘1111111’ Job Global Object <JGO>(#35)} ‘udefault(%q0/MAI_ACCESS,1,%#)’ -> ‘1’ Job Global Object <JGO>(#35)} ‘%q0/MAI_ACCESS’ -> ‘#253/MAI_ACCESS’ Job Global Object <JGO>(#35)} ‘not(u(%va/IS_LOCKED,%q0,%#))’ -> ‘1’ Job Global Object <JGO>(#35)} ‘u(%va/IS_LOCKED,%q0,%#)’ -> ‘0’ Job Global Object <JGO>(#35)} ‘%#’ -> ‘#12’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘%va/IS_LOCKED’ -> ‘#36/IS_LOCKED’ Job Global Object <JGO>(#35)} ‘u(%va/IS_PUBLIC,%q0)’ -> ‘1’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘%va/IS_PUBLIC’ -> ‘#36/IS_PUBLIC’ Job Global Object <JGO>(#35)} ‘u(%va/FN_ACCESSCHECK,parent(%q0),%#,%q0)’ -> ‘1’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘%#’ -> ‘#12’ Job Global Object <JGO>(#35)} ‘parent(%q0)’ -> ‘#44’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘%va/FN_ACCESSCHECK’ -> ‘#36/FN_ACCESSCHECK’ Job Global Object <JGO>(#35)} ‘isdbref(%q0)’ -> ‘1’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘setq(0,u(%va/FN_FIND-JOB,%0))’ -> ‘’ Job Global Object <JGO>(#35)} ‘u(%va/FN_FIND-JOB,%0)’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘%0’ -> ‘37’ Job Global Object <JGO>(#35)} ‘%va/FN_FIND-JOB’ -> ‘#36/FN_FIND-JOB’ Job Global Object <JGO>(#35)} ‘u(%va/MAIL_ACCESS,%#)’ -> ‘1’ Job Global Object <JGO>(#35)} ‘%#’ -> ‘#12’ Job Global Object <JGO>(#35)} ‘%va/MAIL_ACCESS’ -> ‘#36/MAIL_ACCESS’ Job Global Object <JGO>(#35)} ‘u(%va/HAS_ACCESS,%#)’ -> ‘1’ Job Global Object <JGO>(#35)} ‘%#’ -> ‘#12’ Job Global Object <JGO>(#35)} ‘%va/HAS_ACCESS’ -> ‘#36/HAS_ACCESS’ Job Global Object <JGO>(#35)} ‘%#’ -> ‘#12’ Job Global Object <JGO>(#35)} ‘You have mailed [u(%va/FN_PLAYERLIST,%q0)] about [name(%q0)], with the comments: [trim(%1)]’ -> ‘You have mailed Cobalt about Job 37, with the comments: test’ Job Global Object <JGO>(#35)} ‘trim(%1)’ -> ‘test’ Job Global Object <JGO>(#35)} ‘%1’ -> ‘test’ Job Global Object <JGO>(#35)} ‘name(%q0)’ -> ‘Job 37’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘u(%va/FN_PLAYERLIST,%q0)’ -> ‘Cobalt’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘%va/FN_PLAYERLIST’ -> ‘#36/FN_PLAYERLIST’ You have mailed Cobalt about Job 37, with the comments: test Job Global Object <JGO>(#35)} ‘%va/TRIG_ADD’ -> ‘#36/TRIG_ADD’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘[u(%va/FN_STRTRUNC,ansi(h,Mail sent to [u(%va/FN_PLAYERLIST,%q0)]:)%r%r[trim(%1)],get(%va/BUFFER))]’ -> ‘Mail sent to Cobalt: test’ Job Global Object <JGO>(#35)} ‘u(%va/FN_STRTRUNC,ansi(h,Mail sent to [u(%va/FN_PLAYERLIST,%q0)]:)%r%r[trim(%1)],get(%va/BUFFER))’ -> ‘Mail sent to Cobalt: test’ Job Global Object <JGO>(#35)} ‘get(%va/BUFFER)’ -> ‘8000’ Job Global Object <JGO>(#35)} ‘%va/BUFFER’ -> ‘#36/BUFFER’ Job Global Object <JGO>(#35)} ‘ansi(h,Mail sent to [u(%va/FN_PLAYERLIST,%q0)]:)%r%r[trim(%1)]’ -> ‘Mail sent to Cobalt: test’ Job Global Object <JGO>(#35)} ‘trim(%1)’ -> ‘test’ Job Global Object <JGO>(#35)} ‘%1’ -> ‘test’ Job Global Object <JGO>(#35)} ‘Mail sent to [u(%va/FN_PLAYERLIST,%q0)]:’ -> ‘Mail sent to Cobalt:’ Job Global Object <JGO>(#35)} ‘u(%va/FN_PLAYERLIST,%q0)’ -> ‘Cobalt’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘%va/FN_PLAYERLIST’ -> ‘#36/FN_PLAYERLIST’ Job Global Object <JGO>(#35)} ‘%va/FN_STRTRUNC’ -> ‘#36/FN_STRTRUNC’ Job Global Object <JGO>(#35)} ‘%#’ -> ‘#12’ Job Global Object <JGO>(#35)} ‘%va/TRIG_BROADCAST’ -> ‘#36/TRIG_BROADCAST’ Job Global Object <JGO>(#35)} ‘%q0’ -> ‘#253’ Job Global Object <JGO>(#35)} ‘%#’ -> ‘#12’ Job Global Object <JGO>(#35)} ‘%q1’ -> ‘’ JOBS: Cobalt has sent mail regarding Job 37.
––––––––––––––––––––––––––– MAIL: Folder 0 –––––––––––––––––––––––––––– –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
-
The code that does the mailing is not this code. It is instead the triggers. What's up with the triggers on #36.Have you tried triggering them yourself? And do you still have some attributes with mai in them on #36?
-
Yeah, I've tried triggering them myself. Hang on, let me see if I can find the triggers.
TRIG_MAIL: @switch [u(%va/FN_HASATTRP,%0,MLETTER_%1)][setq(J,%0)]=1,{@wait 1={@trigger %vb/TRIG_MAIL=[switch(%1,MAI,[get(%0/OPENED_BY)],APR,[get(%0/OPENED_BY)],DNY,[get(%0/OPENED_BY)],filter(%va/FIL_NOSPAM,setunion(get(%0/OPENED_BY),)))],[switch(%1,APR,Approved:,DEL,Deleted:,DNY,Denied:,COM,Complete:,[name(%0)]:)]%b[get(%0/TITLE)],[u(parent(%0)/MLETTER_%1,%0,%1,%2,%3)]};}
TRIG_MAIL: @mail/quick [remove(%0,owner(me))]/%1=%2
-
When you trigger them do they work?And are the mletter attributes still there?
-
No they don't, and yes the req bucket has mletter.
-
I don't see anything overtly wrong. The functions haven't been changed. The only thing you can do is trace them at this point and see what's failing.
I can at least tell you that the way these things work is:
You add comments so the Job Global Object triggers TRIG_ADD on the Job Database
The Job Database triggers TRIG_MAIL on itself
It then triggers TRIG_MAIL on the job tracker which looks for mletter_[whatever case was passed to it, probably ADD or MAI in your case] and sends a mail based on that template -
Hm. It seems to only have mletter_other, not mletter_apr or anything, but I can't find any template for it on buckets on say fallcoast? o.o
-
Those are definitely needed. See: https://github.com/lashtear/Anomaly-Jobs/blob/dfc3fb83bac16c86e3e044995bbe86c36ec6eb57/full/jhelp.txt#L63
Alternatively, code around it.
-
@Alzie said in +job/mail ...not mailing??:
Those are definitely needed. See: https://github.com/lashtear/Anomaly-Jobs/blob/dfc3fb83bac16c86e3e044995bbe86c36ec6eb57/full/jhelp.txt#L63
Alternatively, code around it.
So why does it work on FC without them?
-
Fuck it. I'm just going to rip the code out and reinstall it.
-
@Cobaltasaurus
Wasn't there a point where AnomJobs had a history of random stuff deleting off of it? -
I don't believe so, no.
-
Fresh install did not fix the issue.
-
...aaand it's mailing fine so long as the person who opened the job isn't my cobalt bit. I wonder if the code won't let you @mail yourself on a job, or if its something to do with cobalt owning the code...