command for recall ip example.
this ip 127.0.0.1 i want to recall ) like @recall then name of character
please working to eathena
how can change this to recall for ip
ACMD_FUNC(recallall)
{
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
int num_failed;
nullpo_retr(-1, sd);
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
clif_displaymessage(fd, "You are not authorised to warp players to your current map.");
return -1;
}
num_failed = 0;
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
if( pl_sd->status.account_id == sd->status.account_id )
continue; // no point in recalling self
if( pc_isGM(pl_sd) > pc_isGM(sd) )
continue; // skip more powerful GMs
if( pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
{
++num_failed;
continue; // blocked by nowarp mapflag
}
if( pc_isdead(pl_sd) )
{// wake them up
pc_setstand(pl_sd);
pc_setrestartvalue(pl_sd,1);
}
pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
}
mapit_free(iter);
clif_displaymessage(fd, msg_txt(92)); // All characters recalled!
if( num_failed != 0 )
{
sprintf(atcmd_output, "Because you are not authorised to warp from some maps, %d player(s) have not been recalled.", num_failed);
clif_displaymessage(fd, atcmd_output);
}
return 0;
}