PL/Modules/SebasIRC/ircPart
Jump to navigation
Jump to search
| Ta funkcja/zdarzenie jest dostarczana przez zewnętrzny moduł {{{2}}}. Musisz go zainstalować aby jej używać. | |
Ta funkcja sprawia, że bot wychodzi z kanału.
Składnia
bool ircPart ( string channel [, string reason = "" ] )
Wymagane argumenty
- channel: Kanał z którego bot ma wyjść
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- reason: Powód wyjścia
Wartości zwrotne
Zwraca true lub false w przypadku podania nieprawidłowych argumentów.
Przykład
local bot = nil
addEventHandler("onResourceStart", getResourceRootElement(),
function()
if ircConnect("irc.mtasa.com", 6667, "echoBot") then
bot = true
ircJoin("#mta.echo")
end
end
)
addCommandHandler("part",
function(thePlayer, command, channel)
if channel == nil then return end
if bot and ircIsConnected() then
ircPart(tostring(channel))
outputChatBox("-IRC- Opuszczono kanał: "..tostring(channel).."!")
end
end
)
Zobacz także
Połączenie:
Kanał:
- ircJoin
- ircPart
- ircSay
- ircNotice
- ircInvite
- ircSetChannelMode
- ircGetChannelModes
- ircSetChannelTopic
- ircGetChannelTopic