see the command /friends online
and you can make /clan online
forums.harpywar.com/viewtopic.php?id=622
Added: 29.05.2013 14:26
else if (strstart(text,"newmaster")==0)
{
t_packet * rpacket;
t_connection * dest_c;
t_account * friend_acc;
t_server_friendslistreply_status status;
t_game * game;
t_channel * channel;
char stat;
t_clanmember *member;
if(!clan)
{
message_send_text(c,message_type_error,c,"You are not in a clan!");
return 0;
}
if (clanmember_get_status(member)<CLAN_CHIEFTAIN)
{
message_send_text(c,message_type_error,c,"You are not a ClanMaster!");
return 0;
}
text = skip_command(text);
if (text[0] == '\0') {
message_send_text(c,message_type_info,c,"usage: /c add <username>");
return 0;
}
if (!(friend_acc = accountlist_find_account(text))) {
message_send_text(c,message_type_info,c,"That user does not exist.");
return 0;
}
if(acc==friend_acc)
{
message_send_text(c,message_type_info,c,"You can't choose yourself");
return 0;
}
if(account_get_clan(friend_acc))
{
sprintf(msgtemp, "%s has Clan members already!", text);
message_send_text(c,message_type_info,c,msgtemp);
return 0;
}
if(clan_get_clantag(clanmember_get_clan(account_ge t_clanmember(friend_acc)))
!=clan_get_clantag(clanmember_get_clan(account_get _clanmember(acc))))
{
sprintf(msgtemp, "%sNot Chieftain.", text);
message_send_text(c,message_type_info,c,msgtemp);
return 0;
}
clanmember_set_status(account_get_clanmember(acc), CLAN_PEON);
clanmember_set_status(account_get_clanmember(frien d_acc),CLAN_CHIEFTAIN);
sprintf( msgtemp, " %s DONE", text);
message_send_text(c,message_type_info,c,msgtemp);
dest_c = connlist_find_connection_by_account(friend_acc);
if(dest_c!=NULL) {
sprintf(msgtemp,"%s Chieftain",conn_get_username(c));
message_send_text(dest_c,message_type_info,dest_c, msgtemp);
}
//clanlog(clan_get_clantag(clan),"MU",conn_get_usern ame(c),0);
//clanlog(clan_get_clantag(clan),"MU",text,1);
}