Modules/SebasIRC/ircJoin: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
{{ModuleFunction|SebasIRC}} | {{ModuleFunction|SebasIRC}} | ||
This function joins the bot a channel (, with a password). | |||
==Syntax== | ==Syntax== | ||
Line 23: | Line 22: | ||
addEventHandler("onResourceStart", getResourceRootElement(), | addEventHandler("onResourceStart", getResourceRootElement(), | ||
function() | function() | ||
local connect = ircConnect("irc.mtasa.com", 6667) | local connect = ircConnect("irc.mtasa.com", 6667, "MTABot", "#mta") | ||
if connect then | if connect then | ||
ircJoin("#mta") | ircJoin("#mta.test") | ||
end | end | ||
end | end |
Revision as of 12:04, 25 July 2009
This function is provided by the external module SebasIRC. You must install this module to use this function. | |
This function joins the bot a channel (, with a password).
Syntax
bool ircJoin(string channel [, string password])
Required arguments
- channel: The channel name.
Optional Arguments
- password: The channel password.
Returns
True if joined, otherwise false.
Example
addEventHandler("onResourceStart", getResourceRootElement(), function() local connect = ircConnect("irc.mtasa.com", 6667, "MTABot", "#mta") if connect then ircJoin("#mta.test") end end )
See also
Connection:
Channel:
- ircJoin
- ircPart
- ircSay
- ircNotice
- ircInvite
- ircSetChannelMode
- ircGetChannelModes
- ircSetChannelTopic
- ircGetChannelTopic