Results 1 to 9 of 9

Thread: Check incoming kmails for attached items

  1. #1

    Default Check incoming kmails for attached items

    Mafia doesn't put kmailed items into inventory; I get burned by this once in a while. Yesterday, somebody looking for help in a couple of dreadsylvania instances kmailed me a pair of skeleton keys; my dreadsylvania script wasted one collecting freddies because it thought I had no keys in inventory, and accidentally unlocked something.

    So, request: when mafia sees the you've-got-mail event notice from the system, check the incoming kmail for attached items.

  2. #2
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    3,852

    Default

    From http://kolmafia.us/showthread.php?42...ll=1#post30483

    Mafia doesn't update your inventory with items received in a kmail, and it never will.
    Originally Posted by lostcalpolydude View Post
    I do recall that not updating inventory from Kmail has been a feature of mafia for quite some time. What I don't recall is whether there was a reason, besides server hits, and whether the reasons, whatever they are, are still valid today.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  3. #3

    Default

    Checking the kmail for attachments would be the hard way to do it. Refreshing inventory is a lot easier, and much less of a server load (I think) than it used to be now that api.php can be used. That probably removes most of the argument against this.

    This request assumes the user is in chat to get the notification immediately. Otherwise, the notification might show up after inventory has been refreshed for another reason, such as logging in.

  4. #4
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    3,852

    Default

    Checking the kmail for attachments would be the hard way to do it. Refreshing inventory is a lot easier, and much less of a server load (I think) than it used to be now that api.php can be used. That probably removes most of the argument against this.

    This request assumes the user is in chat to get the notification immediately. Otherwise, the notification might show up after inventory has been refreshed for another reason, such as logging in.
    Originally Posted by lostcalpolydude View Post
    "assumes the character is in chat" is probably another reason why it was not done. I have an illiterate character to thwart such assumptions :-)

    I'm beginning to recall suggestion/discussion that this not be implemented because there were no "push" notifications of mail arrival without chat.

    I'm reluctant to require chat on general principles, but it is true adding some kind of inventory refresh would not change my experience.

    It is a source of mild frustration that faxes do not respond success or failure correctly unless a chat window is open when they are requested. Perhaps this request would spur development of the ability for KoLmafia to silently open a chat channel (i.e. no GUI) so notifications can be responded to.

    I stopped having chat windows open by default and/or at startup. I had some system instability - specifically mafia would appear to freeze and not display the main GUI - and my much atrophied debugging skills suggested a threading issue involving the chat thread. The problem was frequent but not reliably repeatable and it has not reoccurred since I stopped opening chat at startup.

    If someone wanted this badly enough and it was not baked into KoLmafia, would a chatbot be a workaround?

    I'm just thinking out loud. I'm not necessarily opposed but I am not motivated to implement it myself, either.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  5. #5
    Senior Member
    Join Date
    Feb 2010
    Posts
    905

    Default

    Veracity already does something like this in her meatfarming script. It silently opens a chat window to handle a fax request.

  6. #6

    Default

    It is a source of mild frustration that faxes do not respond success or failure correctly unless a chat window is open when they are requested. Perhaps this request would spur development of the ability for KoLmafia to silently open a chat channel (i.e. no GUI) so notifications can be responded to.
    Originally Posted by fronobulax View Post
    If someone normally uses chat but chooses not to for a session, it would lead to PMs mysteriously never showing up. For people that never use chat, others might expect them to receive PMs because KoL now reports that they are in chat. So auto-entering chat as default behavior is a bad idea.

  7. #7
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    3,852

    Default

    Veracity already does something like this in her meatfarming script. It silently opens a chat window to handle a fax request.
    Originally Posted by Magus_Prime View Post
    She uses the cli command "chat" which will switch to a chat tab or window OR open a chat window. But if the script opens a chat window, it does not - AFAIK - close the window when done which was part of my definition of "silent". My concern is with an opened chat window that is not actually being used by me. My personal urban myth is that caused me some problems, which disappeared when chat was closed as soon as possible.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  8. #8
    Senior Member
    Join Date
    Oct 2014
    Posts
    136

    Default

    I didn't know you could do that with chat.

    I use manual checking upon fax failure and some sort of horrible loop to avoid the chat requirement in my scripts. It can take an extra minute but has worked without requiring any chat. I highly approve of illiteracy.

  9. #9
    Developer
    Join Date
    Apr 2010
    Posts
    4,215

    Default

    r18420 updates inventory via API if you see a message arrive in chat.
    If you aren't in chat, tough, we have no idea !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •