static int active;
static xchat_plugin* handle;

static int plugin_join(char* word[], char* word_eol[], void* data) {
  if (active != 0) {
    char nick[33];
    int i = 1;
    int j = 0;
    while (word[1][i] != '!') nick[j++] = word[1][i++];
    nick[j] = '\0';
    char* host = word[1];
    while (*host++ != '@');
    xchat_list* users = xchat_list_get(handle, "users");
    if (users != NULL) {
      while (xchat_list_next(handle, users) != 0) {
        char* nickhost = xchat_list_str(handle, users, "host");
        if (nickhost != NULL) {
          while (*nickhost++ != '@');
          if (xchat_nickcmp(handle, host, nickhost) == 0) {
            xchat_printf(handle, "Attention: %s est un clône de %s sur %s !", nick, xchat_list_str(handle, users, "nick"), word[3] + 1);
            xchat_command(handle, "GUI FLASH");
          }
        }
      }
      xchat_list_free(handle, users);
    }
  }
  return XCHAT_EAT_NONE;
}