aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Elvio Basello2008-09-16 16:11:01 +0000
committerGravatar Elvio Basello2008-09-16 16:11:01 +0000
commitb2ce9220554a9bdf7761247391f23a4c4742facf (patch)
tree42a7334e64451ef3b9c0f4f599bb04f6fc980e89
parentreordered events table; (diff)
downloadKVIrc-b2ce9220554a9bdf7761247391f23a4c4742facf.tar.gz
KVIrc-b2ce9220554a9bdf7761247391f23a4c4742facf.tar.bz2
KVIrc-b2ce9220554a9bdf7761247391f23a4c4742facf.zip
more work on events table;
added conditional #if git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2471 17fca916-40b9-46aa-a4ea-0a15b648b75c
-rw-r--r--src/kvirc/kvs/kvi_kvs_eventtable.cpp476
-rw-r--r--src/kvirc/kvs/kvi_kvs_eventtable.h395
-rw-r--r--src/modules/objects/class_multilineedit.cpp4
3 files changed, 512 insertions, 363 deletions
diff --git a/src/kvirc/kvs/kvi_kvs_eventtable.cpp b/src/kvirc/kvs/kvi_kvs_eventtable.cpp
index 401d7c2c9..1a852397f 100644
--- a/src/kvirc/kvs/kvi_kvs_eventtable.cpp
+++ b/src/kvirc/kvs/kvi_kvs_eventtable.cpp
@@ -196,7 +196,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnError
@short:
- Server ERROR message received
+ Triggered when an ERROR message is received from the server
@parameters:
$0 = message source
$1 = error reason
@@ -218,7 +218,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnAccelKeyPressed
@short:
- An accelerator key was pressed
+ Triggered when an accelerator key was pressed
@parameters:
$0 = keys
@window:
@@ -243,7 +243,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnHighlight
@short:
- A channel or query message is going to be highlighted
+ Triggered when a channel or query message is going to be highlighted
@parameters:
$0 = talker nick
$1 = target username
@@ -284,7 +284,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnWindowActivated
@short:
- A window has just been activated
+ Triggered when a window has just been activated
@parameters:
none
@window:
@@ -302,7 +302,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnNotifyOnline
@short:
- An user in the notify list is on-line
+ A user in the notify list is on-line
@parameters:
$0 = nickname
@window:
@@ -328,7 +328,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnNotifyOffline
@short:
- An user in the notify list went off-line
+ A user in the notify list went off-line
@parameters:
$0 = nickname
@window:
@@ -501,27 +501,6 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
"$0 = nickname"),
/*
- @doc: onnotifylistpopuprequest
- @type:
- event
- @title:
- OnNotifyListPopupRequest
- @short:
- Notify list context popup customization
- @parameters:
- $0 = nickname list
- @window:
- The window that the user has clicked in
- @description:
- This event is triggered when an user has right clicked on a list of nicknames in
- the notify list (console window).[br]
- This is a good place to show a [cmd]popup[/cmd] with some actions that can be performed
- on the nicknames like querying , performing a whois lookup or sth similar.[br]
- */
- EVENT("OnNotifyListPopupRequest", \
- "$0 = nickname list"),
-
- /*
@doc: onwallops
@type:
event
@@ -595,59 +574,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
"$0 = source nick\n" \
"$1 = message"),
- /*
- @doc: ontextviewdoublecliked
- @type:
- event
- @title:
- OnTextViewDoubleClicked
- @short:
- Text view link double click customization
- @parameters:
- $0 = actual name
- $1 - visible name
- $2 - command name
- @window:
- The window that the user has clicked in
- @description:
- Actual name is equal to the command name if command name is not null.
- Visible name is the link text (as it shown by user).
- Command name is set if the visible name differs with the actual link target (probably contains mIRC colors,etc). It is equal to the actual target name.
- This event is triggered when an user has double clicked on a text view and has not hit any link.[br]
- I have no idea what you can do in this event....maybe some sort of channel-central dialog? :)
- */
- EVENT("OnTextViewDoubleClicked",""),
- /*
- @doc: onnicklinkdefaultactionrequest
- @type:
- event
- @title:
- OnNickLinkDefaultActionRequest
- @short:
- Nick link double click customization
- @parameters:
- $0 = actual name
- $1 - visible name
- $2 - command name
- @window:
- The window that the user has clicked in
- @description:
- Actual name is equal to the command name if command name is not null.
- Visible name is the link text (as it shown by user)
- Command name is set if the visible name differs with the actual link target(probably contains mIRC colors,etc). It is equal to the actual target name.
- This event is triggered when an user has double clicked on a nickname link.[br]
- You should use this event to perform some significant action associated with the double click.[br]
- A good example might be a [cmd]whois[/cmd] or a [cmq]query[/cmd] call.[br]
- Please note that NOT ALL nickname links will cause this event to be triggered: some nickname
- links default actions are actually handled by the
- [event:onquerynickdefaultactionrequest]OnQueryNickDefaultActionRequest[/event] and
- [event:onchannelnickdefatulactionrequest]OnChannelNickDefaultActionRequest[/event] events.[br]
- */
- EVENT("OnNickLinkDefaultActionRequest", \
- "$0 = actual name\n" \
- "$1 - visible name\n" \
- "$2 - command name"),
// Connection
/*
@@ -1158,26 +1085,54 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
EVENT("OnChannelNickPopupRequest", \
"$0 = nick list"),
- // Channels
/*
- @doc: onchannelnickdefaultactionrequest
+ @doc: onnotifylistpopuprequest
@type:
event
@title:
- OnChannelNickDefaultActionRequest
+ OnNotifyListPopupRequest
@short:
- Allows customization of the double click on nicknames
+ Notify list context popup customization
@parameters:
- $0 = nick list
+ $0 = nickname list
@window:
- Channel window
+ The window that the user has clicked in
+ @description:
+ This event is triggered when an user has right clicked on a list of nicknames in
+ the notify list (console window).[br]
+ This is a good place to show a [cmd]popup[/cmd] with some actions that can be performed
+ on the nicknames like querying , performing a whois lookup or sth similar.[br]
+ */
+ EVENT("OnNotifyListPopupRequest", \
+ "$0 = nickname list"),
+
+ /*
+ @doc: ondccchatpopuprequest
+ @type:
+ event
+ @title:
+ OnDCCChatPopupRequest
+ @short:
+ Triggered when the DCC chat text view is right-clicked
+ @parameters:
+ $0 = DCC session ID
+ @window:
+ DCC Chat window
@description:
+ This event is triggered when the user clicks the DCC chat
+ text view with the right mouse button. It is a good place
+ to activate a [cmd]popup[/cmd] menu :)
+ You can retrieve the session information by calling the [module:dcc]dcc[/module].*
+ module functions and by passing the DCC session ID parameter.
@seealso:
- [event:onchannelnickpopuprequest]OnChannelNickPopupRequest[/event]
+ [event:onconsolepuprequest]OnConsolePopupRequest[/event],
+ [event:onchannelpopuprequest]OnChannelPopupRequest[/event],
+ [event:onquerypopuprequest]OnQueryPopupRequest[/event]
*/
- EVENT("OnChannelNickDefaultActionRequest", \
- "$0 = nick list"),
+ EVENT("OnDCCChatPopupRequest", \
+ "$0 = DCC session ID"),
+ // Channels
/*
@doc: onchannelwindowcreated
@type:
@@ -1448,7 +1403,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnQueryFileDropped
@short:
- Drop in query
+ A file is dropped in a query
@parameters:
$0 = source nick
$1 = filedropped
@@ -1462,34 +1417,6 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
"$0 = nick\n" \
"$1 = filedropped"),
- /*
- @doc: onquerynickdefaultactionrequest
- @type:
- event
- @title:
- OnQueryNickDefaultActionRequest
- @short:
- Query double click customization
- @parameters:
- $0 = actual name
- $1 - visible name
- $2 - command name
- @window:
- The window that the user has clicked in
- @description:
- Actual name is equal to the command name if command name is not null.
- Visible name is the link text (as it shown by user)
- Command name is set if the visible name differs with the actual link target(probably contains mIRC colors,etc). It is equal to the actual target name.
- This event is triggered when an user has double clicked on a nickname in
- the query target list.[br]
- You should use this event to do some significant action associated with the double click.[br]
- A good example might be a [cmd]whois[/cmd] query or a [cmd]dcc.chat[/cmd]
- */
- EVENT("OnQueryNickDefaultActionRequest", \
- "$0 = actual name\n" \
- "$1 - visible name\n" \
- "$2 - command name"),
-
// Actions
/*
@doc: onmeaway
@@ -1538,70 +1465,6 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
"$1- = server message trailing"),
/*
- @doc: onaction
- @type:
- event
- @title:
- OnAction
- @short:
- Someone issued a CTCP ACTION
- @parameters:
- $0 = source nick
- $1 = source username
- $2 = source host
- $3 = message target
- $4 = action message text
- @window:
- Channels and query windows
- @description:
- This event is triggered when a remote user issues a CTCP ACTION.[br]
- (The CTCP ACTION is usually triggered by the /me command).[br]
- The parameters $0-$2 identify the source user.[br]
- $3 identifies the message target and can be one of the following:[br]
- - The local user nickname : this is a private CTCP ACTION and is triggered inside a query window.[br]
- - A channel name : this is a channel CTCP ACTION and is triggered in the channel window.[br]
- - Any other string : this is either a broadcast CTCP ACTION (sent by a privileged user
- to a subset of clients) or a sign of the server brain damage :D In this
- case the event is triggered in the console window.[br]
- Calling [cmd]halt[/cmd] in this event stops the message output.[br]
- */
- EVENT("OnAction", \
- "$0 = source nick\n" \
- "$1 = source username\n" \
- "$2 = source hostname\n" \
- "$3 = message target\n" \
- "$4 = action message text"),
-
- /*
- @doc: onmeaction
- @type:
- event
- @title:
- OnMeAction
- @short:
- User issued a CTCP ACTION
- @parameters:
- $0 = action message text
- $1 = action target (channel or nickname)
- @window:
- Channels and query windows
- @description:
- This event is triggered when user issues a CTCP ACTION.[br]
- (The CTCP ACTION is usually triggered by the /me command).[br]
- Warning: don't use a /me inside this event handler, or you'll get an infinite recursion.
- If you need to halt the action (eg. to do some text substitution), follow the example code.
- @examples:
- [example]
- ctcp $1 action "this text was changed in scripting, old one was $0";
- echo -i=$msgtype(action) -w=$active "$me this text was changed in scripting, old one was $0";
- halt;
- [/example]
- */
- EVENT("OnMeAction", \
- "$0 = action message text\n" \
- "$1 = action target"),
-
- /*
@doc: onjoin
@type:
event
@@ -1827,7 +1690,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnQuit
@short:
- An user is leaving a channel
+ An user is leaving IRC
@parameters:
$0 = nickname
$1 = username
@@ -2120,6 +1983,30 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
"$3 = mask"),
/*
+ @doc: oninvite
+ @type:
+ event
+ @title:
+ OnInvite
+ @short:
+ The local user has received an invitation
+ @parameters:
+ $0 = source nick
+ $1 = source username
+ $2 = source host
+ $3 = channel
+ @window:
+ Active window/console
+ @description:
+ Triggered when someone invites the local user to join a channel
+ */
+ EVENT("OnInvite", \
+ "$0 = source nick\n" \
+ "$1 = source username\n" \
+ "$2 = source hostname\n" \
+ "$3 = channel"),
+
+ /*
@doc: oninviteexception
@type:
event
@@ -2152,7 +2039,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnInviteExceptionRemove
@short:
- Move -I has been set
+ Mode -I has been set
@parameters:
$0 = source nick
$1 = source username
@@ -2178,7 +2065,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@title:
OnMeInviteException
@short:
- A +I mode has been set
+ A +I mode has been set on the local user
@parameters:
$0 = source nick
$1 = source username
@@ -2376,30 +2263,6 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
"$1 = new nick"),
/*
- @doc: oninvite
- @type:
- event
- @title:
- OnInvite
- @short:
- The local user has received an invitation
- @parameters:
- $0 = source nick
- $1 = source username
- $2 = source host
- $3 = channel
- @window:
- Active window/console
- @description:
- Triggered when someone invites the local user to join a channel
- */
- EVENT("OnInvite", \
- "$0 = source nick\n" \
- "$1 = source username\n" \
- "$2 = source hostname\n" \
- "$3 = channel"),
-
- /*
@doc: onchanowner
@type:
event
@@ -3076,6 +2939,70 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
// CTCPs
/*
+ @doc: onaction
+ @type:
+ event
+ @title:
+ OnAction
+ @short:
+ Someone issued a CTCP ACTION
+ @parameters:
+ $0 = source nick
+ $1 = source username
+ $2 = source host
+ $3 = message target
+ $4 = action message text
+ @window:
+ Channels and query windows
+ @description:
+ This event is triggered when a remote user issues a CTCP ACTION.[br]
+ (The CTCP ACTION is usually triggered by the /me command).[br]
+ The parameters $0-$2 identify the source user.[br]
+ $3 identifies the message target and can be one of the following:[br]
+ - The local user nickname : this is a private CTCP ACTION and is triggered inside a query window.[br]
+ - A channel name : this is a channel CTCP ACTION and is triggered in the channel window.[br]
+ - Any other string : this is either a broadcast CTCP ACTION (sent by a privileged user
+ to a subset of clients) or a sign of the server brain damage :D In this
+ case the event is triggered in the console window.[br]
+ Calling [cmd]halt[/cmd] in this event stops the message output.[br]
+ */
+ EVENT("OnAction", \
+ "$0 = source nick\n" \
+ "$1 = source username\n" \
+ "$2 = source hostname\n" \
+ "$3 = message target\n" \
+ "$4 = action message text"),
+
+ /*
+ @doc: onmeaction
+ @type:
+ event
+ @title:
+ OnMeAction
+ @short:
+ User issued a CTCP ACTION
+ @parameters:
+ $0 = action message text
+ $1 = action target (channel or nickname)
+ @window:
+ Channels and query windows
+ @description:
+ This event is triggered when user issues a CTCP ACTION.[br]
+ (The CTCP ACTION is usually triggered by the /me command).[br]
+ Warning: don't use a /me inside this event handler, or you'll get an infinite recursion.
+ If you need to halt the action (eg. to do some text substitution), follow the example code.
+ @examples:
+ [example]
+ ctcp $1 action "this text was changed in scripting, old one was $0";
+ echo -i=$msgtype(action) -w=$active "$me this text was changed in scripting, old one was $0";
+ halt;
+ [/example]
+ */
+ EVENT("OnMeAction", \
+ "$0 = action message text\n" \
+ "$1 = action target"),
+
+ /*
@doc: onctcprequest
@type:
event
@@ -3211,39 +3138,13 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
"$0 = DCC session ID"),
/*
- @doc: ondccchatpopuprequest
- @type:
- event
- @title:
- OnDCCChatPopupRequest
- @short:
- Triggered when the DCC chat text view is right-clicked
- @parameters:
- $0 = DCC session ID
- @window:
- DCC Chat window
- @description:
- This event is triggered when the user clicks the DCC chat
- text view with the right mouse button. It is a good place
- to activate a [cmd]popup[/cmd] menu :)
- You can retrieve the session information by calling the [module:dcc]dcc[/module].*
- module functions and by passing the DCC session ID parameter.
- @seealso:
- [event:onconsolepuprequest]OnConsolePopupRequest[/event],
- [event:onchannelpopuprequest]OnChannelPopupRequest[/event],
- [event:onquerypopuprequest]OnQueryPopupRequest[/event]
- */
- EVENT("OnDCCChatPopupRequest", \
- "$0 = DCC session ID"),
-
- /*
@doc: ondccchatwindowcreated
@type:
event
@title:
OnDCCChatWindowCreated
@short:
- A dcc chat window has been just created
+ A DCC Chat window has been just created
@parameters:
$0 = DCC session ID
@window:
@@ -3271,7 +3172,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
@short:
A DCC Chat connection has just been started
@parameters:
- $0 = DCC session ID
+ $0 = DCC session ID
@window:
DCC Chat
@description:
@@ -3649,5 +3550,106 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_KVS_NUM_APP_EVENTS]=
It will be triggered only at the left mouse button click
*/
EVENT("OnServerLinkClick", \
- "$0 = server name")
+ "$0 = server name"),
+
+ /*
+ @doc: ontextviewdoublecliked
+ @type:
+ event
+ @title:
+ OnTextViewDoubleClicked
+ @short:
+ Text view link double click customization
+ @parameters:
+ $0 = actual name
+ $1 - visible name
+ $2 - command name
+ @window:
+ The window that the user has clicked in
+ @description:
+ Actual name is equal to the command name if command name is not null.
+ Visible name is the link text (as it shown by user).
+ Command name is set if the visible name differs with the actual link target (probably contains mIRC colors,etc). It is equal to the actual target name.
+ This event is triggered when an user has double clicked on a text view and has not hit any link.[br]
+ I have no idea what you can do in this event....maybe some sort of channel-central dialog? :)
+ */
+ EVENT("OnTextViewDoubleClicked",""),
+
+ /*
+ @doc: onnicklinkdefaultactionrequest
+ @type:
+ event
+ @title:
+ OnNickLinkDefaultActionRequest
+ @short:
+ Nick link double click customization
+ @parameters:
+ $0 = actual name
+ $1 - visible name
+ $2 - command name
+ @window:
+ The window that the user has clicked in
+ @description:
+ Actual name is equal to the command name if command name is not null.
+ Visible name is the link text (as it shown by user)
+ Command name is set if the visible name differs with the actual link target(probably contains mIRC colors,etc). It is equal to the actual target name.
+ This event is triggered when an user has double clicked on a nickname link.[br]
+ You should use this event to perform some significant action associated with the double click.[br]
+ A good example might be a [cmd]whois[/cmd] or a [cmq]query[/cmd] call.[br]
+ Please note that NOT ALL nickname links will cause this event to be triggered: some nickname
+ links default actions are actually handled by the
+ [event:onquerynickdefaultactionrequest]OnQueryNickDefaultActionRequest[/event] and
+ [event:onchannelnickdefatulactionrequest]OnChannelNickDefaultActionRequest[/event] events.[br]
+ */
+ EVENT("OnNickLinkDefaultActionRequest", \
+ "$0 = actual name\n" \
+ "$1 - visible name\n" \
+ "$2 - command name"),
+
+ /*
+ @doc: onchannelnickdefaultactionrequest
+ @type:
+ event
+ @title:
+ OnChannelNickDefaultActionRequest
+ @short:
+ Allows customization of the double click on nicknames
+ @parameters:
+ $0 = nick list
+ @window:
+ Channel window
+ @description:
+ @seealso:
+ [event:onchannelnickpopuprequest]OnChannelNickPopupRequest[/event]
+ */
+ EVENT("OnChannelNickDefaultActionRequest", \
+ "$0 = nick list"),
+
+ /*
+ @doc: onquerynickdefaultactionrequest
+ @type:
+ event
+ @title:
+ OnQueryNickDefaultActionRequest
+ @short:
+ Query double click customization
+ @parameters:
+ $0 = actual name
+ $1 - visible name
+ $2 - command name
+ @window:
+ The window that the user has clicked in
+ @description:
+ Actual name is equal to the command name if command name is not null.
+ Visible name is the link text (as it shown by user)
+ Command name is set if the visible name differs with the actual link target(probably contains mIRC colors,etc). It is equal to the actual target name.
+ This event is triggered when an user has double clicked on a nickname in
+ the query target list.[br]
+ You should use this event to do some significant action associated with the double click.[br]
+ A good example might be a [cmd]whois[/cmd] query or a [cmd]dcc.chat[/cmd]
+ */
+ EVENT("OnQueryNickDefaultActionRequest", \
+ "$0 = actual name\n" \
+ "$1 - visible name\n" \
+ "$2 - command name")
};
diff --git a/src/kvirc/kvs/kvi_kvs_eventtable.h b/src/kvirc/kvs/kvi_kvs_eventtable.h
index 903d7ed09..c624f8f86 100644
--- a/src/kvirc/kvs/kvi_kvs_eventtable.h
+++ b/src/kvirc/kvs/kvi_kvs_eventtable.h
@@ -36,9 +36,24 @@
* \def KviEvent_OnKVIrcShutdown Triggered at KVIrc shutdown
* \def KviEvent_OnIrcContextCreated Triggered when the IRC context is created
* \def KviEvent_OnIrcContextDestroyed Triggered when the IRC context is destroyed
-
-
-
+* \def KviEvent_OnFrameWindowCreated Triggered when the frame window is created
+* \def KviEvent_OnFrameWindowDestroyed Triggered when the frame window is destroyed
+* \def KviEvent_OnURL An URL appears in one of the output windows
+* \def KviEvent_OnAccelKeyPressed An accelerator key was pressed
+* \def KviEvent_OnHighlight A channel or query message is going to be highlighted
+* \def KviEvent_OnWindowActivated A window has just been activated
+* \def KviEvent_OnNotifyOnLine A user in the notify list is on-line
+* \def KviEvent_OnNotifyOffLine A user in the notify list went off-line
+* \def KviEvent_OnPing Server ping handler
+* \def KviEvent_OnPong Server pong handler
+* \def KviEvent_OnLagAlarmTimeUp High-Lag Alarm Started
+* \def KviEvent_OnLagAlarmTimeDown High-Lag Alarm Stopped
+* \def KviEvent_OnLagCheck The lag metering engine has checked the lag
+* \def KviEvent_OnTextInput The user has just entered some text in the text input
+* \def KviEvent_OnNotifyListDefaultActionRequest Notify list double click customization
+* \def KviEvent_OnWallops A WALLOPS message is received from the server
+* \def KviEvent_OnIgnoredMessage Triggered when a message is ignored
+* \def KviEvent_OnServerNotice A server NOTICE have been issued
*/
#define KviEvent_OnKVIrcStartup 0
#define KviEvent_OnKVIrcShutdown 1
@@ -60,153 +75,281 @@
#define KviEvent_OnLagCheck 17
#define KviEvent_OnTextInput 18
#define KviEvent_OnNotifyListDefaultActionRequest 19
-#define KviEvent_OnNotifyListPopupRequest 20
-#define KviEvent_OnWallops 21
-#define KviEvent_OnIgnoredMessage 22
-#define KviEvent_OnServerNotice 23
-#define KviEvent_OnTextViewDoubleClicked 24
-#define KviEvent_OnNickLinkDefaultActionRequest 25
+#define KviEvent_OnWallops 20
+#define KviEvent_OnIgnoredMessage 21
+#define KviEvent_OnServerNotice 22
// Connection
/**
* \def KviEvent_OnIrcConnectionEstabilished Triggered when the IRC connection is established
* \def KviEvent_OnIrcConnectionTerminated Triggered when the IRC connection is terminated
* \def KviEvent_OnIrc Triggered when the login is completed
-
+* \def KviEvent_OnNetsplit A netsplit has been detected
+* \def KviEvent_OnDisconnectRequest Triggered when the user requests a disconnection
+* \def KviEvent_OnHTTPGetTerminated A http.get command has terminated execution
+* \def KviEvent_OnUnhandledLiteral An unhandled literal server message has been received
* \def KviEvent_OnOutboundTraffic Triggered when text is sent to the server
*/
-#define KviEvent_OnIRCConnectionEstabilished 26
-#define KviEvent_OnIRCConnectionTerminated 27
-#define KviEvent_OnIRC 28
-#define KviEvent_OnNetsplit 29
-#define KviEvent_OnDisconnectRequest 30
-#define KviEvent_OnHTTPGetTerminated 31
-#define KviEvent_OnUnhandledLiteral 32
-#define KviEvent_OnOutboundTraffic 33
+#define KviEvent_OnIRCConnectionEstabilished 23
+#define KviEvent_OnIRCConnectionTerminated 24
+#define KviEvent_OnIRC 25
+#define KviEvent_OnNetsplit 26
+#define KviEvent_OnDisconnectRequest 27
+#define KviEvent_OnHTTPGetTerminated 28
+#define KviEvent_OnUnhandledLiteral 29
+#define KviEvent_OnOutboundTraffic 30
// Popups
-#define KviEvent_OnChannelPopupRequest 34
-#define KviEvent_OnConsolePopupRequest 35
-#define KviEvent_OnQueryPopupRequest 36
-#define KviEvent_OnWindowPopupRequest 37
-#define KviEvent_OnHostLinkPopupRequest 38
-#define KviEvent_OnURLLinkPopupRequest 39
-#define KviEvent_OnServerLinkPopupRequest 40
-#define KviEvent_OnChannelLinkPopupRequest 41
-#define KviEvent_OnNickLinkPopupRequest 42
-#define KviEvent_OnQueryNickPopupRequest 43
-#define KviEvent_OnChannelNickPopupRequest 44
+/**
+* \def KviEvent_OnChannelPopupRequest Triggered when the channel text view is right-clicked
+* \def KviEvent_OnConsolePopupRequest Triggered when the console text view is right-clicked
+* \def KviEvent_OnQueryPopupRequest Triggered when the query text view is right-clicked
+* \def KviEvent_OnWindowPopupRequest Triggered when the user middle-clicks in a text view (or right-clicks with the CTRL key pressed)
+* \def KviEvent_OnHostLinkPopupRequest Triggered when an user right clicks on a hostname link in the text view
+* \def KviEvent_OnURLLinkPopupRequest URL link popup customization
+* \def KviEvent_OnServerLinkPopupRequest Server link popup customization
+* \def KviEvent_OnChannelLinkPopupRequest Channel link popup customization
+* \def KviEvent_OnNickLinkPopupRequest Nick link popup customization
+* \def KviEvent_OnQueryNickPopupRequest Query nicklist popup customization
+* \def KviEvent_OnChannelNickPopupRequest Allows customization of the nick-on-channel context popup
+* \def KviEvent_OnNotifyListPopupRequest Notify list context popup customization
+* \def KviEvent_OnDCCChatPopupRequest Triggered when the DCC chat text view is right-clicked
+*/
+#define KviEvent_OnChannelPopupRequest 31
+#define KviEvent_OnConsolePopupRequest 32
+#define KviEvent_OnQueryPopupRequest 33
+#define KviEvent_OnWindowPopupRequest 34
+#define KviEvent_OnHostLinkPopupRequest 35
+#define KviEvent_OnURLLinkPopupRequest 36
+#define KviEvent_OnServerLinkPopupRequest 37
+#define KviEvent_OnChannelLinkPopupRequest 38
+#define KviEvent_OnNickLinkPopupRequest 39
+#define KviEvent_OnQueryNickPopupRequest 40
+#define KviEvent_OnChannelNickPopupRequest 41
+#define KviEvent_OnNotifyListPopupRequest 42
+#define KviEvent_OnDCCChatPopupRequest 43
// Channels
-#define KviEvent_OnChannelNickDefaultActionRequest 45
-#define KviEvent_OnChannelWindowCreated 46
-#define KviEvent_OnChannelSync 47
-#define KviEvent_OnChannelMessage 48
-#define KviEvent_OnChannelNotice 49
+/**
+* \def KviEvent_OnChannelWindowCreated A channel window has just been opened
+* \def KviEvent_OnChannelSync Triggered when all the channel informations have been received
+* \def KviEvent_OnChannelMessage A message has been received from the channel
+* \def KviEvent_OnChannelNotice A NOTICE have been issued to a channel
+*/
+#define KviEvent_OnChannelWindowCreated 44
+#define KviEvent_OnChannelSync 45
+#define KviEvent_OnChannelMessage 46
+#define KviEvent_OnChannelNotice 47
// Queries
-#define KviEvent_OnQueryMessage 50
-#define KviEvent_OnQueryNotice 51
-#define KviEvent_OnQueryWindowRequest 52
-#define KviEvent_OnQueryWindowCreated 53
-#define KviEvent_OnQueryTargetAdded 54
-#define KviEvent_OnQueryFileDropped 55
-#define KviEvent_OnQueryNickDefaultActionRequest 56
+/**
+* \def KviEvent_OnQueryMessage A message has been received from a query
+* \def KviEvent_OnQueryNotice A private notice has been received
+* \def KviEvent_OnQueryWindowRequest A new query window is going to be opened because a remote message has been received
+* \def KviEvent_OnQueryWindowCreated A query window has just been opened
+* \def KviEvent_OnQueryTargetAdded A new query target has been added
+* \def KviEvent_OnQueryFileDropped A file is dropped in a query
+*/
+#define KviEvent_OnQueryMessage 48
+#define KviEvent_OnQueryNotice 49
+#define KviEvent_OnQueryWindowRequest 50
+#define KviEvent_OnQueryWindowCreated 51
+#define KviEvent_OnQueryTargetAdded 52
+#define KviEvent_OnQueryFileDropped 53
// Actions
-/** \def KviEvent_OnMeAction Triggered when we perform an action */
-#define KviEvent_OnMeAway 57
-#define KviEvent_OnMeBack 58
-#define KviEvent_OnAction 59
-#define KviEvent_OnMeAction 60
-#define KviEvent_OnJoin 61
-#define KviEvent_OnMeJoin 62
-#define KviEvent_OnPart 63
-#define KviEvent_OnMePart 64
-#define KviEvent_OnKick 65
-#define KviEvent_OnMeKick 66
-#define KviEvent_OnTopic 67
-#define KviEvent_OnQuit 68
+/**
+* \def KviEvent_OnMeAway Local user sets the AWAY status
+* \def KviEvent_OnMeBack Local user cancels the AWAY status
+* \def KviEvent_OnJoin Non-local user joining a channel
+* \def KviEvent_OnMeJoin Local user joining a channel
+* \def KviEvent_OnPart Non-local user is leaving a channel
+* \def KviEvent_OnMePart Local user is leaving a channel
+* \def KviEvent_OnKick Non-local user is being kicked from a channel
+* \def KviEvent_OnMeKick Local user is being kicked from a channel
+* \def KviEvent_OnTopic Topic change on a channel
+* \def KviEvent_OnQuit An user is leaving IRC
+*/
+#define KviEvent_OnMeAway 54
+#define KviEvent_OnMeBack 55
+#define KviEvent_OnJoin 56
+#define KviEvent_OnMeJoin 57
+#define KviEvent_OnPart 58
+#define KviEvent_OnMePart 59
+#define KviEvent_OnKick 60
+#define KviEvent_OnMeKick 61
+#define KviEvent_OnTopic 62
+#define KviEvent_OnQuit 63
// IRC modes
-#define KviEvent_OnChannelModeChange 69
-#define KviEvent_OnUserMode 70
-#define KviEvent_OnBan 71
-#define KviEvent_OnUnban 72
-#define KviEvent_OnMeBan 73
-#define KviEvent_OnMeUnban 74
-#define KviEvent_OnBanException 75
-#define KviEvent_OnBanExceptionRemove 76
-#define KviEvent_OnMeBanException 77
-#define KviEvent_OnMeBanExceptionRemove 78
-#define KviEvent_OnInviteException 79
-#define KviEvent_OnInviteExceptionRemove 80
-#define KviEvent_OnMeInviteException 81
-#define KviEvent_OnMeInviteExceptionRemove 82
-#define KviEvent_OnLimitSet 83
-#define KviEvent_OnLimitUnset 84
-#define KviEvent_OnKeySet 85
-#define KviEvent_OnKeyUnset 86
-#define KviEvent_OnNickChange 87
-#define KviEvent_OnMeNickChange 88
-#define KviEvent_OnInvite 89
-#define KviEvent_OnChanOwner 90
-#define KviEvent_OnDeChanOwner 91
-#define KviEvent_OnMeChanOwner 92
-#define KviEvent_OnMeDeChanOwner 93
-#define KviEvent_OnChanAdmin 94
-#define KviEvent_OnDeChanAdmin 95
-#define KviEvent_OnMeChanAdmin 96
-#define KviEvent_OnMeDeChanAdmin 97
-#define KviEvent_OnOp 98
-#define KviEvent_OnDeOp 99
-#define KviEvent_OnMeOp 100
-#define KviEvent_OnMeDeOp 101
-#define KviEvent_OnHalfOp 102
-#define KviEvent_OnDeHalfOp 103
-#define KviEvent_OnMeHalfOp 104
-#define KviEvent_OnMeDeHalfOp 105
-#define KviEvent_OnVoice 106
-#define KviEvent_OnDeVoice 107
-#define KviEvent_OnMeVoice 108
-#define KviEvent_OnMeDeVoice 109
-#define KviEvent_OnUserOp 110
-#define KviEvent_OnDeUserOp 111
-#define KviEvent_OnMeUserOp 112
-#define KviEvent_OnMeDeUserOp 113
+/**
+* \def KviEvent_OnChannelModeChange The channel mode has been changed
+* \def KviEvent_OnUserMode The local user has changed mode
+* \def KviEvent_OnBan Someone has set a +b flag on the channel
+* \def KviEvent_OnUnban Someone has set a -b flag on the channel
+* \def KviEvent_OnMeBan Local user is being banned in a channel
+* \def KviEvent_OnMeUnban Local user is being de-banned in a channel
+* \def KviEvent_OnBanException Someone has set a +e flag on the channel
+* \def KviEvent_OnBanExceptionRemove Someone has set a -e flag on the channel
+* \def KviEvent_OnMeBanException Someone has set a +e flag on the local user
+* \def KviEvent_OnMeBanExceptionRemove Someone has set a -e flag on the local user
+* \def KviEvent_OnInvite Triggered when a user invites someone in the channel
+* \def KviEvent_OnInviteException A +I mode has been set
+* \def KviEvent_OnInviteExceptionRemove Mode -I has been set
+* \def KviEvent_OnMeInviteException A +I mode has been set on the local user
+* \def KviEvent_OnMeInviteExceptionRemove A -I mode has been set on the local user
+* \def KviEvent_OnLimitSet The channel users limit has been set
+* \def KviEvent_OnLimitUnset The channel users limit has been unset
+* \def KviEvent_OnKeySet The channel users key has been set
+* \def KviEvent_OnKeyUnset The channel users key has been unset
+* \def KviEvent_OnNickChange Someone has changed his nickname
+* \def KviEvent_OnMeNickChange The local user has changed his nickname
+* \def KviEvent_OnChanOwner Someone has given a user the +q flag
+* \def KviEvent_OnDeChanOwner Someone has given a user the -q flag
+* \def KviEvent_OnMeChanOwner Someone has given the +q flag to the local user
+* \def KviEvent_OnMeDeChanOwner Someone has given the -q flag to the local user
+* \def KviEvent_OnChanAdmin Someone has given a user the +a flag
+* \def KviEvent_OnDeChanAdmin Someone has given a user the -a flag
+* \def KviEvent_OnMeChanAdmin Someone has given the +a flag to the local user
+* \def KviEvent_OnMeDeChanAdmin Someone has given the -a flag to the local user
+* \def KviEvent_OnOp Someone has given a user the +o flag
+* \def KviEvent_OnDeOp Someone has given a user the -o flag
+* \def KviEvent_OnMeOp Someone has given a user the +o flag to the local user
+* \def KviEvent_OnMeDeOp Someone has given a user the -o flag to the local user
+* \def KviEvent_OnHalfOp Someone has given a user the +h flag
+* \def KviEvent_OnDeHalfOp Someone has given a user the -h flag
+* \def KviEvent_OnMeHalfOp Someone has given the local user the +h flag
+* \def KviEvent_OnMeDeHalfOp Someone has given the local user the -h flag
+* \def KviEvent_OnVoice Someone has given a user the +v flag
+* \def KviEvent_OnDeVoice Someone has given a user the -v flag
+* \def KviEvent_OnMeVoice Someone has given the local user the +v flag
+* \def KviEvent_OnMeDeVoice Someone has given the local user the -v flag
+* \def KviEvent_OnUserOp Someone has given a user the +u flag
+* \def KviEvent_OnDeUserOp Someone has given a user the -u flag
+* \def KviEvent_OnMeUserOp Someone has given the local user the +u flag
+* \def KviEvent_OnMeDeUserOp Someone has given the local user the -u flag
+*/
+#define KviEvent_OnChannelModeChange 64
+#define KviEvent_OnUserMode 65
+#define KviEvent_OnBan 66
+#define KviEvent_OnUnban 67
+#define KviEvent_OnMeBan 68
+#define KviEvent_OnMeUnban 69
+#define KviEvent_OnBanException 70
+#define KviEvent_OnBanExceptionRemove 71
+#define KviEvent_OnMeBanException 72
+#define KviEvent_OnMeBanExceptionRemove 73
+#define KviEvent_OnInvite 74
+#define KviEvent_OnInviteException 75
+#define KviEvent_OnInviteExceptionRemove 76
+#define KviEvent_OnMeInviteException 77
+#define KviEvent_OnMeInviteExceptionRemove 78
+#define KviEvent_OnLimitSet 79
+#define KviEvent_OnLimitUnset 80
+#define KviEvent_OnKeySet 81
+#define KviEvent_OnKeyUnset 82
+#define KviEvent_OnNickChange 83
+#define KviEvent_OnMeNickChange 84
+#define KviEvent_OnChanOwner 85
+#define KviEvent_OnDeChanOwner 86
+#define KviEvent_OnMeChanOwner 87
+#define KviEvent_OnMeDeChanOwner 88
+#define KviEvent_OnChanAdmin 89
+#define KviEvent_OnDeChanAdmin 90
+#define KviEvent_OnMeChanAdmin 91
+#define KviEvent_OnMeDeChanAdmin 92
+#define KviEvent_OnOp 93
+#define KviEvent_OnDeOp 94
+#define KviEvent_OnMeOp 95
+#define KviEvent_OnMeDeOp 96
+#define KviEvent_OnHalfOp 97
+#define KviEvent_OnDeHalfOp 98
+#define KviEvent_OnMeHalfOp 99
+#define KviEvent_OnMeDeHalfOp 100
+#define KviEvent_OnVoice 101
+#define KviEvent_OnDeVoice 102
+#define KviEvent_OnMeVoice 103
+#define KviEvent_OnMeDeVoice 104
+#define KviEvent_OnUserOp 105
+#define KviEvent_OnDeUserOp 106
+#define KviEvent_OnMeUserOp 107
+#define KviEvent_OnMeDeUserOp 108
// Services
-#define KviEvent_OnChanServNotice 114
-#define KviEvent_OnNickServNotice 115
-#define KviEvent_OnNickServAuth 116
+/**
+* \def KviEvent_OnChanServNotice A notice from ChanServ has been received
+* \def KviEvent_OnNickServNotice A notice from NickServ has been received
+* \def KviEvent_OnNickServAuth Triggered when IRCd sets a registered user mode.
+*/
+#define KviEvent_OnChanServNotice 109
+#define KviEvent_OnNickServNotice 110
+#define KviEvent_OnNickServAuth 111
// CTCPs
-#define KviEvent_OnCTCPRequest 117
-#define KviEvent_OnCTCPReply 118
-#define KviEvent_OnCTCPFlood 119
-#define KviEvent_OnDCCSessionCreated 120
-#define KviEvent_OnDCCSessionDestroyed 121
-#define KviEvent_OnDCCChatPopupRequest 122
-#define KviEvent_OnDCCChatWindowCreated 123
-#define KviEvent_OnDCCChatConnectionInProgress 124
-#define KviEvent_OnDCCChatConnected 125
-#define KviEvent_OnDCCChatMessage 126
-#define KviEvent_OnDCCChatError 127
-#define KviEvent_OnDCCChatDisconnected 128
-#define KviEvent_OnDCCChatWindowClosing 129
-#define KviEvent_OnDCCFileTransferConnectionInProgress 130
-#define KviEvent_OnDCCFileTransferBegin 131
-#define KviEvent_OnDCCFileTransferSuccess 132
-#define KviEvent_OnDCCFileTransferFailed 133
+/**
+* \def KviEvent_OnAction Someone issued a CTCP ACTION
+* \def KviEvent_OnMeAction User issued a CTCP ACTION
+* \def KviEvent_OnCTCPRequest A CTCP request has been received
+* \def KviEvent_OnCTCPReply A CTCP reply has been received
+* \def KviEvent_OnCTCPFlood Someone tried to flood you with CTCP requests
+* \def KviEvent_OnDCCSessionCreated A new DCC session has just been created
+* \def KviEvent_OnDCCSessionDestroyed A new DCC session has just been destroyed
+* \def KviEvent_OnDCCChatWindowCreated A DCC Chat window has been just created
+* \def KviEvent_OnDCCChatConnectionInProgress A DCC Chat connection has just been started
+* \def KviEvent_OnDCCChatConnected A DCC Chat connection has been established
+* \def KviEvent_OnDCCChatMessage A DCC Chat message has just been received
+* \def KviEvent_OnDCCChatError A DCC Chat error has just been triggered
+* \def KviEvent_OnDCCChatDisconnected A DCC Chat has been just disconnected
+* \def KviEvent_OnDCCChatWindowClosing A DCC Chat is going to be closed
+* \def KviEvent_OnDCCFileTransferConnectionInProgress Triggered when a DCC File transfer is waiting for a connection
+* \def KviEvent_OnDCCFileTransferBegin Triggered when a DCC File transfer begins
+* \def KviEvent_OnDCCFileTransferSuccess Triggered when a DCC File transfer succeeds
+* \def KviEvent_OnDCCFileTransferFailed Triggered when a DCC File transfer fails
+*/
+#define KviEvent_OnAction 112
+#define KviEvent_OnMeAction 113
+#define KviEvent_OnCTCPRequest 114
+#define KviEvent_OnCTCPReply 115
+#define KviEvent_OnCTCPFlood 116
+#define KviEvent_OnDCCSessionCreated 117
+#define KviEvent_OnDCCSessionDestroyed 118
+#define KviEvent_OnDCCChatWindowCreated 119
+#define KviEvent_OnDCCChatConnectionInProgress 120
+#define KviEvent_OnDCCChatConnected 121
+#define KviEvent_OnDCCChatMessage 122
+#define KviEvent_OnDCCChatError 123
+#define KviEvent_OnDCCChatDisconnected 124
+#define KviEvent_OnDCCChatWindowClosing 125
+#define KviEvent_OnDCCFileTransferConnectionInProgress 126
+#define KviEvent_OnDCCFileTransferBegin 127
+#define KviEvent_OnDCCFileTransferSuccess 128
+#define KviEvent_OnDCCFileTransferFailed 129
// Link clicks
-#define KviEvent_OnChannelNickLinkClick 134
-#define KviEvent_OnQueryNickLinkClick 135
-#define KviEvent_OnConsoleNickLinkClick 136
-#define KviEvent_OnHostLinkClick 137
-#define KviEvent_OnURLLinkClick 138
-#define KviEvent_OnChannelLinkClick 139
-#define KviEvent_OnServerLinkClick 140
+/**
+* \def KviEvent_OnChannelNickLinkClick User clicked on nick in channel
+* \def KviEvent_OnQueryNickLinkClick User clicked on nickname in query window
+* \def KviEvent_OnConsoleNickLinkClick User clicked on nickname in console window
+* \def KviEvent_OnHostLinkClick Triggered when user clicks on any hostname in any window
+* \def KviEvent_OnURLLinkClick Triggered when user clicks on any URL link in any window
+* \def KviEvent_OnChannelLinkClick Triggered when user clicks on any channel name in any window
+* \def KviEvent_OnServerLinkClick Triggered when user clicks on server name in any window
+* \def KviEvent_OnTextViewDoubleClicked Text view link double click customization
+* \def KviEvent_OnNickLinkDefaultActionRequest Nick link double click customization
+* \def KviEvent_OnChannelNickDefaultActionRequest Nicknames double click customization
+* \def KviEvent_OnQueryNickDefaultActionRequest Query double click customization
+*/
+#define KviEvent_OnChannelNickLinkClick 130
+#define KviEvent_OnQueryNickLinkClick 131
+#define KviEvent_OnConsoleNickLinkClick 132
+#define KviEvent_OnHostLinkClick 133
+#define KviEvent_OnURLLinkClick 134
+#define KviEvent_OnChannelLinkClick 135
+#define KviEvent_OnServerLinkClick 136
+#define KviEvent_OnTextViewDoubleClicked 137
+#define KviEvent_OnNickLinkDefaultActionRequest 138
+#define KviEvent_OnChannelNickDefaultActionRequest 139
+#define KviEvent_OnQueryNickDefaultActionRequest 140
/** \def KVI_KVS_NUM_APP_EVENTS Defines the number of events */
#define KVI_KVS_NUM_APP_EVENTS 141
diff --git a/src/modules/objects/class_multilineedit.cpp b/src/modules/objects/class_multilineedit.cpp
index 42c42e2a1..44c13a959 100644
--- a/src/modules/objects/class_multilineedit.cpp
+++ b/src/modules/objects/class_multilineedit.cpp
@@ -401,7 +401,11 @@ bool KviKvsObject_textedit::functionTextLine(KviKvsObjectFunctionCall *c)
if(!widget())return true;
if(iBlock > ((QTextEdit *)widget())->document()->blockCount() || iBlock < 0) c->warning(__tr2qs("No such line number"));
else
+#if QT_VERSION >= 0x040400
+ c->returnValue()->setString(((QTextEdit *)widget())->document()->findBlockByNumber(iBlock).text());
+#else
c->returnValue()->setString(((QTextEdit *)widget())->document()->findBlock(iBlock).text());
+#endif
return true;
}