aboutsummaryrefslogtreecommitdiff
path: root/src/commands/quit.rs
blob: 0f5c582e3e93217e005fa8f01961cf9cae1358ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use tw;
use ::Queryer;

use commands::Command;

pub static QUIT: Command = Command {
    keyword: "q",
    params: 0,
    exec: quit,
    param_str: "",
    // TODO: app name
    help_str: "Gracefully exit this thing"
};

fn quit(_line: String, tweeter: &mut tw::TwitterCache, _queryer: &mut Queryer) {
    tweeter.state = tw::AppState::Shutdown;
}