<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/Modules/bIRC/ircGetChannelTopic?action=history&amp;feed=atom</id>
	<title>Modules/bIRC/ircGetChannelTopic - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/Modules/bIRC/ircGetChannelTopic?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/bIRC/ircGetChannelTopic&amp;action=history"/>
	<updated>2026-05-15T07:16:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/bIRC/ircGetChannelTopic&amp;diff=21061&amp;oldid=prev</id>
		<title>Awwu: Created page with '{{ml_birc}} __NOTOC__ This function returns the current channel topic and it's creator of the specified channel. The specified {{ml_birc|ircbot}} has to be in that channel.  ==Sy…'</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/bIRC/ircGetChannelTopic&amp;diff=21061&amp;oldid=prev"/>
		<updated>2009-08-13T18:03:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{ml_birc}} __NOTOC__ This function returns the current channel topic and it&amp;#039;s creator of the specified channel. The specified {{ml_birc|ircbot}} has to be in that channel.  ==Sy…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ml_birc}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the current channel topic and it's creator of the specified channel. The specified {{ml_birc|ircbot}} has to be in that channel.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string, string ircGetChannelTopic ( ircbot theBot, string channel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBot:''' The ircbot which is in the channel&lt;br /&gt;
*'''channel:''' The name of the channel which channel topic you want to get&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the currently set topic and it's creator of the specified channel. If no topic is set, it returns empty strings.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates an ircbot called ''DummyBot'' makes it connect to a server and join a channel. It also includes an IRC command '!topic' which can used to print out current channel topic.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function resourceStart ( )&lt;br /&gt;
    theBot = ircCreateBot ( &amp;quot;DummyBot&amp;quot; )&lt;br /&gt;
    ircConnect ( theBot, &amp;quot;irc.gtanet.com&amp;quot;, 6667 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onResourceStart&amp;quot;, getResourceRootElement ( getThisResource() ), resourceStart )&lt;br /&gt;
&lt;br /&gt;
function event_ircOnConnect ( theBot )&lt;br /&gt;
    setTimer ( ircJoinChannel, 2000, 1, theBot, &amp;quot;#testchannel&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function event_ircOnText ( theBot, channel, sender, message )&lt;br /&gt;
    if message:find( &amp;quot;!topic&amp;quot; ) then&lt;br /&gt;
        local channelTopic, topicCreator = ircGetChannelTopic( theBot, channel )&lt;br /&gt;
        if channelTopic ~= &amp;quot;&amp;quot; then&lt;br /&gt;
            ircSendMessage ( theBot, channel, &amp;quot;Current topic is: '&amp;quot; .. channelTopic .. &amp;quot;' and it's set by &amp;quot; .. topicCreator )&lt;br /&gt;
        else&lt;br /&gt;
            ircSendMessage ( theBot, channel, &amp;quot;There is no topic set!&amp;quot; )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{ml_birc functions}}&lt;/div&gt;</summary>
		<author><name>Awwu</name></author>
	</entry>
</feed>