04.12.2012, 15:48
pawn Код:
irccmd_pm(conn, channel[], user[], params[])
{
new giveid,msg[256],lolz1[256], lolz2[256], pon[100];
if(sscanf(params,"ss",pon,msg)) return IRC_Say(EchoConnection, EchoChan,"3Usage: !pm <PartOfName/PlayerID> <Message>");
giveid = ReturnUser(pon);
if(!IsPlayerConnected(giveid))return IRC_Say(EchoConnection, EchoChan,"4*** Error: Invalid player ID.");
format(lolz1,256, "*** Pm from %s (IRC): %s",user, msg);
format(lolz2,256, "5*** Pm to %s (ID:%d): %s",PlayerName(giveid),giveid,msg);
SendClientMessage(giveid,green,lolz1);
IRC_Say(EchoConnection, EchoChan, lolz2);
#pragma unused conn, channel
return true;
}
irccmd_say(conn, channel[], user[], params[])
{
if(!strlen(params)) return IRC_Say(EchoConnection,channel,"3Usage: !say <Message>");
new lolz1[256], lolz2[256];
if(IsPlayerOwner(conn,channel,user))
{
format(lolz1,256,"* Admin %s on irc: %s",user,params);
SendClientMessageToAll(orange, lolz1);
format(lolz2,256,"2* Admin %s on irc: %s",user,params);
IRC_Say(EchoConnection,channel,lolz2);
return true;
}
else if(IsPlayerSop(conn,channel,user))
{
format(lolz1,256,"* Admin %s on irc: %s",user,params);
SendClientMessageToAll(orange, lolz1);
format(lolz2,256,"2* Admin %s on irc: %s",user,params);
IRC_Say(EchoConnection,channel,lolz2);
return true;
}
else if(IsPlayerOp(conn,channel,user))
{
format(lolz1,256,"* Admin %s on irc: %s",user,params);
SendClientMessageToAll(orange, lolz1);
format(lolz2,256,"2* Admin %s on irc: %s",user,params);
IRC_Say(EchoConnection,channel,lolz2);
return true;
}
else if(IsPlayerHop(conn,channel,user))
{
format(lolz1,256,"* Mod %s on irc: %s",user,params);
SendClientMessageToAll(orange, lolz1);
format(lolz2,256,"2* Mod %s on irc: %s",user,params);
IRC_Say(EchoConnection,channel,lolz2);
return true;
}
else if(IsPlayerVoi(conn,channel,user))
{
format(lolz1,256,"* Guest %s on irc: %s",user,params);
SendClientMessageToAll(orange, lolz1);
format(lolz2,256,"2* Guest %s on irc: %s",user,params);
IRC_Say(EchoConnection,channel,lolz2);
return true;
}
format(lolz1,256,"* Guest %s on irc: %s",user,params);
SendClientMessageToAll(orange, lolz1);
format(lolz2,256,"2* Guest %s on irc: %s",user,params);
IRC_Say(EchoConnection,channel,lolz2);
#pragma unused conn
return true;
}