让Hubot在HipChat中发送直接消息

时间:2015-09-03 19:54:20

标签: javascript hubot hipchat

如何告诉Hubot使用HipChat适配器发送直接消息?我没有成功地尝试过很多不同的选择。

format ELF executable
segment readable executable

SYS_EXIT_32BIT=1
SYS_EXIT_64BIT=60
SYS_WRITE=4
STDERR=2

entry $
    mov ax,cs
    cmp ax,0x23 ; 32 bit process on 64 bit kernel has this selector in CS
    jne kernelIs32Bit
    jmp 0x33:start64 ; switch to 64-bit segment
start64:
use64
    mov rax, qword 0xf4fa0b0ffafafafa ; would crash inside this if executed as 32 bit code
    xor rdi,rdi
    mov eax, SYS_EXIT_64BIT
    syscall
    ud2

use32
kernelIs32Bit:
    mov edx, msgLen
    mov ecx, msg
    mov ebx, STDERR
    mov eax, SYS_WRITE
    int 0x80
    dec ebx
    mov eax, SYS_EXIT_32BIT
    int 0x80
msg:
    db "Kernel appears to be 32 bit, can't jump to long mode segment",10
msgLen = $-msg

1 个答案:

答案 0 :(得分:4)

我花了一段时间才找到它,但事实证明这是有效的:

module.exports = function (robot) {
  robot.respond(/hi/i, function (msg) {
    robot.send({
      user: msg.message.user.jid
    }, 'hi');
  });
};