<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MechaTallon</id>
		<title>ComputerCraft Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MechaTallon"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/Special:Contributions/MechaTallon"/>
		<updated>2026-07-11T10:34:34Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Receiving_a_rednet_message_through_os.pullEvent()&amp;diff=4505</id>
		<title>Receiving a rednet message through os.pullEvent()</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Receiving_a_rednet_message_through_os.pullEvent()&amp;diff=4505"/>
				<updated>2012-12-03T05:09:32Z</updated>
		
		<summary type="html">&lt;p&gt;MechaTallon: /* Explanation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following method is a good method of receiving a rednet message without using rednet.receive().&lt;br /&gt;
It is usually used in IRC, Chat programs e.t.c.&lt;br /&gt;
When a message arrives to a computer, a &amp;quot;rednet_message&amp;quot; event occurs.  &lt;br /&gt;
== The Code ==&lt;br /&gt;
This is a typical Listener which prints the content and the sender id of any incoming message.&lt;br /&gt;
 for n,m in ipairs(rs.getSides()) do rednet.open(m) end -- Opens all rednet sides.&lt;br /&gt;
 while true do&lt;br /&gt;
   event, id, text = os.pullEvent()&lt;br /&gt;
   if event == &amp;quot;rednet_message&amp;quot; then&lt;br /&gt;
     print(id .. &amp;quot;&amp;gt; &amp;quot; .. text)&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== Explanation ==&lt;br /&gt;
 for n,m in ipairs(rs.getSides()) do rednet.open(m) end&lt;br /&gt;
Here we just open all sides for rednet processing.&lt;br /&gt;
&lt;br /&gt;
 while true do&lt;br /&gt;
We start a loop because os.pullEvent() terminates itself after 10 seconds.&lt;br /&gt;
&lt;br /&gt;
 event, id, text = os.pullEvent()&lt;br /&gt;
We wait for an event to occur and when this happens, we store the event's info into 3 variables.&lt;br /&gt;
NOTE: You can give your variables whichever name you want.&lt;br /&gt;
&lt;br /&gt;
 if event == &amp;quot;rednet_message&amp;quot; then&lt;br /&gt;
We check if the event was a rednet message.&lt;br /&gt;
&lt;br /&gt;
 print(id .. &amp;quot;&amp;gt; &amp;quot; .. text)&lt;br /&gt;
We print the message and the id of the sender.&lt;br /&gt;
&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
We close our previous statements.&lt;br /&gt;
&lt;br /&gt;
[[Category:Programs]][[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>MechaTallon</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Receiving_a_rednet_message_through_os.pullEvent()&amp;diff=4504</id>
		<title>Receiving a rednet message through os.pullEvent()</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Receiving_a_rednet_message_through_os.pullEvent()&amp;diff=4504"/>
				<updated>2012-12-03T05:08:47Z</updated>
		
		<summary type="html">&lt;p&gt;MechaTallon: /* The Code */ - Gave a bit more sophisticated code for this...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following method is a good method of receiving a rednet message without using rednet.receive().&lt;br /&gt;
It is usually used in IRC, Chat programs e.t.c.&lt;br /&gt;
When a message arrives to a computer, a &amp;quot;rednet_message&amp;quot; event occurs.  &lt;br /&gt;
== The Code ==&lt;br /&gt;
This is a typical Listener which prints the content and the sender id of any incoming message.&lt;br /&gt;
 for n,m in ipairs(rs.getSides()) do rednet.open(m) end -- Opens all rednet sides.&lt;br /&gt;
 while true do&lt;br /&gt;
   event, id, text = os.pullEvent()&lt;br /&gt;
   if event == &amp;quot;rednet_message&amp;quot; then&lt;br /&gt;
     print(id .. &amp;quot;&amp;gt; &amp;quot; .. text)&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== Explanation ==&lt;br /&gt;
 rednet.open(&amp;quot;Direction_of_modem&amp;quot;)&lt;br /&gt;
Here we just open the modem.&lt;br /&gt;
&lt;br /&gt;
 while true do&lt;br /&gt;
We start a loop because os.pullEvent() terminates itself after 10 seconds.&lt;br /&gt;
&lt;br /&gt;
 event, id, text = os.pullEvent()&lt;br /&gt;
We wait for an event to occur and when this happens, we store the event's info into 3 variables.&lt;br /&gt;
NOTE: You can give your variables whichever name you want.&lt;br /&gt;
&lt;br /&gt;
 if event == &amp;quot;rednet_message&amp;quot; then&lt;br /&gt;
We check if the event was a rednet message.&lt;br /&gt;
&lt;br /&gt;
 print(id .. &amp;quot;&amp;gt; &amp;quot; .. text)&lt;br /&gt;
We print the message and the id of the sender.&lt;br /&gt;
&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
We close our previous statements.&lt;br /&gt;
&lt;br /&gt;
[[Category:Programs]][[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>MechaTallon</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Rednet.isOpen&amp;diff=4503</id>
		<title>Rednet.isOpen</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Rednet.isOpen&amp;diff=4503"/>
				<updated>2012-12-03T05:02:32Z</updated>
		
		<summary type="html">&lt;p&gt;MechaTallon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=rednet.isOpen&lt;br /&gt;
|args=[[string]] side&lt;br /&gt;
|returns=[[boolean_(type)|boolean]] isOpen, if the side has rednet opened it returns true, else false.&lt;br /&gt;
|api=rednet&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Checks to see if the side has rednet opened.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Checks if any side is opened, if so then tell the user.&lt;br /&gt;
|code=for n,m in ipairs(rs.getSides()) do if rednet.isOpen(m) then print(m..&amp;quot; is open!&amp;quot;) else print(m..&amp;quot; isn't open!&amp;quot;) end end&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>MechaTallon</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Rednet.isOpen&amp;diff=4502</id>
		<title>Rednet.isOpen</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Rednet.isOpen&amp;diff=4502"/>
				<updated>2012-12-03T05:01:56Z</updated>
		
		<summary type="html">&lt;p&gt;MechaTallon: Added new page for the rednet API, may need revising.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=rednet.isOpen&lt;br /&gt;
|args=[[string]] side&lt;br /&gt;
|returns=[[boolean_(type)|boolean]] isOpen, if the side has rednet opened it returns true, else false.&lt;br /&gt;
|api=rednet&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Checks to see if the side has rednet opened.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Checks if any side is opened, if so then tell the user.&lt;br /&gt;
|code=for n,m in ipairs(rs.getSides()) do if rednet.isOpen(m) then print(m..&amp;quot; is open!&amp;quot;) else print(m..&amp;quot; isn't open!&amp;quot;) end&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>MechaTallon</name></author>	</entry>

	</feed>