Modules/SebasIRC/ircPart: Difference between revisions
Jump to navigation
Jump to search
(New page: {{ml_irc}} __NOTOC__ {{ModuleFunction|SebasIRC}} This function will part the bot from a channel ==Syntax== <syntaxhighlight lang="lua"> bool ircPart(string channel) </syntaxhighlight> ===Required arguments=== * '...) |
(No difference)
|
Revision as of 16:43, 29 May 2009
| This function is provided by the external module SebasIRC. You must install this module to use this function. | |
This function will part the bot from a channel
Syntax
bool ircPart(string channel)
Required arguments
- channel: The channel name to part.
Returns
True.
Example
local bot = nil
addEventHandler("onResourceStart", getResourceRootElement(),
function()
if ircConnect("irc.mtasa.com", 6667) then
bot = true
ircJoin("#mta.echo")
end
end
)
addCommandHandler("part",
function(thePlayer, command, channel)
if channel == nil then return end
if bot and ircConnected() then
ircPart(tostring(channel))
outputChatBox("-IRC- Parted: "..tostring(channel).."!")
end
end
)
See also
Connection:
Channel:
- ircJoin
- ircPart
- ircSay
- ircNotice
- ircInvite
- ircSetChannelMode
- ircGetChannelModes
- ircSetChannelTopic
- ircGetChannelTopic