[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hooking to same event



Both are set to XCHAT_PRI_NORM.

Plugin 1:

int fxn1(char *word[], void *userdata) {

     int *index = (int *) userdata;
     char nick[32] = "";
     char message[256] = "";

     if (index[0] > 0) {
          strcpy(nick, word[index[0]]);
     }

     if (index[1] > 0) {
          strcpy(message, word[index[1]]);
     }

     control_cb(nick, message, index[2]);

     return XCHAT_EAT_NONE;

}

gdb always says 'control_cb(nick, message, index[2]);' is the line that's causing the problems.  

The function I run when the segfault occurs is

Plugin 2:

int check_fserves_cb() {
     notice_hook = xchat_hook_print(ph, "Notice", XCHAT_PRI_NORM, voice_cb, NULL);
     xchat_hook_timer(ph, 40000, voice_stop_notices_cb, NULL);
     count = 0;
     xchat_set_context(ph, voice_get_context("#lightshock"));
     xchat_command(ph, "msg #lightshock !list");
     xchat_command(ph, "msg #lightshock \0034:: \003Detecting new servers \0034::");
     return XCHAT_EAT_ALL;
}


-- 
bailey@tgpsolutions.com

Administrator, tgpsolutions
http://www.tgpsolutions.com

PGP signature