Modules/SebasIRC/ircJoin: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Server function}} {{ModuleFunction|SebasIRC}} // TODO ==Syntax== <syntaxhighlight lang="lua"> bool ircJoin(string channel) </syntaxhighlight> ===Required arguments=== * '''channel:''' The channel name...)
 
No edit summary
Line 7: Line 7:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool ircJoin(string channel)
bool ircJoin(string channel [, string password])
</syntaxhighlight>
</syntaxhighlight>
===Required arguments===
===Required arguments===
* '''channel:''' The channel name.
* '''channel:''' The channel name.
===Optional Arguments===
* '''password:''' The channel password.


===Returns===
===Returns===
Line 17: Line 21:
==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
-- Example
addEventHandler("onResourceStart", getResourceRootElement(),
  function()
    local connect = ircConnect("irc.mtasa.com", 6667)
    if connect then
      ircJoin("#mta")
    end
  end
)
</syntaxhighlight>
</syntaxhighlight>


==See also==
==See also==
{{Modules/SebasIRC/Functions}}
{{Modules/SebasIRC/Functions}}

Revision as of 12:53, 22 May 2009

Package-x-generic.png This function is provided by the external module SebasIRC. You must install this module to use this function.


// TODO

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)
    if connect then
      ircJoin("#mta")
    end
  end
)

See also

Connection:

Channel:

Bot: