summaryrefslogblamecommitdiff
path: root/npc/commands/ipcheck.txt
blob: a1f9345c26fde64648b377c7a514582a3b3d7ece (plain) (tree)
1
2
3
4
5
6


                                     
                         
                         
  






                                       



                                                       

                                                               


        
                                                        

        



























                                                                      
// TMW2 script
// Author: Jesusalva <admin@tmw2.org>
//
// @ipcheck <player_name>
// #ipcheck <player_name>
//
// Returns user IP


-	script	@ipcheck	32767,{
    end;

OnCall:
    if (.@atcmd_numparameters == 0)
    	.@request$ = strcharinfo(0);
    else
    	.@request$ = implode(.@atcmd_parameters$, " ");
    dispbottom strip(.@request$)+": IP "+getcharip(.@request$);
    //dispbottom strcharinfo(0)+": IP "+getcharip(.@request$);
    end;

OnInit:
    bindatcmd "ipcheck", "@ipcheck::OnCall", 80, 100, 1;
    end;
}

// TMW2 script
// Author: Jesusalva <admin@tmw2.org>
//
// @checkidle <player_name>
// #checkidle <player_name>
//
// Returns user idle time in seconds.
// Useful when the game prohibits warping to player.


-	script	@checkidle	32767,{
    end;

OnCall:
    if (.@atcmd_numparameters == 0)
    	.@request$ = strcharinfo(0);
    else
    	.@request$ = implode(.@atcmd_parameters$, " ");
    dispbottom strip(.@request$)+" idle time: "+checkidle(.@request$);
    //dispbottom strcharinfo(0)+": IP "+getcharip(.@request$);
    end;

OnInit:
    bindatcmd "checkidle", "@checkidle::OnCall", 60, 80, 1;
    end;
}