input.c

TinyMAZE/src/io/input.c · 423 B

From the archive TinyMAZEv2.5a.tar.gz

Download the archive   « Back to the archive contents

#include <stdio.h>
#include "externs.h"
#include "db.h"

void query(DDATA *des, char *str)
{
  raw_notify(des->player, str, 0);

  set_state(des, STATE_WAITINPUT);
}

int check_input(DDATA *des, char *str)
{
  if(check_softcode_input(des->player, str))
    return(1);

  if(check_state(des, STATE_WAITINPUT))
  {
    notify(des->player, "Inputted.");
    set_state(des, STATE_CONNECTED);
    return(1);
  }

  return(0);
}

Site Stats

Snippets: 1791
Codebases: 571