From: SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 31-MAY-1994 11:50:17.21 To: EVERHART CC: Subj: Re: OpenVMS message program Date: Tue, 31 May 1994 16:02:22 +0100 From: Arne Vajhoej Subject: Re: OpenVMS message program To: carl@SOL1.GPS.CALTECH.EDU, sl4hq@cc.usu.edu, INFO-VAX@SRI.COM Message-id: <01HCZTKZK5DU8WWAED@kopc.hhs.dk> X-VMS-To: KOPC::IN%"carl@SOL1.GPS.CALTECH.EDU" X-VMS-Cc: IN::"sl4hq@cc.usu.edu",IN::"INFO-VAX@SRI.COM" MIME-version: 1.0 Content-type: TEXT/PLAIN; CHARSET=ISO-8859-1 Content-transfer-encoding: 8BIT > =I'm looking for a program that will allow a user to send a message directly to > =another user's terminal on OpenVMS. (VMS will do...) Preferably, this > =wouldn't require operator priviliges. > > It has to have privileges. The following program can be INSTALLed with WORLD > and OPER privileges: Very nice program. But if it is installed with WORLD/OPER priv to allow unpriviliged users to send to each other, then I recommend a small modification to remove all non-printeble characters from the message (or at least , and other problematic characters). Arne Arne Vajhøj local DECNET: KO::ARNE Computer Department PSI: PSI%238310013040::ARNE Business School of Southern Denmark Internet: ARNE@KO.HHS.DK > #include descrip > #include brkdef > #include jpidef > #define ckstat(x) if (((stat = x) & 7) != 1) SYS$EXIT(stat) > long stat; > send() > { char msgbuffer[512], targetbuf[32], buffer[512], username[32]; > $DESCRIPTOR(msgbuf, msgbuffer); > $DESCRIPTOR(sendto, targetbuf); > $DESCRIPTOR(usrbuf, username); > $DESCRIPTOR(ctlstr, "\07Message from !AS!/!AS"); > $DESCRIPTOR(prompt1, "Username: "); > $DESCRIPTOR(prompt2, "Message: "); > $DESCRIPTOR(textbuf, buffer); > unsigned short iosb[4]; > > struct ITEM_LIST_3 > { unsigned short buflen, itmcod; > unsigned long bufadr, rsladr; > } itmlst[] = > { { 32, JPI$_USERNAME, username, &usrbuf.dsc$w_length }, > { 0, 0, 0, 0 } > }; > ckstat(LIB$GET_INPUT(&sendto, &prompt1, &sendto.dsc$w_length)); > ckstat(STR$UPCASE(&sendto, &sendto)); > ckstat(LIB$GET_INPUT(&textbuf, &prompt2, &textbuf.dsc$w_length)); > ckstat(SYS$GETJPIW(0, 0, 0, itmlst, iosb, 0, 0)); > ckstat(SYS$FAO(&ctlstr, &msgbuf.dsc$w_length, &msgbuf, &usrbuf, > &textbuf)); > ckstat(iosb[0]); > ckstat(SYS$BRKTHRUW(0, &msgbuf, &sendto, BRK$C_USERNAME, iosb, 0, 0, 0, > 0, 0, 0)); > SYS$EXIT(iosb[0]); > }