-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSecureSkat_irc.hh
77 lines (70 loc) · 2.99 KB
/
SecureSkat_irc.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*******************************************************************************
This file is part of SecureSkat.
Copyright (C) 2009, 2017, 2019 Heiko Stamer <HeikoStamer@gmx.net>
SecureSkat is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
SecureSkat is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with SecureSkat; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*******************************************************************************/
#ifndef INCLUDED_SecureSkat_irc_HH
#define INCLUDED_SecureSkat_irc_HH
#include "SecureSkat_defs.hh"
#include "SecureSkat_misc.hh"
int create_irc
(const std::string &server, short int port, iosocketstream **irc);
void init_irc
(iosocketstream *irc, const std::string &nickname);
void join_irc
(iosocketstream *irc, const std::string &c);
void who_irc
(iosocketstream *irc, const std::string &c);
std::string irc_prefix
(const std::string &input);
std::string irc_command
(const std::string &input);
std::string irc_params
(const std::string &input);
size_t irc_paramvec
(std::string input, std::vector<std::string> &v);
bool irc_command_cmp
(const std::string &input, const std::string &cmd);
void pipe_irc
(iosocketstream *irc, const std::string &irc_message,
const TMCG_SecretKey &sec, const std::string &keyid,
const std::map<std::string, std::string> &nick_players,
std::list<std::string> &tables,
std::map<std::string, int> &tables_r,
std::map<std::string, int> &tables_p,
std::map<std::string, std::string> &tables_u,
std::map<std::string, std::string> &tables_o);
bool irc_process
(iosocketstream *irc, const std::string &irc_reply, bool &entry_ok,
bool &first_entry, bool &irc_stat, const std::string &keyid,
const std::string &public_prefix,
std::map<std::string, pid_t> &games_tnr2pid,
std::map<pid_t, int> &games_ipipe,
std::map<std::string, TMCG_PublicKey> &nick_key,
std::map<std::string, std::string> &nick_players,
std::map<std::string, int> &nick_sl,
std::map<std::string, int> &nick_p7771,
std::map<std::string, int> &nick_p7772,
std::map<std::string, int> &nick_p7773,
std::map<std::string, int> &nick_p7774,
std::map<std::string, std::string> &nick_package,
std::list<std::string> &tables,
std::map<std::string, int> &tables_r,
std::map<std::string, int> &tables_p,
std::map<std::string, std::string> &tables_u,
std::map<std::string, std::string> &tables_o);
void done_irc
(iosocketstream *irc);
void release_irc
(int irc_handle, iosocketstream *irc);
#endif