IRC Message Issues
#1

Hi, I am currently having a problem with IRC messages. I have no clue why, but for some reason some messages just bug out after they've been used one time. Here's an example:
This is when the server first starts and the very first message goes through:

Quote:

[08:51.06] <+MercSSBOT-1> [-][THR.UDEF]: Player ------ moved through defence 1439 at 674.3, 888.4, -41.1

When the next message goes through, it relays this to IRC:

Quote:

[08:52.36] <+MercSSBOT-3> [-][THR.....UDEF]: DEF

And this happens from there on out.
Quote:

[08:52.41] <+MercSSBOT-1> [-][THR......UDEF]: UDEF
[08:53.56] <+MercSSBOT-2> [-][THR.......UDEF]: .UDEF
[08:54.08] <+MercSSBOT-3> [-][THR........UDEF]: ..UDEF
[08:54.12] <+MercSSBOT-1> [-][THR.........UDEF]: ...UDEF
[08:54.21] <+MercSSBOT-2> [-][THR..........UDEF]: ....UDEF
[08:54.23] <+MercSSBOT-3> [-][THR...........UDEF]: .....UDEF
[08:54.25] <+MercSSBOT-1> [-][THR............UDEF]: ......UDEF
[08:54.27] <+MercSSBOT-2> [-][THR.............UDEF]: .......UDEF
[08:54.36] <+MercSSBOT-3> [-][THR..............UDEF]: ........UDEF

Thrudef code:
PHP код:
MsgAdminsF(3YELLOW" >  [TEST] Player %p moved through defence %d at %.1f, %.1f, %.1f"playeriddefenceid,
def_Data[defenceid][def_posX], def_Data[defenceid][def_posY], def_Data[defenceid][def_posZ]);
SendIrcStaffMessage("THRUDEF"sprintf("Player %p moved through defence %d at %.1f, %.1f, %.1f"playeriddefenceid,
def_Data[defenceid][def_posX], def_Data[defenceid][def_posY], def_Data[defenceid][def_posZ])); 
SendIrcStaffMessage code:

PHP код:
stock SendIrcStaffMessage(name[], text[])
{
    new
        
message[MAX_PLAYER_NAME 128];
    
strins(name"."strlen(name) / 2MAX_PLAYER_NAME);
    
format(messagesizeof(message), "[-][%s]: %s"nametext);
    
IRC_GroupSay(irc_Groupirc_StaffChanmessage);
    return 
1;

Any help would be very much appreciated. Thanks!
Reply
#2

Just going to bump this..
Reply
#3

Bump.
Reply
#4

Try using this, it should work fine:
pawn Код:
new string[144];
format(string, sizeof(string), " >  [TEST] Player %p moved through defence %d at %.1f, %.1f, %.1f", playerid, defenceid, \
def_Data[defenceid][def_posX], def_Data[defenceid][def_posY], def_Data[defenceid][def_posZ]);
MsgAdminsF(3, YELLOW, string);
SendIrcStaffMessage("THRUDEF", string);

stock SendIrcStaffMessage(name[], text[])
{
    new message[170];
    format(message, sizeof(message), "[-][%s]: %s", name, text);
    IRC_GroupSay(irc_Group, irc_StaffChan, message);
    return 1;
}
Reply
#5

Works perfectly, thank you very much!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)