Patch for making CenterICQ automagically set N/A wheen screen is detached. It's just an ugly hack, so nothing is set in config options, if you have your screen sessions somewhere else then the default place you have to change the patch. // danne@wiberg.nu --- src/centericq.cc.orig Thu Jan 27 00:52:47 2005 +++ src/centericq.cc Sun Feb 13 17:51:55 2005 @@ -1573,6 +1573,26 @@ if(timer_current-timer_keypress < MINCK0(paway, pna)*60) toset = available; + /* Check if we are still attached to our screen session */ + char * screen_socket_path, * screen_socket_name, * screen_user; + char screen_socket[256]; + int screen_attached=0; + + /* If we are not in a screen session we won't do this */ + if((screen_socket_name=getenv("STY"))!=NULL) { + screen_socket_path="/tmp/screens"; + screen_user=getenv("USER"); + sprintf(screen_socket, "%s/S-%s/%s", screen_socket_path, screen_user, screen_socket_name); + + + screen_attached = access(screen_socket, X_OK); + if(screen_attached!=0) { + toset = notavail; + if(autostat[notavail] == false) /* We just changed to away */ + face.log(_("+ Set N/A after screen detach")); + } + } + if(toset != offline && !autostat[toset]) { setauto(toset);