#6

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(botidchannel[], user[], host[], params[])
{
    if(
isnull(params))
        return 
1;

    new 
        
mode[2],
        
title[16] = "",
        
msg[128];
        
    
IRC_GetUserChannelMode(botidchannelusermode);
    
    switch(
mode[0])
    {
        case 
'~'title "Owner ";
        case 
'&'title "Super Op ";
        case 
'@'title "Op ";
        case 
'%'title "Half Op ";
        case 
'+'title "Voice ";
    }
    
    
format(msgsizeof(msg), "02*** %s%s on IRC: %s"titleuserparams);
    
IRC_GroupSay(groupIDchannelmsg);
    
    
format(msgsizeof(msg), "*** %s%s on IRC: %s"titleuserparams);
    
SendClientMessageToAll(0x0000FFFFmsg);

    return 
1;

Reply


Messages In This Thread
[No subject] - by Loinal - 06.01.2017, 07:26
Re: irc - by ISmokezU - 06.01.2017, 10:43
Re: irc - by Loinal - 06.01.2017, 10:53
Re: irc - by iLearner - 06.01.2017, 10:55
Re: irc - by Loinal - 06.01.2017, 10:58
Re: irc - by Vince - 06.01.2017, 11:15
Re: irc - by Loinal - 06.01.2017, 11:21
Re: irc - by Yaa - 06.01.2017, 11:24
Re: irc - by iLearner - 06.01.2017, 11:28
Yaa - by Loinal - 06.01.2017, 11:33

Forum Jump:


Users browsing this thread: 2 Guest(s)