summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircperson.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc/ircperson.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircperson.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircperson.cpp b/noncore/net/opieirc/ircperson.cpp
index bd6b8d6..bd341f1 100644
--- a/noncore/net/opieirc/ircperson.cpp
+++ b/noncore/net/opieirc/ircperson.cpp
@@ -1,21 +1,27 @@
#include "ircperson.h"
#include <stdio.h>
IRCPerson::IRCPerson() {
m_nick = "";
m_user = "";
m_host = "";
}
+IRCPerson::IRCPerson(const IRCPerson &person) {
+ m_nick = person.m_nick;
+ m_user = person.m_user;
+ m_host = person.m_host;
+}
+
IRCPerson::IRCPerson(QString mask) {
IRCPerson();
fromMask(mask);
}
void IRCPerson::fromMask(QString mask) {
int sep1 = mask.find("!");
int sep2 = mask.find("@");
m_nick = mask.left(sep1);
m_user = mask.mid(sep1+1, sep2-sep1-1);
m_host = mask.right(mask.length()-sep2-1);