06.01.2017, 11:15
I don't know what line the errors are referring to, but what I will say is: don't repeat so much code. The only thing that changes is the user's title, everything else is exactly the same. Hence, it would be far more efficient to just store that title in a variable.
PHP код:
IRCCMD:say(botid, channel[], user[], host[], params[])
{
if(isnull(params))
return 1;
new
mode[2],
title[16] = "",
msg[128];
IRC_GetUserChannelMode(botid, channel, user, mode);
switch(mode[0])
{
case '~': title = "Owner ";
case '&': title = "Super Op ";
case '@': title = "Op ";
case '%': title = "Half Op ";
case '+': title = "Voice ";
}
format(msg, sizeof(msg), "02*** %s%s on IRC: %s", title, user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s%s on IRC: %s", title, user, params);
SendClientMessageToAll(0x0000FFFF, msg);
return 1;
}