// File: /workspace/github_c_makefile_star2_O2/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, 0x2049b1(%rip)    # 0x21a4b8
je 0x15b3e
callq 0x13648
leaq 0x7ffe(%rip), %rsi      # 0x1db13
movq %rax, %rdi
callq 0x83c0
testq %rax, %rax
je 0x15b3e
leaq 0x100(%rsp), %rdx
movq %rsp, %rcx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x145db
testl %eax, %eax
je 0x15b90
cmpl $0x0, 0x205d83(%rip)    # 0x21b8c8
je 0x15b80
callq 0x13648
leaq 0x7fcc(%rip), %rsi      # 0x1db1f
movq %rax, %rdi
callq 0x83c0
testq %rax, %rax
je 0x15b80
leaq 0x100(%rsp), %rdx
movq %rsp, %rcx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x145db
testl %eax, %eax
je 0x15c01
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x205929(%rip), %rdi    # 0x21b4c0
movq %rsp, %rsi
callq 0x83c0
testq %rax, %rax
je 0x15b3e
leaq 0x100(%rsp), %r14
movq %r14, %rdi
callq 0x11270
movl %eax, %ebp
leaq 0x5c2f(%rip), %rsi      # 0x1b7ec
movq %r14, %rdi
callq 0x12e42
movl %eax, %r14d
callq 0x13472
movl %eax, %r15d
movq %rsp, %rdi
callq 0x8120
cmpl $0x2, %eax
jne 0x15b3e
orl %ebp, %r14d
orl %r15d, %r14d
je 0x15b3e
movq 0x20a27c(%rip), %rdi    # 0x21fe70
pushq $0x2
popq %rsi
callq 0xf1b1
jmp 0x15b3e
leaq 0x2064d0(%rip), %rdi    # 0x21c0d8
movq %rsp, %rsi
callq 0x83c0
testq %rax, %rax
je 0x15b80
leaq 0x100(%rsp), %r14
movq %r14, %rdi
callq 0x11270
movl %eax, %ebx
leaq 0x5bba(%rip), %rsi      # 0x1b7ec
movq %r14, %rdi
callq 0x12e42
movl %eax, %ebp
callq 0x13472
movl %eax, %r14d
movq %rsp, %rdi
callq 0x8120
cmpl $0x2, %eax
jne 0x15b80
orl %ebx, %ebp
orl %r14d, %ebp
je 0x15b80
movq 0x20a211(%rip), %rdi    # 0x21fe78
pushq $0x2
popq %rsi
callq 0xf1b1
jmp 0x15b80