[IRC] Scripting help
#1

Hello, I recently installed an IRC echo script in my channel for my server made by a friend.

I want to add some more commands but we both don't have a clue how to start with that

For example:
- !playerinfo <nick> : shows the IP's, location, last-joined server on <date>
- !ipmatch <IP> : shows all nicknames that have been used for this IP
this are a few examples of what I want to do, if u can help me pm and I get in contact

thx in advance
Reply
#2

Just look at how they are made. It's similar to dcmd. Under ircOnUserSay it gets the length of their command. Depending on how long the command is, it checks for different commands. For example.

pawn Код:
//ircOnUserSay
if (cmdlen == 3)// is our command 3 characters long?
{
    irccmd(say,3,conn,channel,user,message);
    irccmd(ban,3,conn,channel,user,message);
}
Then the command just kinda follows.

pawn Код:
irccmd_say(conn, channel[], user[], params[])
{
  if (!ircIsOp(conn,channel,user) && !ircHasVoice(conn,channel,user)) return false;

    printinfo
    new msg[112];
    format(msg,sizeof(msg), "%s(IRC) %s", user, params);
    SendClientMessageToAll(0x2587CEAA, msg);
    format(msg, sizeof(msg), "%s(IRC) %s", user, params);
    ircSay(conn, channel, msg);
    return true;
}

Hope that helps you understand how to make your own. I haven't made any IRC commands in a while.
Reply
#3

I dont think tht will work with Incognito's plugin
Reply
#4

I ain't using icognito's plugin, or .. err I have no idea, lol
Reply
#5

Well it was from a script using Incognito's plugin but it was a version from about 2-3 years ago.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)