~singpolyma/biboumi

ref: bf7b05ef72bbdac97704d262ddfe418908267535 biboumi/src/irc/iid.hpp -rw-r--r-- 766 bytes
bf7b05ef — Florent Le Coz Implement the Bridge class to translate between the two protocols 10 years ago
                                                                                
bf7b05ef Florent Le Coz
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
#ifndef IID_INCLUDED
# define IID_INCLUDED

#include <string>

/**
 * A name representing an IRC channel, on the same model than the XMPP JIDs (but much simpler).
 * The separator between the server and the channel name is '%'
 * #test%irc.freenode.org has :
 * - chan: "#test" (the # is part of the name, it could very well be absent, or & instead
 * - server: "irc.freenode.org"
 * #test has:
 * - chan: "#test"
 * - server: ""
 * %irc.freenode.org:
 * - chan: ""
 * - server: "irc.freenode.org"
 */
class Iid
{
public:
  explicit Iid(const std::string& iid);

  std::string chan;
  std::string server;

private:
  Iid(const Iid&) = delete;
  Iid(Iid&&) = delete;
  Iid& operator=(const Iid&) = delete;
  Iid& operator=(Iid&&) = delete;
};

#endif // IID_INCLUDED