Changeset bfbf590


Ignore:
Timestamp:
Dec 24, 2006, 6:26:33 PM (17 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
596c22df
Parents:
d0b3a40
git-author:
Nelson Elhage <nelhage@mit.edu> (12/24/06 18:25:33)
git-committer:
Nelson Elhage <nelhage@mit.edu> (12/24/06 18:26:33)
Message:
Don't quit if we can't contact the hostmaster. 
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rf62550d rbfbf590  
    32623262#ifdef HAVE_LIBZEPHYR
    32633263  if (zephyr) {
    3264     owl_fmtext_append_bold(&fm, "Zephyr users logged in:\n");
    3265     owl_list_create(&anyone);
    3266     ret=owl_zephyr_get_anyone_list(&anyone, filename);
    3267     if (ret) {
    3268       owl_fmtext_append_normal(&fm, "  Error opening file for zephyr buddies.\n");
     3264    if(!owl_global_is_havezephyr(&g)) {
     3265      owl_function_error("Zephyr currently not available.");
    32693266    } else {
    3270       j=owl_list_get_size(&anyone);
    3271       for (i=0; i<j; i++) {
    3272         user=owl_list_get_element(&anyone, i);
    3273         ret=ZLocateUser(user, &numlocs, ZAUTH);
    3274         if (ret!=ZERR_NONE) {
    3275           owl_function_error("Error getting location for %s", user);
    3276           continue;
    3277         }
    3278        
    3279         numlocs=200;
    3280         ret=ZGetLocations(location, &numlocs);
    3281         if (ret==0) {
    3282           for (x=0; x<numlocs; x++) {
    3283             line=malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100);
    3284             tmp=short_zuser(user);
    3285             sprintf(line, "  %-10.10s %-24.24s %-12.12s  %20.20s\n",
    3286                     tmp,
    3287                     location[x].host,
    3288                     location[x].tty,
    3289                     location[x].time);
    3290             owl_fmtext_append_normal(&fm, line);
    3291             owl_free(tmp);
    3292             owl_free(line);
    3293           }
    3294           if (numlocs>=200) {
    3295             owl_fmtext_append_normal(&fm, "  Too many locations found for this user, truncating.\n");
    3296           }
    3297         }
     3267      owl_fmtext_append_bold(&fm, "Zephyr users logged in:\n");
     3268      owl_list_create(&anyone);
     3269      ret=owl_zephyr_get_anyone_list(&anyone, filename);
     3270      if (ret) {
     3271        owl_fmtext_append_normal(&fm, "  Error opening file for zephyr buddies.\n");
     3272      } else {
     3273        j=owl_list_get_size(&anyone);
     3274        for (i=0; i<j; i++) {
     3275          user=owl_list_get_element(&anyone, i);
     3276          ret=ZLocateUser(user, &numlocs, ZAUTH);
     3277          if (ret!=ZERR_NONE) {
     3278            owl_function_error("Error getting location for %s", user);
     3279            continue;
     3280          }
     3281
     3282          numlocs=200;
     3283          ret=ZGetLocations(location, &numlocs);
     3284          if (ret==0) {
     3285            for (x=0; x<numlocs; x++) {
     3286              line=malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100);
     3287              tmp=short_zuser(user);
     3288              sprintf(line, "  %-10.10s %-24.24s %-12.12s  %20.20s\n",
     3289                      tmp,
     3290                      location[x].host,
     3291                      location[x].tty,
     3292                      location[x].time);
     3293              owl_fmtext_append_normal(&fm, line);
     3294              owl_free(tmp);
     3295              owl_free(line);
     3296            }
     3297            if (numlocs>=200) {
     3298              owl_fmtext_append_normal(&fm, "  Too many locations found for this user, truncating.\n");
     3299            }
     3300          }
     3301        }
    32983302      }
    3299     }
    3300     owl_list_free_all(&anyone, owl_free);
     3303      owl_list_free_all(&anyone, owl_free);
     3304    }
    33013305  }
    33023306#endif
    33033307
    3304   if(owl_perlconfig_is_function("owl::get_blist")) {
    3305       char * perlblist = owl_perlconfig_execute("owl::get_blist()");
    3306       if(perlblist) {
    3307           owl_fmtext_append_ztext(&fm, perlblist);
    3308           owl_free(perlblist);
     3308  if(aim && zephyr) {
     3309      if(owl_perlconfig_is_function("owl::get_blist")) {
     3310          char * perlblist = owl_perlconfig_execute("owl::get_blist()");
     3311          if(perlblist) {
     3312              owl_fmtext_append_ztext(&fm, perlblist);
     3313              owl_free(perlblist);
     3314          }
    33093315      }
    33103316  }
  • owl.c

    rf62550d rbfbf590  
    144144  /* zephyr init */
    145145  ret=owl_zephyr_initialize();
    146   if (ret) {
    147     exit(1);
    148   }
     146  if (!ret)
     147      owl_global_set_havezephyr(&g);
    149148#endif
    150149 
     
    201200  owl_function_debugmsg("startup: first available debugging message");
    202201  owl_global_set_startupargs(&g, argcsave, argvsave);
    203 #ifdef HAVE_LIBZEPHYR
    204   owl_global_set_havezephyr(&g);
    205 #endif
    206202  owl_global_set_haveaim(&g);
    207203
  • zephyr.c

    r99dabee rbfbf590  
    3434{
    3535#ifdef HAVE_LIBZEPHYR
    36   unsuball();
    37   ZClosePort();
     36  if(owl_global_is_havezephyr(&g)) {
     37    unsuball();
     38    ZClosePort();
     39  }
    3840#endif
    3941  return(0);
     
    4345{
    4446#ifdef HAVE_LIBZEPHYR
    45   return(ZPending());
     47  if(owl_global_is_havezephyr(&g))
     48    return(ZPending());
     49  else
     50    return 0;
    4651#else
    4752  return(0);
Note: See TracChangeset for help on using the changeset viewer.