Is it possible to extract from pemit/think commands?


  • Coder

    For whatever reason, almost all +finger commands let you see other players unread @mail messages but mail() is wiz only for anyone but yourself. Trim() would let me excise the part I need, but is it possible to get the result of +finger info a form I can use trim() on?


  • Coder

    @Hexagon said in Is it possible to extract from pemit/think commands?:

    For whatever reason, almost all +finger commands let you see other players unread @mail messages but mail() is wiz only for anyone but yourself. Trim() would let me excise the part I need, but is it possible to get the result of +finger info a form I can use trim() on?

    MUX and TM3 have a %| pipe that I think may do what you need.

    Rhost has @pipe which would dump the output of commands into an attribute.

    Penn has no such option.


  • Coder

    @Ashen-Shugar Thanks, I'll look into that. As awkward as this could be, it's less awkward than going to a coder and saying "Hey, I wrote this and other people might find it useful. Look it over and install it?" Not everyone has the same use cases and it feels like criticizing the coder to suggest stuff like that.


  • Coder

    @Ashen-Shugar Looks like that won't work for MUX, sadly. While I can pipe commands I execute directly, like look %0, +finger %0 winds up calling something that @pemits the data back. I am guessing that since +finger %0 invokes @pemit, it's not actually returning anything that can be piped. The executed command is @switch. @pemit is just a possible result.

    I tested it thusly:
    &test.finger me=+test.finger *:+finger %0 ;| @set me=F.Result:%|
    &test.look me=+test.look *:look %0 ;| @set me=L.Result:%|

    L.Result was the exact result of looking at me couched in a @wait. F.Result put the +finger info on the screen and didn't create the attribute.

    I get why mail() returning read, unread, sent is privileged info, but we commonly put it out there so it's frustrating.

    Save for this piece, I've written a short command that iterates through my list of alts and tells me the last time I signed into them and if they're in danger of being deactivated due to disuse. It would have been nice to add unread mail count as well. Currently I'm just spamming myself with +finger for each and that's just wasteful.


  • Coder

    @Hexagon said in Is it possible to extract from pemit/think commands?:

    @Ashen-Shugar Looks like that won't work for MUX, sadly. While I can pipe commands I execute directly, like look %0, +finger %0 winds up calling something that @pemits the data back. I am guessing that since +finger %0 invokes @pemit, it's not actually returning anything that can be piped. The executed command is @switch. @pemit is just a possible result.

    I tested it thusly:
    &test.finger me=+test.finger *:+finger %0 ;| @set me=F.Result:%|
    &test.look me=+test.look *:look %0 ;| @set me=L.Result:%|

    L.Result was the exact result of looking at me couched in a @wait. F.Result put the +finger info on the screen and didn't create the attribute.

    I get why mail() returning read, unread, sent is privileged info, but we commonly put it out there so it's frustrating.

    Save for this piece, I've written a short command that iterates through my list of alts and tells me the last time I signed into them and if they're in danger of being deactivated due to disuse. It would have been nice to add unread mail count as well. Currently I'm just spamming myself with +finger for each and that's just wasteful.

    Gah. MUX's and TM3's %| apparently only works on the last command on the stack then, my apologies, I thought it would also work on softcode, but apparently it's in error.

    For what it's worth, @pipe would still work fine :)

    I would send in a +request (or whatever that game has for code changes) and ask them for an +altmailcheck or something that will scan all the alts you have registered for mail stats.

    It shouldn't be out of the realm of possible, and you won't insult the coder as it's a new request.

    Cheers.


  • Coder

    @Hexagon In MUX, at least, +finger is soft code. That mostly means it's going to be different on each game you log into, unless they are pulling from the same "code suite".

    I don't know any way you could capture the output of +finger and mine it yourself.

    @Ashen-Shugar I don't see @pipe in MUX, so no idea what that's meant to be.

    All that said, as Ashen-Shugar says, this would be something you'd probably need to ask about.


  • Coder

    @skew said in Is it possible to extract from pemit/think commands?:

    @Ashen-Shugar I don't see @pipe in MUX, so no idea what that's meant to be.

    It's a RhostISM. I mentioned it earlier.

    > @pipe/tee finger
    @pipe: piping to attribute has been enabled.
    
    > +finger Ashen-Shugar
                           . o O +finger Ashen-Shugar O o .
    .-==========================================================================-.
    | Name: Ashen-Shugar       Alias: ash               Level: 0                 |
    | Status: WIZ                                                                |
    | Connected for: 5d  7h  5m 43s                                              |
    '-==========================================================================-'
    
    > @pipe/off
    @pipe: piping to attribute has been disabled.
    
    > think v(finger)
                           . o O +finger Ashen-Shugar O o .
    .-==========================================================================-.
    | Name: Ashen-Shugar       Alias: ash               Level: 0                 |
    | Status: WIZ                                                                |
    | Connected for: 5d  7h  5m 43s                                              |
    '-==========================================================================-'
    

  • Coder

    @Ashen-Shugar My bad! Thought you said it was in MUX.


  • Coder

    Yeah I'm not aware of anything in Penn/Tiny that would do this.

    You could also ask the coder to create a global altmail() function that just wraps around mail(). Would only take them a minute, vs. asking them to build something unusual into +finger to let you capture the output, or implement your alt mail check as a global.


Log in to reply
 

Looks like your connection to MU Soapbox was lost, please wait while we try to reconnect.