// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/piantirush.c
// Function: piantirushChatCB
int piantirushChatCB( char *strIn )
{
    char clientID[256], chatLine[256];
    int isQualified = 0, errCode;

    if ( piantirushConfig.autoKickEarlyDestruction ) {
        if ( NULL != strstr( rosterGetObjectiveType(), "WeaponCache" ))  {
            if ( 0 == (errCode = rosterParsePlayerChat( strIn, 256, clientID, chatLine ))) {
                if ( NULL != strstr( piantirushConfig.earlyDestroyPlayerRequest, chatLine )) {

                    // check if this player is qualified to call this command 
                    //
                    isQualified  = apiIsPlayerAliveByGUID( clientID );
                    isQualified |= apiAuthIsAttribute( clientID, "deadcmdr" );
                    isQualified |= apiIsHotRestart();
                    if ( 2 != (int) strlen( chatLine )) isQualified = 0;
                    if ( isQualified ) 
                        alarmReset( rPtr, 2 );        // give answer 2 seconds later for cosmetics 
                }
            }
        }
    }

    if ( piantirushConfig.autoKickEarlyBreach ) {
        if ( NULL != strstr( rosterGetObjectiveType(), "Captur" ))  {
            if ( 0 == (errCode = rosterParsePlayerChat( strIn, 256, clientID, chatLine ))) {
                if ( NULL != strstr( piantirushConfig.earlyBreachPlayerRequest, chatLine )) {
 
                    // check if this player is qualified to call this command 
                    //
                    isQualified  = apiIsPlayerAliveByGUID( clientID );
                    isQualified |= apiAuthIsAttribute( clientID, "deadcmdr" );
                    isQualified |= apiIsHotRestart();
                    if ( 2 != (int) strlen( chatLine )) isQualified = 0;

                    if ( isQualified )
                        alarmReset( bPtr, 2 );        // give answer 2 seconds later for cosmetics  
                }
            }
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
cmpl $0x0, 0x203be4(%rip)    # 0x21a4b8
je 0x1690b
callq 0x14246
leaq 0x8261(%rip), %rsi      # 0x1eb43
movq %rax, %rdi
callq 0x83b0
testq %rax, %rax
je 0x1690b
leaq 0x100(%rsp), %rdx
movq %rsp, %rcx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x152a7
testl %eax, %eax
je 0x1695d
cmpl $0x0, 0x204fb6(%rip)    # 0x21b8c8
je 0x1694d
callq 0x14246
leaq 0x822f(%rip), %rsi      # 0x1eb4f
movq %rax, %rdi
callq 0x83b0
testq %rax, %rax
je 0x1694d
leaq 0x100(%rsp), %rdx
movq %rsp, %rcx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x152a7
testl %eax, %eax
je 0x169d0
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x204b5c(%rip), %rdi    # 0x21b4c0
movq %rsp, %rsi
callq 0x83b0
testq %rax, %rax
je 0x1690b
leaq 0x100(%rsp), %r14
movq %r14, %rdi
callq 0x11ba6
movl %eax, %ebp
leaq 0x5e80(%rip), %rsi      # 0x1c80a
movq %r14, %rdi
callq 0x138da
movl %eax, %r14d
callq 0x14031
movl %eax, %r15d
movq %rsp, %rdi
callq 0x8120
cmpl $0x2, %eax
jne 0x1690b
orl %ebp, %r14d
orl %r15d, %r14d
je 0x1690b
movq 0x2094af(%rip), %rdi    # 0x21fe70
movl $0x2, %esi
callq 0xf953
jmp 0x1690b
leaq 0x205701(%rip), %rdi    # 0x21c0d8
movq %rsp, %rsi
callq 0x83b0
testq %rax, %rax
je 0x1694d
leaq 0x100(%rsp), %r14
movq %r14, %rdi
callq 0x11ba6
movl %eax, %ebx
leaq 0x5e09(%rip), %rsi      # 0x1c80a
movq %r14, %rdi
callq 0x138da
movl %eax, %ebp
callq 0x14031
movl %eax, %r14d
movq %rsp, %rdi
callq 0x8120
cmpl $0x2, %eax
jne 0x1694d
orl %ebx, %ebp
orl %r14d, %ebp
je 0x1694d
movq 0x209442(%rip), %rdi    # 0x21fe78
movl $0x2, %esi
callq 0xf953
jmp 0x1694d