01.02.2014, 15:54
pawn Код:
dcmd_irckick(playerid,params)
{
new string[128];
new username[MAX_PLAYER_NAME];
new pname[MAX_PLAYER_NAME];
new cmdreason;
if(sscanf(params,"us",username,cmdreason))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /irckick (UserName) (Reason)");
return 1;
}
if(!IRC_IsUserOnChannel(gGroupID,IRC_CHANNEL,username))
{
SendClientMessage(playerid,COLOR_ERROR,"User not connected on IRC Channel");
return 1;
}
GetPlayerName(playerid,pname,sizeof(pname));
format(string,sizeof(string),"9[ADMIN]Administrator %s(%d) has kicked you from in-game. Reason : %s.",pname,playerid,cmdreason);
IRC_Notice(gBotID[0],username,string);
format(string,sizeof(string),"[ADMIN]Administrator %s(%d) has kicked %s from IRC. Reason : %s.",pname,playerid,username,cmdreason);
SendClientMessageToAll(COLOR_ADMIN,string);
format(string,sizeof(string),"9[ADMIN]Administrator %s(%d) has kicked %s from IRC. Reason : %s.",pname,playerid,username,cmdreason);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
IRC_KickUser(gBotID[0],IRC_CHANNEL,username);
return 1;
}
Thanks.