<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.miranda-ng.org/index.php?action=history&amp;feed=atom&amp;title=Content%3AMirLua%2FExamples%2Fprotocols</id>
	<title>Content:MirLua/Examples/protocols - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.miranda-ng.org/index.php?action=history&amp;feed=atom&amp;title=Content%3AMirLua%2FExamples%2Fprotocols"/>
	<link rel="alternate" type="text/html" href="https://wiki.miranda-ng.org/index.php?title=Content:MirLua/Examples/protocols&amp;action=history"/>
	<updated>2026-10-17T10:17:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.miranda-ng.org/index.php?title=Content:MirLua/Examples/protocols&amp;diff=19982&amp;oldid=prev</id>
		<title>Unsane: Created page with &quot;Switch all protocols statuses to online: {{Content:MirLua/Example|code= local protos = require(&#039;m_protocols&#039;)  local ID_STATUS_OFFLINE = 40071 local ID_STATUS_ONLINE = 40072...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.miranda-ng.org/index.php?title=Content:MirLua/Examples/protocols&amp;diff=19982&amp;oldid=prev"/>
		<updated>2017-09-26T21:46:19Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Switch all protocols statuses to online: {{Content:MirLua/Example|code= local protos = require(&amp;#039;m_protocols&amp;#039;)  local ID_STATUS_OFFLINE = 40071 local ID_STATUS_ONLINE = 40072...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Switch all protocols statuses to online:&lt;br /&gt;
{{Content:MirLua/Example|code=&lt;br /&gt;
local protos = require(&amp;#039;m_protocols&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local ID_STATUS_OFFLINE = 40071&lt;br /&gt;
local ID_STATUS_ONLINE = 40072&lt;br /&gt;
&lt;br /&gt;
m.HookEvent(&amp;#039;Miranda/System/ModulesLoaded&amp;#039;, function()&lt;br /&gt;
  for acc in protos.Accounts() do&lt;br /&gt;
    if acc.IsEnabled and not acc.IsVirtual then&lt;br /&gt;
      local status = acc:CallService(&amp;#039;/GetStatus&amp;#039;)&lt;br /&gt;
      if (status == ID_STATUS_OFFLINE) then&lt;br /&gt;
        acc:CallService(&amp;#039;/SetStatus&amp;#039;, ID_STATUS_ONLINE)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end)&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Unsane</name></author>
	</entry>
</feed>