Re: HLIRC plugin version 4.0 released! -
01-07-2004
hi, i have problems with the linux-version of the irc-plugin.
all works besides game-to-irc with chat-messages. The bot in irc only says Chat_AllDead and similar things.
i searched for mistakes in the cpp-file and found some strange things in this function :-)
void WriteString (const char *sz)
{
// if this packet is part of a SayText message, then it contains some player chat and we need
// to send it to the IRC server through the IRC bot
// are we supposed to send this message ?
if (send_this_message)
{
send_this_message = FALSE; // clear the flag that indicated us this
// there are actually SayText messages that are not player chat strings. Since player
// chat strings begin with a special character, we can discard those who are irrelevant
knaeuel: all fine but now an if-statement followed by a semicolon, so the if statement has no effect. so the following code-block is done everytime. but thats of course not the reason for the wrong text. it would be nice to have an example of this sz-string filled with the chat text of a client :-)
if ((char) sz[0] == 0x02);
{
sprintf (ircbot.game_to_irc, &sz[1]); // copy chat string, skip the special character
ircbot.new_game_to_irc = TRUE; // tell the IRC bot it has a new message to send
}
}
RETURN_META (MRES_IGNORED);
}
|