Diffstat (limited to 'noncore/net/opieirc/ircsession.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp index 89df68c..122a943 100644 --- a/noncore/net/opieirc/ircsession.cpp +++ b/noncore/net/opieirc/ircsession.cpp | |||
@@ -27,24 +27,32 @@ void IRCSession::beginSession() { | |||
27 | void IRCSession::join(QString channelname) { | 27 | void IRCSession::join(QString channelname) { |
28 | m_connection->sendLine("JOIN "+channelname); | 28 | m_connection->sendLine("JOIN "+channelname); |
29 | } | 29 | } |
30 | 30 | ||
31 | void IRCSession::sendMessage(IRCPerson *person, QString message) { | 31 | void IRCSession::sendMessage(IRCPerson *person, QString message) { |
32 | m_connection->sendLine("PRIVMSG " + person->nick() + " :" + message); | 32 | m_connection->sendLine("PRIVMSG " + person->nick() + " :" + message); |
33 | } | 33 | } |
34 | 34 | ||
35 | void IRCSession::sendMessage(IRCChannel *channel, QString message) { | 35 | void IRCSession::sendMessage(IRCChannel *channel, QString message) { |
36 | m_connection->sendLine("PRIVMSG " + channel->channelname() + " :" + message); | 36 | m_connection->sendLine("PRIVMSG " + channel->channelname() + " :" + message); |
37 | } | 37 | } |
38 | 38 | ||
39 | void IRCSession::sendAction(IRCChannel *channel, QString message) { | ||
40 | m_connection->sendLine("PRIVMSG " + channel->channelname() + " :\001ACTION " + message + "\001"); | ||
41 | } | ||
42 | |||
43 | void IRCSession::sendAction(IRCPerson *person, QString message) { | ||
44 | m_connection->sendLine("PRIVMSG " + person->nick() + " :\001ACTION " + message + "\001"); | ||
45 | } | ||
46 | |||
39 | bool IRCSession::isSessionActive() { | 47 | bool IRCSession::isSessionActive() { |
40 | return m_connection->isConnected(); | 48 | return m_connection->isConnected(); |
41 | } | 49 | } |
42 | 50 | ||
43 | void IRCSession::endSession() { | 51 | void IRCSession::endSession() { |
44 | if (m_connection->isLoggedIn()) | 52 | if (m_connection->isLoggedIn()) |
45 | m_connection->sendLine("QUIT :" APP_VERSION); | 53 | m_connection->sendLine("QUIT :" APP_VERSION); |
46 | else | 54 | else |
47 | m_connection->close(); | 55 | m_connection->close(); |
48 | } | 56 | } |
49 | 57 | ||
50 | void IRCSession::part(IRCChannel *channel) { | 58 | void IRCSession::part(IRCChannel *channel) { |