Difference between revisions of "Lua Events"

From ShoutIRC RadioBot Wiki
Jump to navigation Jump to search
m (Text replacement - "IRCBot" to "RadioBot")
 
 
(One intermediate revision by the same user not shown)
Line 64: Line 64:
  Sent when a packet has been received from a remote client like the DJ Client or WebRequest. See [[Remote Commands]] for details.
  Sent when a packet has been received from a remote client like the DJ Client or WebRequest. See [[Remote Commands]] for details.
  Replied can be sent with the SendRemoteReply() command.
  Replied can be sent with the SendRemoteReply() command.
on_sms
function handler(hostmask, phone, uflags, message)
Sent when an SMS message has been received by the [[Plugin:SMS|SMS plugin]].
Replied can be sent with the SendSMS() command.


  ss_dragcomplete
  ss_dragcomplete

Latest revision as of 23:22, 8 June 2014

Here are the Lua Events and what parameters are sent with them.
If you would like to see any other events implemented let us know and we'll add it.
Event handlers should return 0 to continue processing of other handlers/plugins, or anything else to block further processing.
on_join/part/quit/etc. should pretty much never return anything other than 0 since it could make other plugins go out of sync.

on_pm
function handler(hostmask, nick, uflags, netno, text)
Sent when the bot receives a PM
on_text
function handler(hostmask, nick, uflags, netno, channel, text)
Sent when someone talks in a channel
on_notice_pm
function handler(hostmask, nick, uflags, netno, text)
Sent when someone NOTICE'es the bot
on_notice_text
function handler(hostmask, nick, uflags, netno, channel, text)
Sent when someone NOTICE'es a channel
on_join
function handler(hostmask, nick, uflags, netno, channel)
Sent when a user joins a channel
on_part
function handler(hostmask, nick, uflags, netno, channel, reason)
Sent when a user parts a channel
on_quit
function handler(hostmask, nick, uflags, netno, reason)
Sent when a user quits IRC
on_nick
function handler(netno, old_nick, new_nick)
Sent when a user changed their nickname on IRC
on_topic
function handler(hostmask, nick, uflags, netno, channel, topic)
Sent when the topic in a channel is changed
on_kick
function handler(hostmask, nick, uflags, netno, channel, kicked_hostmask, kicked_nick, reason)
Sent when a user is kicked from a channel
on_chmode
function handler(hostmask, nick, uflags, netno, channel, modes)
Sent when the channel modes have been changed
on_umode
function handler(hostmask, nick, uflags, netno, modes)
Sent when IRC user modes have been changed (not RadioBot User Flags)
on_ban
function handler(hostmask, nick, uflags, netno, channel, banmask)
Sent when a ban has been added to an IRC channel
on_unban
function handler(hostmask, nick, uflags, netno, channel, banmask)
Sent when a ban has been removed from an IRC channel
remote
function handler(sock, nick, uflags, cliversion, command, datalen, data)
Sent when a packet has been received from a remote client like the DJ Client or WebRequest. See Remote Commands for details.
Replied can be sent with the SendRemoteReply() command.
on_sms
function handler(hostmask, phone, uflags, message)
Sent when an SMS message has been received by the SMS plugin.
Replied can be sent with the SendSMS() command.
ss_dragcomplete
function handler(song_changed)
Sent when the SS scraper is done scraping servers. song_changed is a boolean set to true if the current song title has changed.
Note: Unlike other callbacks, there is no return value in this handler.


RadioBot vde

RadioBot main pages
Main PageInstallationChangelogCommandsPluginsFAQConfigurationCreditsRemote ClientBuilt-In VariablesMulti Sound Server ModeUsername Character Restrictions
Auto DJ Pages
Auto DJ Main PageWebRequest SystemSchedulerMP3 EncoderVoice SupportMySQL Plugin
RadioBot Programming vde

RadioBot Programming
Plugin APIRemote CommandsPlugin InitializationRadioBot DBChanging Command PermissionsShoutIRC Music Database
Lua Scripting
Lua PluginLua ScriptingLua Events