home *** CD-ROM | disk | FTP | other *** search
- // Copyright 1992, FutureSoft Technologies.
- // Feel free to use and modify this script however you see fit.
-
- main()
- {
- str disconnect_str[100];
- int ch;
- int f;
- int idx;
- str temp[100],stamp[100];
- int t;
- str date_str[20];
- str time_str[20];
-
- cputs("@^M");
- delay(20);
- cputs("D^M");
-
- while ((ch=cgetct(40)) != -1) {
- strcat(disconnect_str,ch);
- printc(ch);
- }
-
- if (strposi(disconnect_str,"DISCONNECT") != -1) {
- t = curtime();
- time(time_str,t);
- date(date_str,t);
- strcat(date_str," ");
- ustamp(date_str,1,0);
- ustamp(time_str,0,0);
-
- idx = strpos(disconnect_str,"D/");
- if (idx != -1) {
- substr(disconnect_str,idx,100,temp);
- idx = strpos(temp,"@")-4;
- substr(temp,0,idx,stamp);
- ustamp(stamp,0,1);
- }
- else
- ustamp("Corrupted Disconnect string from SprintNet",1,1);
-
- call("IPCP");
- }
- else {
-
- ustamp("Disconnect Unsuccessful",0,1);
- status_wind("Unsuccessful Disconnect!",50);
- }
- }
-