Esempio n. 1
0
/**
 * Send out of beer message immediately
 */
void doQuickChat3() {
  char message[ANX_INPUT_MAX];
  memset(message, '\0', ANX_INPUT_MAX); //initialize to null before using no matter wut
  sprintf(message, "I'M OUT OF BEER, HALP!");
  ANXRFSendChat(message);
  doChat();
}
Esempio n. 2
0
void doQuickChat5() {
  char message[ANX_INPUT_MAX];
  memset(message, '\0', ANX_INPUT_MAX); //initialize to null before using no matter wut
  sprintf(message, "A/S/L? ");
  ANXRFSendChat(message);
  doChat();
}
Esempio n. 3
0
void doQuickChat2() {
  char message[ANX_INPUT_MAX];
  memset(message, '\0', ANX_INPUT_MAX); //initialize to null before using no matter wut
  sprintf(message, "I'M AT ");
  ANXInputWindow(message, mi_main_chat, ANX_CHAT_MAX_LENGTH);
  if (strlen(message) > 0) {
    ANXRFSendChat(message);
    doChat();
  }
}
Esempio n. 4
0
ChatDlg::ChatDlg(QWidget *parent, int clientID) :
    QDialog(parent),
    clientID_(clientID),
    ui(new Ui::ChatDlg)
{

    ui->setupUi(this);

    // Signals and Slots--------------------------------------------
    connect(ui->lineEdit_input, SIGNAL(returnPressed()), this, SLOT(doChat()));

    this->setWindowOpacity(0.8);
    this->setWindowFlags(Qt::FramelessWindowHint);

    msg_ = new Message();
    msg_->setType(Message::CHAT);
    msg_->setID(clientID_);

}
Esempio n. 5
0
char doRegular(char expand, char c)
{
    char toReturn;
    int i;
    int done = 0;
    label doorinfo;

    toReturn = FALSE;

    for (i = 0; !expand && i < MAXEXTERN && extCmd[i].name[0]; ++i) {
        if (c == toupper(extCmd[i].name[0]) && (onConsole || !extCmd[i].local)) {
            done = 1;
            mPrintf("\b%s", extCmd[i].name);
            doCR();
            if (changedir(cfg.aplpath) == ERROR) {
                mPrintf("  -- Can't find application directory.\n\n");
                changedir(cfg.homepath);
            }
        /* apsystem(extCmd[i].command); */
            sprintf(doorinfo, "DORINFO%d.DEF", onConsole ? 0 : userdat.apl_com);
            extFmtRun(extCmd[i].command, doorinfo);
        }
    }
    if (!done) {
        switch (c) {

            case 'S':
                if (gl_user.sysop && expand) {
                    mPrintf("\b\bSysop Menu");
                    doCR();
                    doSysop();
                } else {
                    toReturn = TRUE;
                }
                break;

            case 'A':
                if (gl_user.aide) {
                    doAide(expand, 'E');
                } else {
                    toReturn = TRUE;
                }
                break;

            case 'C':
                doChat(expand, '\0');
                break;
            case 'D':
                doDownload(expand);
                break;
            case 'E':
                doEnter(expand, 'm');
                break;
            case 'F':
                doRead(expand, 'f');
                break;
            case 'G':
                doGoto(expand, FALSE);
                break;
            case 'H':
                doHelp(expand);
                break;
            case 'I':
                doIntro();
                break;
            case 'J':
                mPrintf("\bJump back to ");
                unGotoRoom();
                break;
            case 'K':
                doKnown(expand, 'r');
                break;
            case 'L':
                if (!loggedIn) {
                    doLogin(expand);
                } else {
                    if (!getYesNo(confirm, 0))
                        break;
                    doLogout(expand, 's');
                    doLogin(expand);
                }
                break;
            case 'N':
            case 'O':
            case 'R':
                doRead(expand, tolower(c));
                break;

            case 'B':
                doGoto(expand, TRUE);
                break;
            case 'T':
                doLogout(expand, 'q');
                break;
            case 'U':
                doUpload(expand);
                break;
            case 'X':
                if (!expand) {
                    doEnter(expand, 'x');
                } else {
                    doXpert();
                }
                break;

            case '=':
            case '+':
                doNext();
                break;
            case '\b':
                mPrintf("  ");
            case '-':
                doPrevious();
                break;

            case ']':
            case '>':
                doNextHall();
                break;
            case '[':
            case '<':
                doPreviousHall();
                break;
            case '~':
                mPrintf("\bAnsi %s\n ", gl_term.ansiOn ?
					gl_str.off : gl_str.on);
                gl_term.ansiOn = !gl_term.ansiOn;
                break;

            case '!':
                mPrintf("\bIBM Graphics %s\n ", gl_term.IBMOn ?
					gl_str.off:gl_str.on);
                gl_term.IBMOn = !gl_term.IBMOn;
                break;

            case '?':
                nextmenu("mainopt", &(cfg.cnt.mainopttut), 1);
				listExterns();
                break;

            case 0:     /* never gets here in shell mode... */
                if (newCarrier) {
                    greeting();

                    if (cfg.forcelogin) {
                        doCR();
                        doCR();
                        i = 0;
                        while (!loggedIn && gotCarrier()) {
                            doLogin(2);
                            if (++i > 3) {
                                Initport();
                                toReturn = TRUE;
                                break;
                            }
                        }
                    }
                    newCarrier = FALSE;
                }
                if (logBuf.lbflags.NODE && loggedIn) {
                    net_slave();

                    haveCarrier = FALSE;
                    modStat = FALSE;
                    newCarrier = FALSE;
                    justLostCarrier = FALSE;
                    onConsole = FALSE;
                    disabled = FALSE;
                    callout = FALSE;

                    delay(2000);

                    Initport();

                    cfg.callno++;
                    terminate(FALSE, FALSE);
                }
                if (justLostCarrier || ExitToMsdos) {
                    justLostCarrier = FALSE;
                    if (loggedIn)
                        terminate(FALSE, FALSE);
                }
                break;      /* irrelevant value */

            default:
                toReturn = TRUE;
                break;
        }
    }
    /* if they get unverified online */
    if (logBuf.VERIFIED)
        terminate(FALSE, FALSE);

    /* update25();	*/
	do_idle(0);
    return toReturn;
}