summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-08-12 20:10:06 +0200
committerattilamolnar <attilamolnar@hush.com>2013-08-12 20:10:06 +0200
commit37394a80c2b4a3948e4f0e850710c9518d9ba259 (patch)
tree9a15cf8cc9201f29ced2e510abc94e73c86db91a /src/channels.cpp
parent558eea33dc323518dba505a99ffbb19b8fbe1267 (diff)
Clean up a few constructors
Do not silently correct a zero TS in Channel::Channel(); require callers to supply a valid TS instead
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index c7913606f..cab4fb739 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -40,15 +40,10 @@ namespace
}
Channel::Channel(const std::string &cname, time_t ts)
+ : name(cname), age(ts), topicset(0)
{
if (!ServerInstance->chanlist->insert(std::make_pair(cname, this)).second)
throw CoreException("Cannot create duplicate channel " + cname);
-
- this->name = cname;
- this->age = ts ? ts : ServerInstance->Time();
-
- topicset = 0;
- modes.reset();
}
void Channel::SetMode(ModeHandler* mh, bool on)