KVIrc
4.9.2
DeveloperAPIs
|
An abstraction of a connection to an IRC server. More...
#include <KviIrcConnection.h>
Public Types | |
enum | CreateQueryVisibilityMode { CreateQueryVisibilityMinimized, CreateQueryVisibilityVisible, CreateQueryVisibilityFollowSettings } |
enum | State { Idle, Connecting, Connected } |
The possible "high level" states of this connection. More... | |
Public Slots | |
void | restartNotifyList () |
Called to restart the notify list. More... | |
void | unhighlightAllChannels () |
Called when we unhighlight all channels. More... | |
void | unhighlightAllQueries () |
Called when we unhighlight all queries. More... | |
Signals | |
void | awayStateChanged () |
Emitted when the away state changes. More... | |
void | chanListChanged () |
Emitted when the channels list change. More... | |
void | channelRegistered (KviChannelWindow *pChan) |
Emitted when we register a channel. More... | |
void | channelUnregistered (KviChannelWindow *pChan) |
Emitted when we unregister a channel. More... | |
void | nickNameChanged () |
Emitted when the nickname changes. More... | |
void | userModeChanged () |
Emitted when the user modes change. More... | |
Public Member Functions | |
KviIrcConnectionAntiCtcpFloodData * | antiCtcpFloodData () |
Returns a pointer to the KviIrcConnectionAntiCtcpFloodData object. More... | |
KviIrcConnectionAsyncWhoisData * | asyncWhoisData () |
Returns a pointer to the KviIrcConnectionAsyncWhoisData object. More... | |
KviPointerList < KviChannelWindow > * | channelList () |
Returns the list of the channels bound to the current connection. More... | |
void | clearOutputQueue (bool bPrivateMessagesOnly) |
void | closeAllChannels () |
Closes all the currently open channels not marked as dead. More... | |
void | closeAllQueries () |
Closes all the currently open queries not marked as dead. More... | |
KviConsoleWindow * | console () |
Returns a pointer to the owning console. More... | |
KviIrcContext * | context () |
Returns a pointer to the owning KviIrcContext. More... | |
KviChannelWindow * | createChannel (const QString &szName) |
Creates a new channel with the specified name. More... | |
KviQueryWindow * | createQuery (const QString &szNick, CreateQueryVisibilityMode eVisibilityMode=CreateQueryVisibilityFollowSettings) |
Creates a query with the specified nick as target. More... | |
const QString & | currentNetworkName () |
Helper that provides a shortcut for really common access to serverInfo()->networkName() More... | |
const QString & | currentNickName () |
Helper that provides a shortcut for really common access to userInfo()->nickName() More... | |
const QString & | currentServerName () |
Helper that provides a shortcut for really common access to serverInfo()->name() More... | |
const QString & | currentUserName () |
Helper that provides a shortcut for really common access to userInfo()->userName() More... | |
QString | decodeText (const char *szText) |
Decodes the specified text by using the server codec. More... | |
QByteArray | encodeText (const QString &szText) |
Encodes the specified text by using the local text codec. More... | |
KviChannelWindow * | findChannel (const QString &szName) |
Finds the channel with the specified unicode name. More... | |
KviQueryWindow * | findQuery (const QString &szNick) |
Finds the query with the specified nick. More... | |
int | getCommonChannels (const QString &szNick, QString &szChansBuffer, bool bAddEscapeSequences=true) |
Returns a list of channels bound to the current connection. More... | |
void | incomingMessage (const char *pcMessage) |
This function is part of the networking stack. More... | |
void | incomingMessageNoFilter (const char *pcMessage) |
This function is part of the networking stack. More... | |
void | keepChannelsOpenAfterDisconnect () |
Marks all the currently existing channels as DEAD. More... | |
void | keepQueriesOpenAfterDisconnect () |
Marks all the currently open queries as DEAD. More... | |
KviLagMeter * | lagMeter () |
Returns a pointer to the current KviLagMeter. More... | |
KviIrcLink * | link () |
Returns the underlying KviIrcLink object. More... | |
KviIrcConnectionNetsplitDetectorData * | netsplitDetectorData () |
Returns a pointer to the KviIrcConnectionNetsplitDetectorData object. More... | |
KviNotifyListManager * | notifyListManager () |
Returns a pointer to the current KviNotifyListManager. More... | |
unsigned int | outputQueueSize () |
Returns the current size of the output queue. More... | |
KviPointerList< KviQueryWindow > * | queryList () |
Returns the list of the currently open queries. More... | |
void | registerChannel (KviChannelWindow *c) |
void | registerQuery (KviQueryWindow *q) |
KviIrcConnectionRequestQueue * | requestQueue () |
Returns a pointer to the current KviIrcConnectionRequestQueue. More... | |
void | restartLagMeter () |
void | resurrectDeadQueries () |
This is the inverse of keepQueriesOpenAfterDisconnect(). More... | |
bool | sendData (const char *pcBuffer, int iBuflen=-1) |
Sends the specified text on the connected link (and thus socket). More... | |
bool | sendFmtData (const char *pcFmt,...) |
Sends the specified text on the connected link (and thus socket). More... | |
QTextCodec * | serverCodec () |
Returns a pointer to the current global codec for inbound data. More... | |
KviIrcConnectionServerInfo * | serverInfo () |
Returns a pointer to the KviIrcConnectionServerInfo object. More... | |
void | setEncoding (const QString &szEncoding) |
Sets the global encoding for this connection. More... | |
State | state () |
Returns the current state of the connection. More... | |
KviIrcConnectionStateData * | stateData () |
Returns a pointer to the KviIrcConnectionStateData object. More... | |
KviIrcConnectionStatistics * | statistics () |
Returns a pointer to the KviIrcConnectionStatistics object. More... | |
KviIrcConnectionTarget * | target () |
Returns the target of this connection. More... | |
QTextCodec * | textCodec () |
Returns a pointer to the current global codec for outbound text. More... | |
void | unregisterChannel (KviChannelWindow *c) |
void | unregisterQuery (KviQueryWindow *q) |
KviIrcUserDataBase * | userDataBase () |
Returns a pointer to the big connection user database. More... | |
KviIrcConnectionUserInfo * | userInfo () |
Returns a pointer to the KviIrcConnectionUserInfo object. More... | |
Protected Member Functions | |
void | abort () |
Kills any running connection or attempt. More... | |
void | changeAwayState (bool bAway) |
Called to update the away state. More... | |
bool | changeUserMode (char cMode, bool bSet) |
Called when MODE is received for each mode character. More... | |
void | delayedStartNotifyList () |
Starts the notify list in 15 seconds. More... | |
void | endInitialCapNegotiation () |
Called when we want to end CAP negotiation and go on wi the login. More... | |
void | endOfMotdReceived () |
Called to start the notify lists when RPL_ENDOFMOTD is received. More... | |
void | gatherChannelAndPasswordPairs (QList< QPair< QString, QString >> &lChannelsAndPasses) |
void | gatherQueryNames (QStringList &lQueryNames) |
void | handleAuthenticate (KviCString &szResponse) |
Called when AUTHENTICATE answer is received. More... | |
void | handleFailedInitialCapLs () |
Called when CAP LS negotiation fails. More... | |
void | handleInitialCapAck () |
Called when CAP ACK answer is received. More... | |
void | handleInitialCapLs () |
Called when CAP LS answer is received. More... | |
void | handleInitialCapNak () |
Called when CAP NAK answer is received. More... | |
void | heartbeat (kvi_time_t tNow) |
Called once in a while (every 5 secs at the moment) More... | |
void | joinChannels (const QList< QPair< QString, QString >> &lChannelsAndPasses) |
KviIrcConnection (KviIrcContext *pContext, KviIrcConnectionTarget *pTarget, KviUserIdentity *pIdentity) | |
Creates a KviIrcConnection object. More... | |
void | linkAttemptFailed (int iError) |
This signals that the connection attempt has failed. More... | |
void | linkEstablished () |
Called by KviIrcLink when the socket state changes to Connected. More... | |
void | linkTerminated () |
Called by KviIrcLink when the socket state changes to Ready. More... | |
void | loginComplete (const QString &szNickName) |
Called on the first numeric received from server. More... | |
void | loginToIrcServer () |
Logins to the irc server. More... | |
void | nickChange (const QString &szNewNick) |
Called when NICK is received. More... | |
QString | pickNextLoginNickName (bool bForceDefaultIfPrimaryNicknamesEmpty, const QString &szBaseNickForRandomChoices, QString &szChoiceDescriptionBuffer) |
void | resolveLocalHost () |
Resolves the localhost into an IP address. More... | |
void | serverInfoReceived (const QString &szServerName, const QString &szUserModes, const QString &szChanModes) |
Called when RPL_SERVINFO (004) is received and sets the info. More... | |
void | start () |
This starts an asynchronous connection attempt. More... | |
void | useProfileData (KviIdentityProfileSet *pSet, const QString &szNetwork) |
Uses the profiles' data as connection data. More... | |
void | useRealName (const QString &szRealName) |
void | userInfoReceived (const QString &szUserName, const QString &szHostName) |
Called on each JOIN and sets the info. More... | |
~KviIrcConnection () | |
Destroys a KviIrcConnection object. KviConsoleWindow uses this. More... | |
Private Slots | |
void | hostNameLookupTerminated (KviDnsResolver *pDns) |
Called when the hostname lookup is finished. More... | |
Private Member Functions | |
void | setupSrvCodec () |
Setups the codec for the server. More... | |
void | setupTextCodec () |
Setups the codec for the text. More... | |
Friends | |
class | KviConsoleWindow |
class | KviIrcContext |
class | KviIrcLink |
class | KviIrcServerParser |
An abstraction of a connection to an IRC server.
This class deals with the high-level logic of a connection to an IRC server. It's always attached to a KviIrcContext and thus to a KviConsoleWindow window. The connection has a KviIrcConnectionTarget object which specifies the data of the server that needs to be contacted and a KviUserIdentity object which specifies the user data to use.
The connection is the upper layer of the KVIrc networking stack. It owns KviIrcLink which is the layer immediately below and which in turn contains a KviIrcSocket.
The connection creates and manages a lot of objects that handle runtime information. These objects include a KviIrcConnectionUserInfo which contains the ACTUAL user information, KviIrcConnectionServerInfo which contains the ACTUAL server information, KviIrcUserDataBase which is substantially a big hash table containing all the users visible to KVIrc in this connection, a list of channels, a list of queries etc...
Visibility mode for createQuery()
|
protected |
Creates a KviIrcConnection object.
This is actually used only by KviConsoleWindow.
pContext must not be NULL and is kept as shallow pointer (that is, it's not owned and must persists for the entire life of KviIrcConnection: caller is responsable for that).
pTarget must not be NULL and must be allocated with new as this class takes the ownership.
pIdentity must not be NULL and must be allocated with new as this class takes the ownership.
pContext | The KviIrcContext we're attacched to |
pTarget | The server data |
pIdentity | User information to use in this connection |
References KviIrcContext::console(), Idle, KviIrcLink, m_bIdentdAttached, m_eState, m_pAntiCtcpFloodData, m_pAsyncWhoisData, m_pChannelList, m_pConsole, m_pContext, m_pLagMeter, m_pLink, m_pLocalhostDns, m_pNetsplitDetectorData, m_pNotifyListManager, m_pNotifyListTimer, m_pQueryList, m_pRequestQueue, m_pServerInfo, m_pStateData, m_pStatistics, m_pTarget, m_pUserDataBase, m_pUserIdentity, m_pUserInfo, KviPointerList< T >::setAutoDelete(), setupSrvCodec(), and setupTextCodec().
|
protected |
Destroys a KviIrcConnection object. KviConsoleWindow uses this.
References KviMainWindow::executeInternalCommand(), g_pMainWindow, KviDnsResolver::isRunning(), KVI_INTERNALCOMMAND_IDENT_STOP, m_bIdentdAttached, m_pAntiCtcpFloodData, m_pAsyncWhoisData, m_pChannelList, m_pLagMeter, m_pLink, m_pLocalhostDns, m_pNetsplitDetectorData, m_pNotifyListManager, m_pNotifyListTimer, m_pQueryList, m_pRequestQueue, m_pServerInfo, m_pStateData, m_pStatistics, m_pTarget, m_pUserDataBase, m_pUserIdentity, and m_pUserInfo.
|
protected |
Kills any running connection or attempt.
References KviIrcLink::abort(), and m_pLink.
Referenced by KviIrcContext::terminateConnectionRequest().
|
inline |
Returns a pointer to the KviIrcConnectionAntiCtcpFloodData object.
It contains data private to the Anti CTCP Flood engine. Very similar to KviIrcConnectionStateData but dedicated to Ctcp flood. The returned pointer is never NULL. Include "KviIrcConnectionAntiCtcpFloodData.h" as the class is only forwarded here.
Referenced by KviIrcServerParser::checkCtcpFlood().
|
inline |
Returns a pointer to the KviIrcConnectionAsyncWhoisData object.
It contains data private to the async whois engine. Very similar to KviIrcConnectionStateData but dedicated to async whois. The returned pointer is never NULL. Include "KviIrcConnectionAsyncWhoisData.h" as the class is only forwarded here.
Referenced by KviIrcServerParser::parseNumericEndOfWhois(), KviIrcServerParser::parseNumericNoSuchNick(), KviIrcServerParser::parseNumericNoSuchServer(), KviIrcServerParser::parseNumericWhoisActually(), KviIrcServerParser::parseNumericWhoisAuth(), KviIrcServerParser::parseNumericWhoisAway(), KviIrcServerParser::parseNumericWhoisChannels(), KviIrcServerParser::parseNumericWhoisIdle(), KviIrcServerParser::parseNumericWhoisOther(), KviIrcServerParser::parseNumericWhoisServer(), and KviIrcServerParser::parseNumericWhoisUser().
|
signal |
|
protected |
Called to update the away state.
bAway | Whether we enter the away mode |
References awayStateChanged(), KviMainWindow::childConnectionAwayStateChange(), g_pMainWindow, m_pConsole, m_pUserInfo, KviIrcConnectionUserInfo::setAway(), KviIrcConnectionUserInfo::setBack(), and KviWindow::updateCaption().
Referenced by KviIrcServerParser::parseNumericAway(), and KviIrcServerParser::parseNumericBackFromAway().
|
protected |
Called when MODE is received for each mode character.
cMode | The mode flag :) |
bSet | Whether to set the mode |
References KviIrcConnectionUserInfo::addUserMode(), KviMainWindow::childConnectionUserModeChange(), g_pMainWindow, KviIrcConnectionUserInfo::hasUserMode(), m_pConsole, m_pUserInfo, KviIrcConnectionUserInfo::removeUserMode(), KviWindow::updateCaption(), and userModeChanged().
Referenced by KviIrcServerParser::parseUserMode().
|
signal |
Emitted when the channels list change.
Referenced by registerChannel(), and unregisterChannel().
|
inline |
Returns the list of the channels bound to the current connection.
The pointer itself is never null (though the list may be empty).
Referenced by KviConsoleWindow::avatarChangedUpdateWindows(), KviConsoleWindow::getWindowListTipText(), KviIsOnNotifyListManager::handleIsOn(), KviIrcServerParser::parseLiteralChghost(), KviIrcServerParser::parseLiteralNick(), KviIrcServerParser::parseLiteralQuit(), KviIrcUrl::run(), and KviConsoleWindow::updateUri().
|
signal |
Emitted when we register a channel.
pChan | The channel :) |
Referenced by registerChannel().
|
signal |
Emitted when we unregister a channel.
pChan | The channel :) |
Referenced by unregisterChannel().
void KviIrcConnection::clearOutputQueue | ( | bool | bPrivateMessagesOnly | ) |
Clears the underlying output queue. Exposed basically for /context.clearQueue You shouldn't need it for any other reason :)
References KviIrcLink::clearOutputQueue(), and m_pLink.
Referenced by context_kvs_cmd_clearQueue().
void KviIrcConnection::closeAllChannels | ( | ) |
Closes all the currently open channels not marked as dead.
References KviPointerList< T >::first(), and m_pChannelList.
Referenced by KviIrcContext::destroyConnection().
void KviIrcConnection::closeAllQueries | ( | ) |
Closes all the currently open queries not marked as dead.
References KviPointerList< T >::first(), and m_pQueryList.
Referenced by KviIrcContext::destroyConnection().
|
inline |
Returns a pointer to the owning console.
The pointer is never NULL
Referenced by heartbeat(), KviIrcConnectionTargetResolver::KviIrcConnectionTargetResolver(), KviIrcLink::KviIrcLink(), KviIrcMessage::KviIrcMessage(), KviNotifyListManager::KviNotifyListManager(), KviLagMeter::lagCheckAbort(), KviLagMeter::lagCheckComplete(), KviLagMeter::lagCheckRegister(), KviStatusBarAwayIndicator::mouseDoubleClickEvent(), KviAsyncAvatarSelectionDialog::okClicked(), KviIrcServerParser::parseMessage(), KviIrcServerParser::parseNumericCodePageScheme(), KviIrcServerParser::parseNumericCodePageSet(), KviLagMeter::timerEvent(), and useRealName().
|
inline |
Returns a pointer to the owning KviIrcContext.
The returned value is never NULL
Referenced by KviMainWindow::childConnectionAwayStateChange(), KviMainWindow::childConnectionLagChange(), KviMainWindow::childConnectionNickNameChange(), KviMainWindow::childConnectionServerInfoChange(), KviMainWindow::childConnectionUserModeChange(), incomingMessage(), linkAttemptFailed(), linkEstablished(), linkTerminated(), loginComplete(), KviIrcServerParser::parseNumeric001(), KviIrcServerParser::parseNumeric002(), KviIrcServerParser::parseNumeric003(), KviIrcServerParser::parseNumeric004(), KviIrcServerParser::parseNumeric005(), sendData(), and sendFmtData().
KviChannelWindow * KviIrcConnection::createChannel | ( | const QString & | szName | ) |
Creates a new channel with the specified name.
This should be called in response to a JOIN message. This function assumes that such a channel doesn't exist yet (or if it exists then it's actually in DEAD state). You can assume that channel creation never fails: if the returned pointer is NULL then we're screwed anyway as virtual memory is exausted.
szName | The name of the channel |
References KviMainWindow::addWindow(), c, KviIrcContext::findDeadChannel(), g_pMainWindow, KVI_OPTION_BOOL, KviOption_boolCreateMinimizedChannels, KviOption_boolPasteLastLogOnChannelJoin, m_pConsole, m_pContext, KviChannelWindow::pasteLastLog(), KviMainWindow::setActiveWindow(), and KviChannelWindow::setAliveChan().
Referenced by KviIrcServerParser::parseLiteralJoin().
KviQueryWindow * KviIrcConnection::createQuery | ( | const QString & | szNick, |
CreateQueryVisibilityMode | eVisibilityMode = CreateQueryVisibilityFollowSettings |
||
) |
Creates a query with the specified nick as target.
This function assumes that such a query doesn't exist yet (or if it exists it's actually marked as dead and needs to be resurrected).
szNick | The nickname of the user |
eShowMode | Specifies the show mode for the window |
References KviMainWindow::addWindow(), CreateQueryVisibilityMinimized, CreateQueryVisibilityVisible, KviIrcContext::findDeadQuery(), findQuery(), g_pMainWindow, KVI_OPTION_BOOL, KviOption_boolCreateIncomingQueriesAsMinimized, m_pConsole, m_pContext, q, KviMainWindow::setActiveWindow(), and KviQueryWindow::setAliveQuery().
Referenced by loginComplete(), KviIrcServerParser::parseCtcpRequestAction(), KviIrcServerParser::parseLiteralNotice(), and KviIrcServerParser::parseLiteralPrivmsg().
const QString & KviIrcConnection::currentNetworkName | ( | ) |
Helper that provides a shortcut for really common access to serverInfo()->networkName()
References m_pServerInfo, and KviIrcConnectionServerInfo::networkName().
Referenced by KviWindowListBase::getTextForConsole(), and KviStatusBar::mouseDoubleClickEvent().
const QString & KviIrcConnection::currentNickName | ( | ) |
Helper that provides a shortcut for really common access to userInfo()->nickName()
References KviIrcConnectionUserInfo::nickName(), and userInfo().
Referenced by avatar_kvs_cmd_notify(), avatar_kvs_cmd_set(), avatar_kvs_cmd_unset(), avatar_kvs_fnc_name(), avatar_kvs_fnc_path(), KviUserListEntry::color(), KviIrcContextDisplay::drawContents(), KviQueryWindow::fillCaptionBuffers(), KviChannelWindow::fillCaptionBuffers(), KviApplication::fillRecentNicknamesPopup(), KviApplication::findConsole(), KviIrcView::getTextLine(), KviKvsCoreSimpleCommands::KVSCSC(), KviChannelWindow::ownAction(), KviUserListViewArea::paintEvent(), KviIrcServerParser::parseLiteralNotice(), KviIrcServerParser::parseNumericCodePageSet(), KviStatusBar::setPermanentMessage(), KviIsOnNotifyListManager::start(), KviStupidNotifyListManager::start(), KviWatchNotifyListManager::start(), KviIsOnNotifyListManager::stop(), KviStupidNotifyListManager::stop(), and KviWatchNotifyListManager::stop().
const QString & KviIrcConnection::currentServerName | ( | ) |
Helper that provides a shortcut for really common access to serverInfo()->name()
References KviIrcConnectionServerInfo::name(), and serverInfo().
Referenced by LinksWindow::connectionStateChange(), ListWindow::connectionStateChange(), KviIrcMessage::decodeAndSplitPrefix(), KviIrcContextDisplay::drawContents(), KviQueryWindow::fillCaptionBuffers(), KviChannelWindow::fillCaptionBuffers(), KviApplication::findConsole(), KviWindowListBase::getTextForConsole(), KviStatusBar::mouseDoubleClickEvent(), KviIrcServerParser::parseLiteralNotice(), KviIrcMessage::safePrefix(), KviStatusBar::setPermanentMessage(), and KviIrcContextDisplay::tipRequest().
const QString & KviIrcConnection::currentUserName | ( | ) |
Helper that provides a shortcut for really common access to userInfo()->userName()
References userInfo(), and KviIrcConnectionUserInfo::userName().
QString KviIrcConnection::decodeText | ( | const char * | szText | ) |
Decodes the specified text by using the server codec.
You should first attempt to decode the text by using the window codec (if you belong to a window).
szText | The text to decode |
References m_pSrvCodec.
Referenced by KviIrcMessage::decodeAndSplitMask(), KviIrcServerParser::echoCtcpReply(), KviIrcServerParser::echoCtcpRequest(), KviIsOnNotifyListManager::handleIsOn(), KviStupidNotifyListManager::handleIsOn(), KviIsOnNotifyListManager::handleUserhost(), KviWatchNotifyListManager::handleWatchReply(), KviIrcServerParser::otherChannelError(), KviIrcServerParser::parseChannelHelp(), KviIrcServerParser::parseChannelMode(), KviIrcServerParser::parseCommandEndOfHelp(), KviIrcServerParser::parseCommandHelp(), KviIrcServerParser::parseCommandSyntaxHelp(), KviIrcServerParser::parseCtcpReply(), KviIrcServerParser::parseCtcpRequest(), KviIrcServerParser::parseCtcpRequestAction(), KviIrcServerParser::parseCtcpRequestPage(), KviIrcServerParser::parseLiteralAccount(), KviIrcServerParser::parseLiteralAway(), KviIrcServerParser::parseLiteralCap(), KviIrcServerParser::parseLiteralChghost(), KviIrcServerParser::parseLiteralError(), KviIrcServerParser::parseLiteralInvite(), KviIrcServerParser::parseLiteralJoin(), KviIrcServerParser::parseLiteralKick(), KviIrcServerParser::parseLiteralMode(), KviIrcServerParser::parseLiteralNick(), KviIrcServerParser::parseLiteralNotice(), KviIrcServerParser::parseLiteralPart(), KviIrcServerParser::parseLiteralPing(), KviIrcServerParser::parseLiteralPong(), KviIrcServerParser::parseLiteralPrivmsg(), KviIrcServerParser::parseLiteralQuit(), KviIrcServerParser::parseLiteralTopic(), KviIrcServerParser::parseLiteralWallops(), KviIrcServerParser::parseLoginNicknameProblem(), KviIrcServerParser::parseMessage(), KviIrcMessage::parseMessageTags(), KviIrcServerParser::parseNumeric001(), KviIrcServerParser::parseNumeric002(), KviIrcServerParser::parseNumeric003(), KviIrcServerParser::parseNumeric004(), KviIrcServerParser::parseNumeric005(), KviIrcServerParser::parseNumeric367(), KviIrcServerParser::parseNumeric368(), KviIrcServerParser::parseNumeric486(), KviIrcServerParser::parseNumeric742(), KviIrcServerParser::parseNumericAlreadyRegistered(), KviIrcServerParser::parseNumericAway(), KviIrcServerParser::parseNumericBackFromAway(), KviIrcServerParser::parseNumericBanOnChan(), KviIrcServerParser::parseNumericCannotSend(), KviIrcServerParser::parseNumericCannotSendColor(), KviIrcServerParser::parseNumericCantJoinChannel(), KviIrcServerParser::parseNumericChannelModeIs(), KviIrcServerParser::parseNumericChanUrl(), KviIrcServerParser::parseNumericCodePageScheme(), KviIrcServerParser::parseNumericCodePageSet(), KviIrcServerParser::parseNumericCommandSyntax(), KviIrcServerParser::parseNumericCreationTime(), KviIrcServerParser::parseNumericEndOfNames(), KviIrcServerParser::parseNumericEndOfQuietList(), KviIrcServerParser::parseNumericEndOfStats(), KviIrcServerParser::parseNumericEndOfWho(), KviIrcServerParser::parseNumericEndOfWhois(), KviIrcServerParser::parseNumericEndOfWhowas(), KviIrcServerParser::parseNumericForward(), KviIrcServerParser::parseNumericHiddenHost(), KviIrcServerParser::parseNumericInfo(), KviIrcServerParser::parseNumericInvited(), KviIrcServerParser::parseNumericInviting(), KviIrcServerParser::parseNumericIsOn(), KviIrcServerParser::parseNumericLinks(), KviIrcServerParser::parseNumericList(), KviIrcServerParser::parseNumericMotd(), KviIrcServerParser::parseNumericMotdMissing(), KviIrcServerParser::parseNumericNames(), KviIrcServerParser::parseNumericNeedSSL(), KviIrcServerParser::parseNumericNicknameProblem(), KviIrcServerParser::parseNumericNoPrivs(), KviIrcServerParser::parseNumericNoSuchChannel(), KviIrcServerParser::parseNumericNoSuchNick(), KviIrcServerParser::parseNumericNoSuchServer(), KviIrcServerParser::parseNumericNotEnoughParams(), KviIrcServerParser::parseNumericNotifyGeneric(), KviIrcServerParser::parseNumericNoTopic(), KviIrcServerParser::parseNumericNotRegistered(), KviIrcServerParser::parseNumericOftcEndOfQuietList(), KviIrcServerParser::parseNumericOftcQuietList(), KviIrcServerParser::parseNumericPasswordIncorrect(), KviIrcServerParser::parseNumericQuietList(), KviIrcServerParser::parseNumericSaslFail(), KviIrcServerParser::parseNumericSaslLogin(), KviIrcServerParser::parseNumericServerAdminInfoAdminContact(), KviIrcServerParser::parseNumericServerAdminInfoAdminName(), KviIrcServerParser::parseNumericServerAdminInfoServerName(), KviIrcServerParser::parseNumericServerAdminInfoTitle(), KviIrcServerParser::parseNumericStats(), KviIrcServerParser::parseNumericTime(), KviIrcServerParser::parseNumericTopic(), KviIrcServerParser::parseNumericTopicWhoTime(), KviIrcServerParser::parseNumericTryAgain(), KviIrcServerParser::parseNumericUnavailResource(), KviIrcServerParser::parseNumericUnknownCommand(), KviIrcServerParser::parseNumericUserhost(), KviIrcServerParser::parseNumericUserInChan(), KviIrcServerParser::parseNumericUsersDontMatch(), KviIrcServerParser::parseNumericWhoisActually(), KviIrcServerParser::parseNumericWhoisAuth(), KviIrcServerParser::parseNumericWhoisAway(), KviIrcServerParser::parseNumericWhoisChannels(), KviIrcServerParser::parseNumericWhoisIdle(), KviIrcServerParser::parseNumericWhoisOther(), KviIrcServerParser::parseNumericWhoisRegistered(), KviIrcServerParser::parseNumericWhoisServer(), KviIrcServerParser::parseNumericWhoisUser(), KviIrcServerParser::parseNumericWhospcrpl(), KviIrcServerParser::parseNumericWhowasUser(), KviIrcServerParser::parseNumericYouHaveCallerID(), KviIrcServerParser::parseNumericYoureOper(), KviIrcServerParser::parseNumericYourUID(), and ListWindow::processData().
|
protected |
Starts the notify list in 15 seconds.
We have this delay to wait an eventual RPL_PROTOCTL from the server telling us that the WATCH notify list method is supported
References connect(), KVI_ASSERT, m_pNotifyListTimer, and restartNotifyList().
Referenced by loginComplete().
QByteArray KviIrcConnection::encodeText | ( | const QString & | szText | ) |
Encodes the specified text by using the local text codec.
You should first attempt to encode the text by using the window codec (if you belong to a window).
szText | The text to encode |
References m_pSrvCodec.
Referenced by KviMaskInputDialog::accept(), avatar_kvs_cmd_notify(), avatar_kvs_cmd_query(), KviChannelWindow::closeEvent(), DccChatWindow::connectionInProgress(), DccVoiceWindow::connectionInProgress(), DccVideoWindow::connectionInProgress(), DccFileTransfer::connectionInProgress(), dcc_kvs_cmd_chat(), dcc_kvs_cmd_get(), dcc_module_reply_errmsg(), dccModuleParseDccGet(), KviTrayIconWidget::doAway(), DccFileTransfer::doResume(), KviKvsTreeNodeAliasSimpleCommand::execute(), handleAuthenticate(), DccBroker::handleResumeRequest(), heartbeat(), ListWindow::itemDoubleClicked(), joinChannels(), KviKvsCoreSimpleCommands::KVSCSC(), loginComplete(), loginToIrcServer(), KviChannelWindow::ownAction(), KviQueryWindow::ownMessage(), KviChannelWindow::ownMessage(), KviIrcServerParser::parseCtcpReplyAvatar(), KviIrcServerParser::parseCtcpRequestPing(), KviIrcServerParser::parseLiteralKick(), KviIrcServerParser::parseLiteralPing(), KviIrcServerParser::parseLoginNicknameProblem(), KviUserInput::parseNonCommand(), KviIrcServerParser::parseNumericAway(), KviIrcServerParser::parseNumericBackFromAway(), KviIrcServerParser::parseNumericWhospcrpl(), KviChannelWindow::removeMasks(), KviIrcServerParser::replyCtcp(), ListWindow::requestList(), DccBroker::rsendExecute(), KviIrcUrl::run(), KviIsOnNotifyListManager::sendIsOn(), KviStupidNotifyListManager::sendIsOn(), KviIsOnNotifyListManager::sendUserhost(), KviChannelWindow::setAliveChan(), KviChannelWindow::setMode(), KviWatchNotifyListManager::start(), DccFileTransfer::startConnection(), KviIrcContext::terminateConnectionRequest(), KviLagMeter::timerEvent(), KviIrcConnectionRequestQueue::timerSlot(), KviChannelWindow::toggleListModeEditor(), and KviChannelWindow::topicSelected().
|
protected |
Called when we want to end CAP negotiation and go on wi the login.
References loginToIrcServer(), m_pStateData, sendFmtData(), and KviIrcConnectionStateData::setInsideAuthenticate().
Referenced by handleInitialCapAck(), handleInitialCapLs(), handleInitialCapNak(), KviIrcServerParser::parseNumericSaslFail(), KviIrcServerParser::parseNumericSaslLogin(), and KviIrcServerParser::parseNumericSaslSuccess().
|
protected |
Called to start the notify lists when RPL_ENDOFMOTD is received.
References m_pNotifyListTimer, and restartNotifyList().
Referenced by KviIrcServerParser::parseNumericMotd().
KviChannelWindow * KviIrcConnection::findChannel | ( | const QString & | szName | ) |
Finds the channel with the specified unicode name.
Returns the pointer to the channel found or NULL if there is no such channel.
szName | The name of the channel |
References c, KviQString::equalCI(), KviPointerList< T >::first(), m_pChannelList, and KviPointerList< T >::next().
Referenced by KviIrcView::doLinkToolTip(), KviIrcServerParser::echoCtcpReply(), KviIrcServerParser::echoCtcpRequest(), KviApplication::fillRecentChannelsPopup(), KviKvsCoreFunctions::KVSCF(), KviIrcServerParser::otherChannelError(), KviIrcServerParser::parseChannelHelp(), KviIrcServerParser::parseCtcpReplyPing(), KviIrcServerParser::parseCtcpRequestAction(), KviIrcServerParser::parseLiteralJoin(), KviIrcServerParser::parseLiteralKick(), KviIrcServerParser::parseLiteralMode(), KviIrcServerParser::parseLiteralNotice(), KviIrcServerParser::parseLiteralPart(), KviIrcServerParser::parseLiteralPrivmsg(), KviIrcServerParser::parseLiteralTopic(), KviIrcServerParser::parseNumeric367(), KviIrcServerParser::parseNumeric368(), KviIrcServerParser::parseNumeric742(), KviIrcServerParser::parseNumericBanOnChan(), KviIrcServerParser::parseNumericCannotSend(), KviIrcServerParser::parseNumericCannotSendColor(), KviIrcServerParser::parseNumericCantJoinChannel(), KviIrcServerParser::parseNumericChannelModeIs(), KviIrcServerParser::parseNumericChanUrl(), KviIrcServerParser::parseNumericCreationTime(), KviIrcServerParser::parseNumericEndOfNames(), KviIrcServerParser::parseNumericEndOfQuietList(), KviIrcServerParser::parseNumericEndOfWho(), KviIrcServerParser::parseNumericInvited(), KviIrcServerParser::parseNumericInviting(), KviIrcServerParser::parseNumericNames(), KviIrcServerParser::parseNumericNeedSSL(), KviIrcServerParser::parseNumericNoTopic(), KviIrcServerParser::parseNumericOftcEndOfQuietList(), KviIrcServerParser::parseNumericOftcQuietList(), KviIrcServerParser::parseNumericQuietList(), KviIrcServerParser::parseNumericTopic(), KviIrcServerParser::parseNumericTopicWhoTime(), KviIrcServerParser::parseNumericUserInChan(), KviIrcServerParser::parseNumericWhoReply(), and KviIrcServerParser::parseNumericWhospcrpl().
KviQueryWindow * KviIrcConnection::findQuery | ( | const QString & | szNick | ) |
Finds the query with the specified nick.
Returns the pointer to the query found or NULL if there is no such query.
szNick | The nickname of the user |
References c, KviQString::equalCI(), KviPointerList< T >::first(), m_pQueryList, and KviPointerList< T >::next().
Referenced by createQuery(), KviKvsCoreFunctions::KVSCF(), loginComplete(), KviIrcServerParser::parseCtcpRequestAction(), KviIrcServerParser::parseLiteralChghost(), KviIrcServerParser::parseLiteralJoin(), KviIrcServerParser::parseLiteralKick(), KviIrcServerParser::parseLiteralNick(), KviIrcServerParser::parseLiteralNotice(), KviIrcServerParser::parseLiteralPart(), KviIrcServerParser::parseLiteralPrivmsg(), KviIrcServerParser::parseLiteralQuit(), KviIrcServerParser::parseNumeric486(), KviIrcServerParser::parseNumericNoSuchNick(), KviIrcServerParser::parseNumericNotifyGeneric(), KviIrcServerParser::parseNumericWhoisAway(), KviIrcServerParser::parseNumericWhoisServer(), KviIrcServerParser::parseNumericWhoisUser(), KviIrcServerParser::parseNumericWhoReply(), KviIrcServerParser::parseNumericWhospcrpl(), and KviIrcServerParser::parseNumericYouHaveCallerID().
|
protected |
Gather the list of currently joined channels with the relative passwords.
References c, KviPointerList< T >::first(), m_pChannelList, and KviPointerList< T >::next().
Referenced by KviIrcContext::connectionTerminated().
|
protected |
Gather the list of currently open query names.
References KviPointerList< T >::first(), m_pQueryList, KviPointerList< T >::next(), and q.
Referenced by KviIrcContext::connectionTerminated().
int KviIrcConnection::getCommonChannels | ( | const QString & | szNick, |
QString & | szChansBuffer, | ||
bool | bAddEscapeSequences = true |
||
) |
Returns a list of channels bound to the current connection.
This is actually the list of channels that the local user has in common with the specified user. The list is returned as a comma separated string. If bAddEscapeSequences is true, then the string includes special escape sequences for KviIrcView that will make the channel names clickable.
Returns the number of channels found.
szNick | The nickname of the user |
szChansBuffer | The buffer where to store data |
bAddEscapeSequences | Whether to include escape sequences |
References KviQString::appendFormatted(), c, KviPointerList< T >::first(), m_pChannelList, and KviPointerList< T >::next().
Referenced by chan_kvs_fnc_common(), KviQueryWindow::getInfoLabelText(), KviIrcServerParser::parseLiteralJoin(), KviIrcServerParser::parseLiteralKick(), KviIrcServerParser::parseLiteralNick(), KviIrcServerParser::parseLiteralPart(), and KviQueryWindow::setTarget().
|
protected |
Called when AUTHENTICATE answer is received.
References encodeText(), KviIrcConnectionStateData::isInsideAuthenticate(), m_pStateData, KviSASL::plainMethod(), KviCString::ptr(), sendFmtData(), and target().
Referenced by KviIrcServerParser::parseLiteralAuthenticate().
|
protected |
Called when CAP LS negotiation fails.
References __tr2qs, KVI_OUT_SYSTEMMESSAGE, loginToIrcServer(), m_pConsole, m_pStateData, KviWindow::output(), and KviIrcConnectionStateData::setInsideInitialCapLs().
Referenced by KviIrcServerParser::parseNumericNotRegistered().
|
protected |
Called when CAP ACK answer is received.
References KviIrcConnectionStateData::enabledCaps(), endInitialCapNegotiation(), KviIrcConnectionStateData::isInsideInitialCapReq(), m_pStateData, sendFmtData(), KviIrcConnectionStateData::setInsideAuthenticate(), KviIrcConnectionStateData::setInsideInitialCapReq(), and target().
Referenced by KviIrcServerParser::parseLiteralCap().
|
protected |
Called when CAP LS answer is received.
References c, endInitialCapNegotiation(), KviIrcConnectionStateData::isInsideInitialCapLs(), link(), m_pStateData, sendFmtData(), serverInfo(), KviIrcConnectionStateData::setInsideInitialCapLs(), KviIrcConnectionStateData::setInsideInitialCapReq(), KviIrcConnectionServerInfo::supportedCaps(), and target().
Referenced by KviIrcServerParser::parseLiteralCap().
|
protected |
Called when CAP NAK answer is received.
References endInitialCapNegotiation().
Referenced by KviIrcServerParser::parseLiteralCap().
|
protected |
Called once in a while (every 5 secs at the moment)
tNow | The current time |
References __tr2qs, _OUTPUT_PARANOIC, KviCString::append(), Connected, console(), KviIrcConnectionStateData::enabledCaps(), encodeText(), KviPointerList< T >::first(), KviCString::Format, KVI_OPTION_BOOL, KVI_OUT_VERBOSE, kvi_time_t, KviOption_boolEnableAwayListUpdates, KviLagMeter::lagCheckRegister(), lagMeter(), KviIrcConnectionStateData::lastReceivedChannelWhoReply(), KviChannelWindow::lastReceivedWhoReply(), KviIrcConnectionStateData::lastSentChannelWhoRequest(), m_eState, m_pChannelList, m_pStateData, KviPointerList< T >::next(), KviWindow::output(), KviCString::ptr(), sendFmtData(), serverInfo(), KviIrcConnectionStateData::setLastSentChannelWhoRequest(), KviChannelWindow::setSentSyncWhoRequest(), stateData(), and KviWindow::windowName().
Referenced by KviIrcContext::timerEvent().
|
privateslot |
Called when the hostname lookup is finished.
References __tr2qs, KviDnsResolver::error(), KviDnsResolver::firstIpAddress(), KviError::getDescription(), KviIrcConnectionUserInfo::hostIp(), KVI_OUT_SYSTEMMESSAGE, m_pConsole, m_pLocalhostDns, m_pUserInfo, KviWindow::output(), KviIrcConnectionUserInfo::setHostIp(), KviDnsResolver::state(), and KviDnsResolver::Success.
Referenced by userInfoReceived().
void KviIrcConnection::incomingMessage | ( | const char * | pcMessage | ) |
This function is part of the networking stack.
It's called by KviIrcLink OR KviMexLinkFilter when a message is arriving from the server. Needs to be public because subclasses of KviMexLinkFilter may call it.
pcMessage | The message :) |
References context(), g_pServerParser, kvi_unixTime, l, m, m_pStatistics, KviIrcServerParser::parseMessage(), and KviIrcConnectionStatistics::setLastMessageTime().
Referenced by KviIrcLink::processData().
void KviIrcConnection::incomingMessageNoFilter | ( | const char * | pcMessage | ) |
This function is part of the networking stack.
It's called by KviIrcDataStreamMonitor subclasses when they want to inject some message without getting it filtered again
pcMessage | The message :) |
References g_pServerParser, kvi_unixTime, m_pStatistics, KviIrcServerParser::parseMessage(), and KviIrcConnectionStatistics::setLastMessageTime().
|
protected |
Joins a list of channels. The first element of the pair is the channel name, the second element of the pair is the eventual password. May send multiple JOIN messages.
References encodeText(), and sendFmtData().
Referenced by loginComplete().
void KviIrcConnection::keepChannelsOpenAfterDisconnect | ( | ) |
Marks all the currently existing channels as DEAD.
They are preserved across connections. Marking a channel as dead actually removes the ownership of KviChannelWindow from KviIrcConnection and moves it to KviIrcContext (as the contex is preserved across connections).
References __tr2qs, c, KviPointerList< T >::first(), KVI_OUT_SOCKETERROR, and m_pChannelList.
Referenced by KviIrcContext::connectionTerminated().
void KviIrcConnection::keepQueriesOpenAfterDisconnect | ( | ) |
Marks all the currently open queries as DEAD.
They are kept open after a disconnect. Marking a query as dead removes ownership from this class and gives it to KviIrcContext (which survives disconnects).
References __tr2qs, KviPointerList< T >::first(), KVI_OUT_SOCKETERROR, m_pQueryList, and q.
Referenced by KviIrcContext::connectionTerminated().
|
inline |
Returns a pointer to the current KviLagMeter.
The returned pointer is NULL if lag measurement is disabled for the current connection.
Referenced by KviIrcContextDisplay::drawContents(), KviIsOnNotifyListManager::handleIsOn(), KviStupidNotifyListManager::handleIsOn(), KviIsOnNotifyListManager::handleUserhost(), heartbeat(), KviStatusBarLagIndicator::mouseDoubleClickEvent(), KviIrcServerParser::parseCtcpReplyLagcheck(), KviIrcServerParser::parseLiteralPong(), KviIrcServerParser::parseNumericEndOfWho(), KviIsOnNotifyListManager::sendIsOn(), KviStupidNotifyListManager::sendIsOn(), KviIsOnNotifyListManager::sendUserhost(), KviIsOnNotifyListManager::stop(), KviStupidNotifyListManager::stop(), KviIrcConnectionRequestQueue::timerSlot(), KviIrcContextDisplay::tipRequest(), KviStatusBarLagIndicator::tipText(), and KviStatusBarLagIndicator::updateDisplay().
|
inline |
Returns the underlying KviIrcLink object.
The returned pointer is never NULL.
Referenced by context_kvs_fnc_getSSLCertInfo(), dcc_kvs_get_listen_ip_address(), handleInitialCapLs(), linkEstablished(), and resolveLocalHost().
|
protected |
This signals that the connection attempt has failed.
iError | The error code |
References KviIrcContext::connectionFailed(), context(), KviMainWindow::executeInternalCommand(), g_pMainWindow, Idle, KVI_INTERNALCOMMAND_IDENT_STOP, m_bIdentdAttached, and m_eState.
Referenced by KviIrcLink::resolverTerminated(), and KviIrcLink::socketStateChange().
|
protected |
Called by KviIrcLink when the socket state changes to Connected.
References Connected, KviIrcContext::connectionEstablished(), context(), kvi_unixTime, l, link(), loginToIrcServer(), m, m_eState, m_pServerInfo, m_pStateData, m_pStatistics, KviRuntimeInfo::name(), resolveLocalHost(), sendFmtData(), KviIrcConnectionStatistics::setConnectionStartTime(), KviIrcConnectionStateData::setIgnoreOneYouHaveNotRegisteredError(), KviIrcConnectionStateData::setInsideInitialCapLs(), KviIrcConnectionStateData::setInsideInitialStartTls(), KviIrcConnectionStatistics::setLastMessageTime(), KviIrcConnectionServerInfo::setName(), KviIrcConnectionServerInfo::setNetworkName(), and target().
Referenced by KviIrcLink::socketStateChange().
|
protected |
Called by KviIrcLink when the socket state changes to Ready.
References KviIrcContext::connectionTerminated(), context(), KviMainWindow::executeInternalCommand(), g_pMainWindow, Idle, KVI_INTERNALCOMMAND_IDENT_STOP, l, m, m_bIdentdAttached, m_eState, m_pLagMeter, and m_pNotifyListManager.
Referenced by KviIrcLink::socketStateChange().
|
protected |
Called on the first numeric received from server.
szNickName | The nickname to use |
References __tr2qs, _OUTPUT_VERBOSE, KviApplication::addRecentNickname(), KviIrcNetwork::autoJoinChannelList(), KviIrcServer::autoJoinChannelList(), KviIrcServer::clearReconnectInfo(), KviIrcConnectionStateData::commandToExecAfterConnect(), KviIrcContext::Connected, context(), createQuery(), delayedStartNotifyList(), e, encodeText(), KviMainWindow::executeInternalCommand(), KviIrcUserDataBase::find(), findQuery(), g_pApp, g_pMainWindow, KviIrcUserEntry::host(), KviIrcServer::initUMode(), KviIrcConnectionServerInfo::isSupportedChannelType(), joinChannels(), KVI_INTERNALCOMMAND_CHANNELSJOIN_OPEN, KVI_INTERNALCOMMAND_IDENT_STOP, KVI_OPTION_BOOL, KVI_OPTION_STRING, KVI_OUT_IRC, KVI_OUT_SYSTEMMESSAGE, KVI_OUT_VERBOSE, KviEvent_OnIRC, KviOption_boolShowChannelsJoinOnIrc, KviOption_stringDefaultUserMode, KVS_TRIGGER_EVENT_0_HALTED, l, KviIrcContext::loginComplete(), m_bIdentdAttached, KviIrcServerReconnectInfo::m_lJoinChannels, m_pConsole, m_pServerInfo, m_pStateData, m_pUserIdentity, m_pUserInfo, KviIrcConnectionTarget::network(), KviUserListView::nickChange(), KviIrcConnectionUserInfo::nickName(), KviConsoleWindow::notifyListView(), KviIrcNetwork::onLoginCommand(), KviUserIdentity::onLoginCommand(), KviIrcServer::onLoginCommand(), KviWindow::output(), KviWindow::outputNoFmt(), KviCString::ptr(), KviIrcServer::reconnectInfo(), restartLagMeter(), resurrectDeadQueries(), KviKvsScript::run(), sendFmtData(), KviIrcConnectionTarget::server(), KviIrcConnectionStateData::setIgnoreOneYouHaveNotRegisteredError(), KviIrcConnectionUserInfo::setNickName(), KviQueryWindow::setTarget(), state(), szHost, target(), KviIrcUserEntry::user(), and userDataBase().
Referenced by KviIrcServerParser::parseNumeric001(), KviIrcServerParser::parseNumeric002(), KviIrcServerParser::parseNumeric003(), KviIrcServerParser::parseNumeric004(), and KviIrcServerParser::parseNumeric005().
|
protected |
Logins to the irc server.
References __tr2qs, _OUTPUT_MUTE, _OUTPUT_VERBOSE, KviIrcUserEntry::avatar(), KviUserListView::avatarChanged(), KviConsoleWindow::defaultAvatarFromOptions(), e, encodeText(), KviIrcUserEntry::Female, KviIrcUserDataBase::find(), KviIrcServer::hostName(), KviIdentityProfileSet::instance(), KviIdentityProfileSet::isEmpty(), KviIdentityProfileSet::isEnabled(), KviUserListView::join(), KVI_ASSERT, KVI_DEFAULT_USERNAME, KVI_OPTION_BOOL, KVI_OPTION_STRING, KVI_OPTION_UINT, KVI_OUT_SYSTEMMESSAGE, KVI_OUT_VERBOSE, KviOption_boolPrependAvatarInfoToRealname, KviOption_boolPrependGenderInfoToRealname, KviOption_boolPrependNickColorInfoToRealname, KviOption_boolUseSpecifiedSmartColorForOwnNick, KviOption_stringCtcpUserInfoGender, KviOption_stringMyAvatar, KviOption_stringRealname, KviOption_stringUsername, KviOption_uintUserIrcViewOwnBackground, KviOption_uintUserIrcViewOwnForeground, m_pConsole, m_pServerInfo, m_pStateData, m_pUserIdentity, m_pUserInfo, KviIrcServerReconnectInfo::m_szNick, KviIrcServerReconnectInfo::m_szPass, KviIrcUserEntry::Male, KviIrcNetwork::name(), KviIrcConnectionTarget::network(), KviIrcConnectionUserInfo::nickName(), KviConsoleWindow::notifyListView(), KviIrcNetwork::onConnectCommand(), KviUserIdentity::onConnectCommand(), KviIrcServer::onConnectCommand(), KviWindow::output(), KviWindow::outputNoFmt(), KviIrcConnectionUserInfo::password(), KviIrcNetwork::password(), KviIrcServer::password(), pickNextLoginNickName(), KviIrcConnectionUserInfo::realName(), KviIrcNetwork::realName(), KviIrcServer::realName(), KviIrcServer::reconnectInfo(), KviControlCodes::Reset, KviKvsScript::run(), sendFmtData(), KviIrcConnectionTarget::server(), KviIrcUserEntry::setAvatar(), KviIrcUserEntry::setGender(), KviIrcConnectionStateData::setLoginNickNameState(), KviIrcConnectionServerInfo::setName(), KviIrcConnectionUserInfo::setNickName(), KviIrcConnectionUserInfo::setPassword(), setupTextCodec(), KviIrcConnectionUserInfo::setUserName(), target(), KviControlCodes::Transparent, KviIrcConnectionStateData::UsedConnectionSpecificNickName, useProfileData(), userDataBase(), useRealName(), userInfo(), KviIrcConnectionUserInfo::userName(), KviIrcNetwork::userName(), and KviIrcServer::userName().
Referenced by endInitialCapNegotiation(), handleFailedInitialCapLs(), and linkEstablished().
|
inline |
Returns a pointer to the KviIrcConnectionNetsplitDetectorData object.
It contains data private to the netsplit detector engine. Very similar to KviIrcConnectionStateData but dedicated to netsplit detection. The returned pointer is never NULL. Include "KviIrcConnectionNetsplitDetectorData.h" as the class is only forwarded here.
Referenced by KviIrcServerParser::parseLiteralQuit().
|
protected |
Called when NICK is received.
szNewNick | The new nickname for the user |
References KviApplication::addRecentNickname(), KviMainWindow::childConnectionNickNameChange(), g_pApp, g_pMainWindow, m_pConsole, m_pUserInfo, KviUserListView::nickChange(), KviIrcConnectionUserInfo::nickName(), nickNameChanged(), KviConsoleWindow::notifyListView(), KviIrcConnectionUserInfo::setNickName(), and KviWindow::updateCaption().
Referenced by KviIrcServerParser::parseLiteralNick().
|
signal |
|
inline |
Returns a pointer to the current KviNotifyListManager.
The returned pointer is NULL if notify list management is disabled for the current connection.
Referenced by KviIrcServerParser::parseNumericIsOn(), KviIrcServerParser::parseNumericUserhost(), and KviIrcServerParser::parseNumericWatch().
unsigned int KviIrcConnection::outputQueueSize | ( | ) |
Returns the current size of the output queue.
References m_pLink, and KviIrcLink::outputQueueSize().
|
protected |
Picks the next login nickname to be tried. If bForceDefaultIfPrimaryNicknamesEmpty is true then the algorithm will return a default nickname in case the primary setting in the options is empty. If bForceDefaultIfPrimaryNicknamesEmpty is false then the algorithm will try the alternative nicknames instead, then try some random options and finally return an empty string signaling that no suitable choice could be made. bForceDefaultIfPrimaryNicknamesEmpty should be set to true only in loginToIrcServer(), that is, the first time this function is called (otherwise there exists a possibility of infinite nickname loop because of the repeated fallback choice). szBaseNickForRandomChoices will be used for the random alternatives as the first left 7 characters. Upon return szChoiceDescriptionBuffer will contain the textual description of the choice made (network specific, alternative, server specific, global etc...).
References __tr2qs, KviIrcNetwork::alternativeNickName(), KviIrcServer::alternativeNickName(), KviIdentityProfileSet::findNetwork(), KviIdentityProfileSet::instance(), KviIdentityProfileSet::isEmpty(), KviIdentityProfileSet::isEnabled(), KVI_ASSERT, KVI_DEFAULT_NICKNAME1, KVI_OPTION_STRING, KviOption_stringNickname1, KviOption_stringNickname2, KviOption_stringNickname3, KviOption_stringNickname4, KviIrcConnectionStateData::loginNickNameState(), m_pStateData, KviIrcNetwork::name(), KviIrcConnectionTarget::network(), KviIdentityProfile::nick(), KviIrcNetwork::nickName(), KviIrcServer::nickName(), KviIrcConnectionTarget::server(), KviIrcConnectionStateData::setLoginNickNameState(), target(), KviIrcConnectionStateData::UsedAlternativeNetworkSpecificNickName, KviIrcConnectionStateData::UsedAlternativeProfileSpecificNickName, KviIrcConnectionStateData::UsedAlternativeServerSpecificNickName, KviIrcConnectionStateData::UsedGlobalNickName1, KviIrcConnectionStateData::UsedGlobalNickName2, KviIrcConnectionStateData::UsedGlobalNickName3, KviIrcConnectionStateData::UsedGlobalNickName4, KviIrcConnectionStateData::UsedManualNickname, KviIrcConnectionStateData::UsedNetworkSpecificNickName, KviIrcConnectionStateData::UsedProfileSpecificNickName, KviIrcConnectionStateData::UsedRandomNickName1, KviIrcConnectionStateData::UsedRandomNickName2, KviIrcConnectionStateData::UsedRandomNickName3, KviIrcConnectionStateData::UsedRandomNickName4, and KviIrcConnectionStateData::UsedServerSpecificNickName.
Referenced by loginToIrcServer(), and KviIrcServerParser::parseLoginNicknameProblem().
|
inline |
Returns the list of the currently open queries.
The returned pointer is never NULL (the list may be empty though).
Referenced by KviConsoleWindow::avatarChangedUpdateWindows(), KviConsoleWindow::getWindowListTipText(), and KviIrcServerParser::parseLiteralNick().
void KviIrcConnection::registerChannel | ( | KviChannelWindow * | c | ) |
This is called by KviChannelWindow upon creation. You shouldn't need to call it.
FIXME: Could be made protected.
References KviApplication::addRecentChannel(), KviPointerList< T >::append(), chanListChanged(), channelRegistered(), g_pApp, KVI_OPTION_BOOL, KviOption_boolLogChannelHistory, m_pChannelList, m_pServerInfo, KviIrcConnectionServerInfo::networkName(), and KviWindow::windowName().
Referenced by KviChannelWindow::KviChannelWindow(), and KviChannelWindow::setAliveChan().
void KviIrcConnection::registerQuery | ( | KviQueryWindow * | q | ) |
This is called by KviQueryWindow upon creation, you shouldn't need to use it.
FIXME: Could be made protected.
References KviPointerList< T >::append(), and m_pQueryList.
Referenced by KviQueryWindow::KviQueryWindow(), and KviQueryWindow::setAliveQuery().
|
inline |
Returns a pointer to the current KviIrcConnectionRequestQueue.
Referenced by KviIrcContext::connectionTerminated(), KviIrcServerParser::parseLiteralJoin(), and unregisterChannel().
|
protected |
Resolves the localhost into an IP address.
References __tr2qs, _OUTPUT_MUTE, _OUTPUT_QUIET, KviNetUtils::isValidStringIp(), KVI_OPTION_STRING, KVI_OUT_SYSTEMMESSAGE, KVI_OUT_SYSTEMWARNING, KviOption_stringLocalHostIp, link(), KviIrcConnectionUserInfo::localHostIp(), m_pConsole, m_pUserInfo, KviWindow::output(), KviIrcConnectionUserInfo::setHostIp(), KviIrcConnectionUserInfo::setHostName(), KviIrcConnectionUserInfo::setLocalHostIp(), and target().
Referenced by linkEstablished().
void KviIrcConnection::restartLagMeter | ( | ) |
This function actually restarts the lag meter.
FIXME: Why ?
References KVI_OPTION_BOOL, KviOption_boolUseLagMeterEngine, and m_pLagMeter.
Referenced by loginComplete(), and KviApplication::restartLagMeters().
|
slot |
Called to restart the notify list.
References __tr2qs, _OUTPUT_VERBOSE, KVI_OPTION_BOOL, KVI_OUT_VERBOSE, KviOption_boolUseIntelligentNotifyListManager, KviOption_boolUseNotifyList, KviOption_boolUseWatchListIfAvailable, m_pConsole, m_pNotifyListManager, m_pNotifyListTimer, KviWindow::output(), serverInfo(), KviNotifyListManager::start(), and KviNotifyListManager::stop().
Referenced by delayedStartNotifyList(), endOfMotdReceived(), and KviApplication::restartNotifyLists().
void KviIrcConnection::resurrectDeadQueries | ( | ) |
This is the inverse of keepQueriesOpenAfterDisconnect().
It's meant to be called upon reconnection (as queries don't need a JOIN message to be opened).
References __tr2qs, KviIrcContext::firstDeadQuery(), KVI_OUT_SOCKETMESSAGE, m_pContext, and q.
Referenced by loginComplete().
bool KviIrcConnection::sendData | ( | const char * | pcBuffer, |
int | iBuflen = -1 |
||
) |
Sends the specified text on the connected link (and thus socket).
This function basically works like sprintf(). Please note that you should send only ENCODED text to the server. This is why the accepted parameter is a const char *. IRC is an 8 (I'd say even 7 sometimes) bit protocol.
Please note that you don't actually need to append a CRLF pair to your buffer: the implementation of the networking stack will do it for you. Hovewer you can send multiple IRC commands by separating them by CRLF pairs. Just take care of avoiding a CRLF after the last command you specify.
Returns true on success or false if the data can't be actually enqueued/sent (and this usually means that there is no connection at the moment). Please note that it MAY happen that a send attempt on a correctly connected link causes the link to actually disconnect (or rather "discover" the fact that it's disconnected at OS level).
pcBuffer | The encoded text data to send |
iBuflen | The length of the data: if -1 the length is determined via strlen(). |
References __tr2qs, _OUTPUT_MUTE, KviConsoleWindow::activeWindow(), context(), KviDataBuffer::data(), KVI_OUT_SOCKETWARNING, KviEvent_OnOutboundTraffic, KVS_TRIGGER_EVENT_1, l, m, m_pConsole, m_pLink, KviMemory::move(), KviWindow::outputNoFmt(), and KviIrcLink::sendPacket().
Referenced by DccChatWindow::connectionInProgress(), KviKvsTreeNodeAliasSimpleCommand::execute(), LinksWindow::hostPopupClicked(), and KviIrcUrl::run().
bool KviIrcConnection::sendFmtData | ( | const char * | pcFmt, |
... | |||
) |
Sends the specified text on the connected link (and thus socket).
This function basically works like sprintf(). Please note that you should send only ENCODED text to the server. This is why the accepted parameter is a const char *. IRC is an 8 (I'd say even 7 sometimes) bit protocol.
Please note that you don't actually need to append a CRLF pair to your buffer: the implementation of the networking stack will do it for you. Hovewer you can send multiple IRC commands by separating them by CRLF pairs. Just take care of avoiding a CRLF after the last command you specify.
Returns true on success or false if the data can't be actually enqueued/sent (and this usually means that there is no connection at the moment). Please note that it MAY happen that a send attempt on a correctly connected link causes the link to actually disconnect (or rather "discover" the fact that it's disconnected at OS level).
pcFmt | The format string to be first sprintf'ed with the variadic params and then sent |
... | The variadic arguments (see man sprintf for an explanation) |
FIXME: change name to sendFormattedData() ?
References __tr2qs, _OUTPUT_MUTE, KviConsoleWindow::activeWindow(), context(), KviDataBuffer::data(), kvi_irc_vsnprintf(), KVI_OUT_SOCKETWARNING, kvi_va_end, kvi_va_list, kvi_va_start, KviEvent_OnOutboundTraffic, KVS_TRIGGER_EVENT_1, l, m, m_pConsole, m_pLink, KviWindow::outputNoFmt(), KviDataBuffer::resize(), and KviIrcLink::sendPacket().
Referenced by KviMaskInputDialog::accept(), avatar_kvs_cmd_notify(), avatar_kvs_cmd_query(), KviChannelWindow::closeEvent(), DccVoiceWindow::connectionInProgress(), DccVideoWindow::connectionInProgress(), DccFileTransfer::connectionInProgress(), dcc_kvs_cmd_chat(), dcc_kvs_cmd_get(), dcc_module_reply_errmsg(), dccModuleParseDccGet(), KviTrayIconWidget::doAway(), DccFileTransfer::doResume(), endInitialCapNegotiation(), handleAuthenticate(), handleInitialCapAck(), handleInitialCapLs(), DccBroker::handleResumeRequest(), heartbeat(), ListWindow::itemDoubleClicked(), joinChannels(), KviKvsCoreSimpleCommands::KVSCSC(), linkEstablished(), loginComplete(), loginToIrcServer(), KviQueryWindow::ownAction(), KviQueryWindow::ownMessage(), KviChannelWindow::ownMessage(), KviIrcServerParser::parseCtcpReplyAvatar(), KviIrcServerParser::parseLiteralInvite(), KviIrcServerParser::parseLiteralKick(), KviIrcServerParser::parseLiteralPing(), KviIrcServerParser::parseLoginNicknameProblem(), KviIrcServerParser::parseNumeric005(), KviIrcServerParser::parseNumericAway(), KviIrcServerParser::parseNumericBackFromAway(), KviIrcServerParser::parseNumericWhospcrpl(), KviChannelWindow::removeMasks(), KviIrcServerParser::replyCtcp(), LinksWindow::requestLinks(), ListWindow::requestList(), DccBroker::rsendExecute(), KviIsOnNotifyListManager::sendIsOn(), KviStupidNotifyListManager::sendIsOn(), KviIsOnNotifyListManager::sendUserhost(), KviChannelWindow::setAliveChan(), KviChannelWindow::setMode(), KviWatchNotifyListManager::start(), DccFileTransfer::startConnection(), KviWatchNotifyListManager::stop(), ListWindow::stoplistdownload(), KviIrcContext::terminateConnectionRequest(), KviLagMeter::timerEvent(), KviIrcConnectionRequestQueue::timerSlot(), KviChannelWindow::toggleListModeEditor(), and KviChannelWindow::topicSelected().
|
inline |
Returns a pointer to the current global codec for inbound data.
This codec is a global setting and may be overridden by specific windows. The returned pointer may be null if things really went wrong.
|
inline |
Returns a pointer to the KviIrcConnectionServerInfo object.
It contains runtime information about the current server. This includes the current servername, the server capabilities and other stuff that KviConnectionTarget actually doesn't contain (or has only "default" values for). The returned pointer is never NULL. Include "KviIrcConnectionServerInfo.h" as the class is only forwarded here.
Referenced by currentServerName(), KviConsoleWindow::fillStatusString(), KviUserListView::getUserFlag(), handleInitialCapLs(), heartbeat(), KviUserListView::insertUserEntry(), KviIrcServerParser::parseChannelMode(), KviIrcServerParser::parseLiteralCap(), KviIrcServerParser::parseLiteralJoin(), KviIrcServerParser::parseLiteralNotice(), KviIrcServerParser::parseLiteralPrivmsg(), KviIrcServerParser::parseNumeric004(), KviIrcServerParser::parseNumeric005(), KviIrcServerParser::parseNumeric344(), KviIrcServerParser::parseNumeric345(), KviIrcServerParser::parseNumeric480(), KviIrcServerParser::parseNumeric486(), KviIrcServerParser::parseNumeric728(), KviIrcServerParser::parseNumeric729(), KviIrcServerParser::parseNumericCodePageScheme(), KviIrcServerParser::parseNumericCodePageSet(), KviIrcServerParser::parseNumericNames(), KviIrcServerParser::parseNumericSaslLogin(), KviIrcServerParser::parseUserMode(), KviChangeUserModeAction::popupAboutToShow(), KviWindow::preprocessMessage(), restartNotifyList(), KviChannelWindow::serverInfo(), serverInfoReceived(), KviTopicWidget::switchMode(), KviLagMeter::timerEvent(), and KviChannelWindow::updateModeLabel().
|
protected |
Called when RPL_SERVINFO (004) is received and sets the info.
szServerName | The name of the server |
szUserModes | The user modes supported by the server |
szChanModes | The chan modes supported by the server |
References KviMainWindow::childConnectionServerInfoChange(), g_pMainWindow, m_pConsole, serverInfo(), KviIrcConnectionServerInfo::setName(), KviIrcConnectionServerInfo::setSupportedChannelModes(), KviIrcConnectionServerInfo::setSupportedUserModes(), and KviWindow::updateCaption().
Referenced by KviIrcServerParser::parseNumeric004().
void KviIrcConnection::setEncoding | ( | const QString & | szEncoding | ) |
Sets the global encoding for this connection.
This is a default value and can be overridden by specific windows. This is tipically called upon a successful CODEPAGE change (numerical 222) response from a server; from now on, the server will translate (encode) everything (including IDN hostnames, channel names, messages) using this encoding. So we expect this encoding to be the new default for the server (connection), the console, each other channel and query.
szEncoding | The encoding to use |
References __tr2qs, _OUTPUT_VERBOSE, c, KviLocale::codecForName(), KviPointerList< T >::first(), KviLocale::instance(), KVI_OUT_SYSTEMERROR, KVI_OUT_VERBOSE, m_pChannelList, m_pConsole, m_pQueryList, m_pSrvCodec, m_pTextCodec, KviPointerList< T >::next(), KviWindow::output(), q, and KviWindow::setTextEncoding().
Referenced by KviIrcServerParser::parseNumericCodePageSet().
|
private |
Setups the codec for the server.
References KviLocale::codecForName(), KviApplication::defaultSrvCodec(), KviIrcNetwork::encoding(), KviIrcServer::encoding(), KviLocale::instance(), m_pConsole, m_pSrvCodec, m_pTarget, KviIrcConnectionTarget::network(), KviIrcConnectionTarget::server(), and KviWindow::setTextEncoding().
Referenced by KviIrcConnection().
|
private |
Setups the codec for the text.
References KviLocale::codecForName(), KviApplication::defaultTextCodec(), KviLocale::instance(), m_pTarget, m_pTextCodec, KviIrcConnectionTarget::network(), KviIrcConnectionTarget::server(), KviIrcNetwork::textEncoding(), and KviIrcServer::textEncoding().
Referenced by KviIrcConnection(), and loginToIrcServer().
|
protected |
This starts an asynchronous connection attempt.
You must return control to the Qt core for the connection operations to be initiated
References Connecting, KviMainWindow::executeInternalCommand(), g_pMainWindow, KVI_INTERNALCOMMAND_IDENT_START, KVI_OPTION_BOOL, KviOption_boolUseIdentService, KviOption_boolUseIdentServiceOnlyOnConnect, m_bIdentdAttached, m_eState, m_pLink, and KviIrcLink::start().
Referenced by KviIrcContext::connectToCurrentServer().
|
inline |
Returns the current state of the connection.
Referenced by loginComplete(), KviStatusBarAwayIndicator::mouseDoubleClickEvent(), KviStatusBarLagIndicator::mouseDoubleClickEvent(), KviLagMeter::timerEvent(), KviStatusBarAwayIndicator::tipText(), and KviStatusBarLagIndicator::tipText().
|
inline |
Returns a pointer to the KviIrcConnectionStateData object.
It contains generic connection state data. This includes the current nickname index at login time, flags that signal "micro-states" etc... This data could be part of KviIrcConnection itself but we prefer to keep it in a separate class in order to cleanup the implementation. The returned pointer is never NULL. Include "KviIrcConnectionStateData.h" as the class is only forwarded here.
Referenced by KviIrcContext::connectionTerminated(), KviIrcContext::connectToCurrentServer(), heartbeat(), KviIrcServerParser::parseLiteralCap(), KviIrcServerParser::parseLiteralJoin(), KviIrcServerParser::parseLiteralPrivmsg(), KviIrcServerParser::parseMessage(), KviIrcServerParser::parseNumericCodePageScheme(), KviIrcServerParser::parseNumericEndOfWho(), KviIrcServerParser::parseNumericEndOfWhois(), KviIrcServerParser::parseNumericNotRegistered(), KviIrcServerParser::parseNumericSaslFail(), KviIrcServerParser::parseNumericSaslLogin(), KviIrcServerParser::parseNumericSaslSuccess(), KviIrcServerParser::parseNumericStartTls(), KviIrcServerParser::parseNumericWhoisActually(), KviIrcServerParser::parseNumericWhoisAuth(), KviIrcServerParser::parseNumericWhoisAway(), KviIrcServerParser::parseNumericWhoisChannels(), KviIrcServerParser::parseNumericWhoisIdle(), KviIrcServerParser::parseNumericWhoisOther(), KviIrcServerParser::parseNumericWhoisRegistered(), KviIrcServerParser::parseNumericWhoisServer(), KviIrcServerParser::parseNumericWhoisUser(), KviIrcContext::terminateConnectionRequest(), and KviIrcConnectionRequestQueue::timerSlot().
|
inline |
Returns a pointer to the KviIrcConnectionStatistics object.
It contains runtime statistics about the connection. Very similar to KviIrcConnectionStateData but dedicated to statistics. The returned pointer is never NULL. Include "KviIrcConnectionStatistics.h" as the class is only forwarded here.
Referenced by KviStatusBarConnectionTimer::timerEvent().
|
inline |
Returns the target of this connection.
Please note that the target doesn't necessairly contain up-to-date data. You might want to look at serverInfo() instead. The returned pointer is never NULL.
Referenced by chan_kvs_fnc_getUrl(), KviIrcContext::connectionFailed(), handleAuthenticate(), handleInitialCapAck(), handleInitialCapLs(), KviConsoleWindow::isIPv6Connection(), KviIrcLink::KviIrcLink(), linkEstablished(), loginComplete(), loginToIrcServer(), KviIrcServerParser::parseLiteralNotice(), pickNextLoginNickName(), resolveLocalHost(), KviIrcUrl::run(), and KviConsoleWindow::updateUri().
|
inline |
Returns a pointer to the current global codec for outbound text.
This codec is a global setting and may be overridden by specific windows. The returned pointer may be null if things really went wrong.
Referenced by KviWindow::defaultTextCodec().
|
slot |
Called when we unhighlight all channels.
References c, KviPointerList< T >::first(), m_pChannelList, and KviPointerList< T >::next().
|
slot |
Called when we unhighlight all queries.
References c, KviPointerList< T >::first(), m_pQueryList, and KviPointerList< T >::next().
void KviIrcConnection::unregisterChannel | ( | KviChannelWindow * | c | ) |
This is called by KviChannelWindow just before destruction. You shouldn't need to call it.
FIXME: Could be made protected.
References chanListChanged(), channelUnregistered(), KviIrcConnectionRequestQueue::dequeueChannel(), m_pChannelList, KviPointerList< T >::removeRef(), and requestQueue().
Referenced by KviChannelWindow::setDeadChan(), and KviChannelWindow::~KviChannelWindow().
void KviIrcConnection::unregisterQuery | ( | KviQueryWindow * | q | ) |
This is called by KviQueryWindow just before destruction, you shouldn't need to use it.
FIXME: Could be made protected.
References m_pQueryList, and KviPointerList< T >::removeRef().
Referenced by KviQueryWindow::setDeadQuery(), and KviQueryWindow::~KviQueryWindow().
|
protected |
Uses the profiles' data as connection data.
It checks if the identity profiles are enabled and updates the data of the connection if a profile rule matches the network name
pSet | The instance of the network identity profile set |
szNetwork | The name of the network |
References KviIdentityProfileSet::findNetwork(), m_pUserInfo, KviIdentityProfile::realName(), KviIrcConnectionUserInfo::setUserName(), useRealName(), and KviIdentityProfile::userName().
Referenced by loginToIrcServer().
|
inline |
Returns a pointer to the big connection user database.
The database contains ALL the users KVIrc can "see" in this connection. The returned pointer is never NULL.
Referenced by KviConsoleWindow::applyHighlighting(), avatar_kvs_cmd_notify(), avatar_kvs_cmd_set(), avatar_kvs_cmd_unset(), avatar_kvs_fnc_name(), avatar_kvs_fnc_path(), KviConsoleWindow::avatarChanged(), KviConsoleWindow::checkDefaultAvatar(), KviUserListEntry::color(), KviConsoleWindow::currentAvatar(), KviIrcView::doLinkToolTip(), KviQueryWindow::getInfoLabelText(), KviQueryWindow::getWindowListTipText(), KviIsOnNotifyListManager::handleIsOn(), loginComplete(), loginToIrcServer(), KviConsoleWindow::outputPrivmsg(), KviUserListViewArea::paintEvent(), KviIrcServerParser::parseCtcpReplyAvatar(), KviIrcServerParser::parseCtcpReplyUserinfo(), KviIrcServerParser::parseCtcpRequest(), KviIrcServerParser::parseCtcpRequestDcc(), KviIrcServerParser::parseLiteralAccount(), KviIrcServerParser::parseLiteralAway(), KviIrcServerParser::parseLiteralChghost(), KviIrcServerParser::parseLiteralInvite(), KviIrcServerParser::parseLiteralJoin(), KviIrcServerParser::parseLiteralKick(), KviIrcServerParser::parseLiteralNick(), KviIrcServerParser::parseLiteralNotice(), KviIrcServerParser::parseLiteralPrivmsg(), KviIrcServerParser::parseNumericWhoisAway(), KviIrcServerParser::parseNumericWhoisServer(), KviIrcServerParser::parseNumericWhoisUser(), KviIrcServerParser::parseNumericWhospcrpl(), KviQueryWindow::setAliveQuery(), KviConsoleWindow::setAvatar(), KviConsoleWindow::setAvatarFromOptions(), KviConsoleWindow::triggerOnHighlight(), and userInfoReceived().
|
protected |
Sets the specified real name in the user information set after evaluating it via KVS engine (so identifiers are substituted). Call this function instead of m_pUserInfo->setRealName().
References KviKvsVariant::asString(), console(), KviQString::escapeKvs(), KviKvsScript::evaluate(), m_pUserInfo, KviQString::PermitFunctions, KviQString::PermitVariables, and KviIrcConnectionUserInfo::setRealName().
Referenced by loginToIrcServer(), and useProfileData().
|
inline |
Returns a pointer to the KviIrcConnectionUserInfo object.
It contains runtime information about the user. This includes the current nickname, username, flags and other stuff that KviUserIdentity actually doesn't contain (or has only "default" values for). The returned pointer is never NULL. Include "KviIrcConnectionUserInfo.h" as the class is only forwarded here.
Referenced by KviGoAwayAction::activeContextStateChanged(), KviMaskEditor::addClicked(), KviGoAwayAction::addToPopupMenu(), KviConsoleWindow::applyHighlighting(), avatar_kvs_cmd_set(), avatar_kvs_cmd_unset(), KviIrcContext::connectionFailed(), DccChatWindow::connectionInProgress(), DccFileTransfer::connectionInProgress(), KviIrcContext::connectionTerminated(), currentNickName(), currentUserName(), dcc_fill_local_nick_user_host(), dcc_kvs_parse_default_parameters(), KviTrayIconWidget::doAway(), KviIrcContextDisplay::drawContents(), KviTrayIconWidget::fillContextPopup(), KviConsoleWindow::fillStatusString(), KviMaskEditor::itemDoubleClicked(), loginToIrcServer(), KviModeWidget::mouseDoubleClickEvent(), KviStatusBar::mouseDoubleClickEvent(), KviConsoleWindow::outputPrivmsg(), KviChannelWindow::ownAction(), KviQueryWindow::ownMessage(), KviChannelWindow::ownMessage(), KviIrcServerParser::parseChannelMode(), KviIrcServerParser::parseCtcpRequestFinger(), KviIrcServerParser::parseLoginNicknameProblem(), KviUserInput::parseNonCommand(), KviIrcServerParser::parseNumeric001(), KviIrcServerParser::parseNumericBackFromAway(), KviChangeUserModeAction::popupAboutToShow(), KviChangeUserModeAction::popupActivated(), KviStatusBar::setPermanentMessage(), KviTopicWidget::switchMode(), KviLagMeter::timerEvent(), KviIrcContextDisplay::tipRequest(), KviStatusBarAwayIndicator::tipText(), KviStatusBarAwayIndicator::updateDisplay(), KviModeEditor::updateOpStatus(), KviMaskEditor::updateOpStatus(), and userInfoReceived().
|
protected |
Called on each JOIN and sets the info.
It's called meaningful almost only on the first time
szUserName | The username |
szHostName | The hostname |
References __tr2qs, _OUTPUT_MUTE, KviDnsResolver::Any, connect(), e, KviQString::equalCS(), KviIrcUserDataBase::find(), KviIrcConnectionUserInfo::hostIp(), KviIrcConnectionUserInfo::hostName(), hostNameLookupTerminated(), KviNetUtils::isRoutableIpString(), KviNetUtils::isValidStringIp(), KVI_OPTION_BOOL, KVI_OUT_SYSTEMMESSAGE, KVI_OUT_SYSTEMWARNING, KviOption_boolDccBrokenBouncerHack, KviOption_boolDccGuessIpFromServerWhenLocalIsUnroutable, KviIrcConnectionUserInfo::localHostIp(), KviDnsResolver::lookup(), m_pConsole, m_pLocalhostDns, m_pUserInfo, KviWindow::output(), KviWindow::outputNoFmt(), KviIrcUserEntry::setHost(), KviIrcConnectionUserInfo::setHostIp(), KviIrcConnectionUserInfo::setHostName(), KviIrcUserEntry::setUser(), KviIrcConnectionUserInfo::setUserName(), KviIrcConnectionUserInfo::unmaskedHostName(), userDataBase(), and userInfo().
Referenced by KviIrcServerParser::parseLiteralJoin(), and KviIrcServerParser::parseNumeric001().
|
signal |
|
friend |
|
friend |
|
friend |
Referenced by KviIrcConnection().
|
friend |
|
private |
Referenced by KviIrcConnection(), linkAttemptFailed(), linkTerminated(), loginComplete(), start(), and ~KviIrcConnection().
|
private |
Referenced by heartbeat(), KviIrcConnection(), linkAttemptFailed(), linkEstablished(), linkTerminated(), and start().
|
private |
Referenced by KviIrcConnection(), and ~KviIrcConnection().
|
private |
Referenced by KviIrcConnection(), and ~KviIrcConnection().
|
private |
|
private |
Referenced by changeAwayState(), changeUserMode(), KviNotifyListManager::console(), createChannel(), createQuery(), handleFailedInitialCapLs(), hostNameLookupTerminated(), KviIrcConnection(), loginComplete(), loginToIrcServer(), nickChange(), resolveLocalHost(), restartNotifyList(), sendData(), sendFmtData(), serverInfoReceived(), setEncoding(), setupSrvCodec(), and userInfoReceived().
|
private |
Referenced by createChannel(), createQuery(), KviIrcConnection(), and resurrectDeadQueries().
|
private |
Referenced by KviIrcConnection(), linkTerminated(), restartLagMeter(), and ~KviIrcConnection().
|
private |
Referenced by abort(), clearOutputQueue(), KviIrcConnection(), outputQueueSize(), sendData(), sendFmtData(), start(), and ~KviIrcConnection().
|
private |
Referenced by hostNameLookupTerminated(), KviIrcConnection(), userInfoReceived(), and ~KviIrcConnection().
|
private |
Referenced by KviIrcConnection(), and ~KviIrcConnection().
|
private |
Referenced by KviIrcConnection(), linkTerminated(), restartNotifyList(), and ~KviIrcConnection().
|
private |
Referenced by delayedStartNotifyList(), endOfMotdReceived(), KviIrcConnection(), restartNotifyList(), and ~KviIrcConnection().
|
private |
|
private |
Referenced by KviIrcConnection(), and ~KviIrcConnection().
|
private |
Referenced by currentNetworkName(), KviIrcConnection(), linkEstablished(), loginComplete(), loginToIrcServer(), registerChannel(), and ~KviIrcConnection().
|
private |
Referenced by decodeText(), encodeText(), setEncoding(), and setupSrvCodec().
|
private |
|
private |
Referenced by incomingMessage(), incomingMessageNoFilter(), KviIrcConnection(), linkEstablished(), and ~KviIrcConnection().
|
private |
Referenced by KviIrcConnection(), setupSrvCodec(), setupTextCodec(), and ~KviIrcConnection().
|
private |
Referenced by setEncoding(), and setupTextCodec().
|
private |
Referenced by KviIrcConnection(), and ~KviIrcConnection().
|
private |
Referenced by KviIrcConnection(), loginComplete(), loginToIrcServer(), and ~KviIrcConnection().
|
private |