IRC command prefix (+rep)
#1

Hey guys,
I know that we can change the prefix of irc commands by changing COMMAND_PREFIX in irc.inc. But, Is it possible to have another prefix, for example:
!say - it should work with '!' and also with `say.
You should be able to use !say and also `say.

If it is possible, then how?

Thanks in advance.
Reply
#2

Open up irc.inc

Change this:
pawn Код:
public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
{
    if (recipient[0] == CHANNEL_PREFIX && message[0] == COMMAND_PREFIX)
    { // Remaining code
To:
pawn Код:
#define COMMAND_PREFIX_2 '`'
public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
{
    if (recipient[0] == CHANNEL_PREFIX && message[0] == COMMAND_PREFIX || message[0] == COMMAND_PREFIX_2)
    { // Remaining code
Reply
#3

Thanks mate!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)