Home AMX User Forum AMX General Discussion
Options

get PROGRAM_NAME to source code

HI

Is there a way to get the PROGRAM NAME into the source code and then fed up to the panel / rms ?

Within telnet you can show this via 'program info' but there is no keyword / structure that i can find containing the info for the source code to use.

I imagine its not possible to get the source code to telnet its own master to get the info
but im asking just in case something similar has been done before

thanks

Comments

  • Options
    Joe HebertJoe Hebert Posts: 2,159
    palopalo78 wrote: »
    Is there a way to get the PROGRAM NAME into the source code...

    How about this?
    __NAME__
    At compile time, this keyword is replaced by a string that contains the PROGRAM_NAME description found on the first line of the program.
  • Options
    Ah ! ... thanks for pointing that out .

    Perfect
  • Options
    PhreaKPhreaK Posts: 966
    palopalo78 wrote: »
    I imagine its not possible to get the source code to telnet its own master to get the info
    It's entirely possible. Just open up a connection to 127.0.0.1 on port 23. You can get lots of useful info that way. The __NAME__ keyword is much nicer in this situation though.
Sign In or Register to comment.