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

use commands::Command;

use std::process::exit;

pub static QUIT: Command = Command {
    keyword: "q",
    params: 0,
    exec: quit
};

fn quit(_line: String, tweeter: &mut tw::TwitterCache, _queryer: &mut Queryer) {
    tweeter.display_info.status("Bye bye!".to_owned());
    tweeter.store_cache();
    exit(0);
}