Modules/SebasIRC/onIRCRaw: Difference between revisions
Jump to navigation
Jump to search
Paul Cortez (talk | contribs) (Created page with '{{ml_irc}} __NOTOC__ This event triggers when raw data is sent from the IRC server to the module. Thanks to this, scripts can know when something has happened on IRC. (i.e. chat…') |
No edit summary |
||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | |||
local root = getRootElement() | |||
function handleRawIRCData(msg) | |||
if msg then | |||
outputServerLog(msg) -- Show all irc data | |||
end | |||
end | |||
addEventHandler("onIRCRaw", root, handleRawIRCData) | |||
</syntaxhighlight> | |||
==See also== | ==See also== | ||
{{Modules/SebasIRC/Events}} | {{Modules/SebasIRC/Events}} |
Revision as of 12:47, 13 September 2009
This event triggers when raw data is sent from the IRC server to the module. Thanks to this, scripts can know when something has happened on IRC. (i.e. chatting)
Parameters
string content
- content: The raw command that has been sent to the module
Source
The source of this event is the root element.
Example
local root = getRootElement() function handleRawIRCData(msg) if msg then outputServerLog(msg) -- Show all irc data end end addEventHandler("onIRCRaw", root, handleRawIRCData)
See also
There are no more events, more events are made in lua with onIRCRaw so that you can create your own syntax.