[IRC] Scripting help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [IRC] Scripting help (
/showthread.php?tid=150585)
[IRC] Scripting help -
[Ask]G_Sk8er - 26.05.2010
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
Re: [IRC] Scripting help -
Backwardsman97 - 27.05.2010
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.
Re: [IRC] Scripting help -
Killa_ - 27.05.2010
I dont think tht will work with Incognito's plugin
Re: [IRC] Scripting help -
[Ask]G_Sk8er - 27.05.2010
I ain't using icognito's plugin, or .. err I have no idea, lol
Re: [IRC] Scripting help -
Backwardsman97 - 27.05.2010
Well it was from a script using Incognito's plugin but it was a version from about 2-3 years ago.