summaryrefslogtreecommitdiff
path: root/src/irc/iid.hpp
blob: a62ac719aa5e4a047f82d35e8e0a2804e31021ae (plain)
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
#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);
  explicit 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