Using Admin Commands On IRC
#2

I don't think this will help you, anyway here is the commands

pawn Код:
IRCCMD:kick(botid, channel[], user[], host[], params[]) {
    // Check if the user is at least a halfop in the channel
    if (IRC_IsHalfop(botid, channel, user)) {
        new playerid, reason[64];
        // If the user did enter a player ID, then the command will not be processed
        if (sscanf(params, "dz", playerid, reason)) {
            return 1;}
        // If the player is not connected, then nothing will be done
        if (IsPlayerConnected(playerid)) {
            new msg[128], playname[MAX_PLAYER_NAME];
            // If no reason is given, then "No reason" will be stated
            if (isnull(reason)) {
                format(reason, sizeof(reason), "No reason");}
            // Echo the formatted message and kick the user
            GetPlayerName(playerid, playname, sizeof(playname));
            format(msg, sizeof(msg), "04*** %s has been kicked by %s on IRC. (%s)", playname, user, reason);
            Say(channel,msg);
            format(msg, sizeof(msg), "*** %s has been kicked by %s on IRC. (%s)", playname, user, reason);
            SendMessageToAll(COLOR_RED, msg);
            Kick(playerid);}}
    return 1;}

IRCCMD:ban(botid, channel[], user[], host[], params[])
{
    // Check if the user is at least an op in the channel
    if (IRC_IsOp(botid, channel, user))
    {
        new playerid, reason[64];
        // If the user did enter a player ID, then the command will not be processed
        if (sscanf(params, "dz", playerid, reason))
        {
            return 1;
        }
        // If the player is not connected, then nothing will be done
        if (IsPlayerConnected(playerid))
        {
            new msg[128], playname[MAX_PLAYER_NAME];
            // If no reason is given, then "No reason" will be stated
            if (isnull(reason))
            {
                format(reason, sizeof(reason), "No reason");
            }
            // Echo the formatted message and ban the user
            GetPlayerName(playerid, playname, sizeof(playname));
            format(msg, sizeof(msg), "04*** %s has been banned by %s on IRC. (%s)", playname, user, reason);
            Say(channel,msg);
            format(msg, sizeof(msg), "*** %s has been banned by %s on IRC. (%s)", playname, user, reason);
            SendMessageToAll(COLOR_RED, msg);
            BanEx(playerid, reason);
        }
    }
    return 1;
}

IRCCMD:say(botid, channel[], user[], host[], params[]) {
    new msg1[256], msg2[256],string[128];
    if(IRC_IsOp(botid, channel, user)) {
        format(msg1, sizeof(msg1), "2* Admin %s (IRC): %s", user, params);
        Say(channel,string);
        format(msg2, sizeof(msg2), "* Admin %s (IRC): %s", user, params);
        SendClientMessageToAll(orange, msg2);}
    else if(IRC_IsHalfop(botid, channel, user)) {
        format(msg1, sizeof(msg1), "2* Mod %s (IRC): %s", user, params);
        Say(channel,string);
        format(msg2, sizeof(msg2), "* Mod %s (IRC): %s", user, params);
        SendClientMessageToAll(orange, msg2);}
    else if(IRC_IsVoice(botid, channel, user)) {
        format(msg1, sizeof(msg1), "2* Guest %s (IRC): %s", user, params);
        Say(channel,string);
        format(msg2, sizeof(msg2), "* Guest %s (IRC): %s", user, params);
        SendClientMessageToAll(orange, msg2);}
    return 1;}
Reply


Messages In This Thread
Using Admin Commands On IRC - by shayan122 - 25.06.2012, 05:26
Re: Using Admin Commands On IRC - by Ironboy - 25.06.2012, 05:39
Re: Using Admin Commands On IRC - by Niko_boy - 25.06.2012, 05:58
Re: Using Admin Commands On IRC - by shayan122 - 25.06.2012, 06:25
Re: Using Admin Commands On IRC - by Djole1337 - 25.06.2012, 08:10
Re: Using Admin Commands On IRC - by shayan122 - 25.06.2012, 08:40

Forum Jump:


Users browsing this thread: 1 Guest(s)