Changeset bfbf590
- Timestamp:
- Dec 24, 2006, 6:26:33 PM (17 years ago)
- 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)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
rf62550d rbfbf590 3262 3262 #ifdef HAVE_LIBZEPHYR 3263 3263 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."); 3269 3266 } 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 } 3298 3302 } 3299 }3300 owl_list_free_all(&anyone, owl_free);3303 owl_list_free_all(&anyone, owl_free); 3304 } 3301 3305 } 3302 3306 #endif 3303 3307 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 } 3309 3315 } 3310 3316 } -
owl.c
rf62550d rbfbf590 144 144 /* zephyr init */ 145 145 ret=owl_zephyr_initialize(); 146 if (ret) { 147 exit(1); 148 } 146 if (!ret) 147 owl_global_set_havezephyr(&g); 149 148 #endif 150 149 … … 201 200 owl_function_debugmsg("startup: first available debugging message"); 202 201 owl_global_set_startupargs(&g, argcsave, argvsave); 203 #ifdef HAVE_LIBZEPHYR204 owl_global_set_havezephyr(&g);205 #endif206 202 owl_global_set_haveaim(&g); 207 203 -
zephyr.c
r99dabee rbfbf590 34 34 { 35 35 #ifdef HAVE_LIBZEPHYR 36 unsuball(); 37 ZClosePort(); 36 if(owl_global_is_havezephyr(&g)) { 37 unsuball(); 38 ZClosePort(); 39 } 38 40 #endif 39 41 return(0); … … 43 45 { 44 46 #ifdef HAVE_LIBZEPHYR 45 return(ZPending()); 47 if(owl_global_is_havezephyr(&g)) 48 return(ZPending()); 49 else 50 return 0; 46 51 #else 47 52 return(0);
Note: See TracChangeset
for help on using the changeset viewer.