Results 1 to 9 of 9

Thread: getstatus source ip

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    I wouldn't overcomplicate it, something like:

    PHP Code:
    #include "stdio.h"
    #include "string.h"
    int main() {
        
    char *ips "127.0.0.1 234.44.23.52 1.2.3.4";
        
    char *test1 "1.2.3.4";
        
    char *test2 "2.3.4.5";
        
    printf("%s is %s in %s"test1strstr(ipstest1) ? "     " " NOT "ips);
        
    printf("%s is %s in %s"test2strstr(ipstest2) ? "     " " NOT "ips);

    Output:

    PHP Code:
    1.2.3.4 is       in 127.0.0.1 234.44.23.52 1.2.3.4
    2.3.4.5 is  NOT  in 127.0.0.1 234.44.23.52 1.2.3.4 
    And ips you can just get from a cvar?
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    v1rto (17th February 2023)

Posting Permissions

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