-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathircconfig.cpp
42 lines (34 loc) · 1.12 KB
/
ircconfig.cpp
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
/*
* Copyright (C) 2001-2009 Jan Vidar Krey, [email protected]
* See the file "COPYING" for licensing details.
*/
#include "ircconfig.h"
IRC::ServerChannelConfig::ServerChannelConfig(const std::string& chan, const std::string& pwd, bool aj) : channel(chan), password(pwd), autojoin(aj)
{
}
IRC::ServerChannelConfig::~ServerChannelConfig()
{
}
IRC::ServerConfig::ServerConfig(const std::string& adr, uint16_t p, bool ssl_, const std::string& pwd) : address(adr), port(p), ssl(ssl_), password(pwd)
{
}
void IRC::ServerConfig::setIdentity(const std::string& nick_, const std::string& altnick_, const std::string& ident_, const std::string& fullname_)
{
nick = nick_;
altnick = altnick_;
ident = ident_;
fullname = fullname_;
}
void IRC::ServerConfig::addChannel(const std::string& channel, bool autojoin, const std::string& pwd)
{
ServerChannelConfig chan(channel, pwd, autojoin);
channels.push_back(chan);
}
void IRC::ServerConfig::getChannels(std::vector<ServerChannelConfig>& chans)
{
std::vector<ServerChannelConfig>::iterator it;
for (it = channels.begin(); it != channels.end(); it++)
{
chans.push_back(*it);
}
}