<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wmjohnso</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wmjohnso"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Wmjohnso"/>
	<updated>2026-05-05T19:40:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=TinyDNS_Format&amp;diff=8301</id>
		<title>TinyDNS Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=TinyDNS_Format&amp;diff=8301"/>
		<updated>2012-07-10T18:42:56Z</updated>

		<summary type="html">&lt;p&gt;Wmjohnso: Added AAAA Records&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= TinyDNS data file =&lt;br /&gt;
&lt;br /&gt;
The offical data format for tinydns data is documented in http://cr.yp.to/djbdns/tinydns-data.html  See notes at bottom for more information on certain fields.&lt;br /&gt;
&lt;br /&gt;
== SOA Record ==&lt;br /&gt;
&lt;br /&gt;
`Zfqdn:nameserver:contactinfo:serial:retry:expire:min:ttl:timestamp:lo`&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Zmy.example.net:208.210.221.65:abuse.example.net&#039;&#039;&#039;&lt;br /&gt;
 Question: Zmy.example.net.&lt;br /&gt;
 my.example.net. +2560 soa 208.210.221.65. abuse@example.net. 1206390017 16384 2048 1048576 2560&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Zmy.example.net:208.210.221.65:abuse.example.net:2008032201:1000:2000:3000:4000&#039;&#039;&#039;&lt;br /&gt;
 my.example.net. +2560 soa 208.210.221.65. abuse@example.net. 2008032201 1000 2000 3000 4000&lt;br /&gt;
&lt;br /&gt;
== A, NS record combined ==&lt;br /&gt;
&lt;br /&gt;
`&amp;amp;fqdn:ip:x:ttl:timestamp:lo`&lt;br /&gt;
&lt;br /&gt;
Creates an &#039;&#039;A&#039;&#039; and &#039;&#039;NS&#039;&#039; record.  Typically used to delegate a subdomain; can be used in combination with &#039;&#039;&#039;Z&#039;&#039;&#039; to accomplish the same thing as the combo above, but with a different email address.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;amp;my.example.net:208.210.221.65:something:&#039;&#039;&#039;&lt;br /&gt;
 # Question: Zmy.example.net.&lt;br /&gt;
 # NS replies:&lt;br /&gt;
 my.example.net. +259200 ns something.ns.my.example.net.&lt;br /&gt;
 # AR replies:&lt;br /&gt;
 #something.ns.my.example.net. +259200 a 208.210.221.65&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;amp;my.example.net:208.210.221.65:ns1.somewhere.com:3600&#039;&#039;&#039;&lt;br /&gt;
 # Question: Zmy.example.net.&lt;br /&gt;
 # NS replies:&lt;br /&gt;
 my.example.net. +3600 ns ns1.somewhere.com.&lt;br /&gt;
 # AR replies:&lt;br /&gt;
 #ns1.somewhere.com. +3600 a 208.210.221.65&lt;br /&gt;
&lt;br /&gt;
== A and PTR record ==&lt;br /&gt;
&lt;br /&gt;
`=fqdn:ip:ttl:timestamp:lo`&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;=alpha.my.example.net:192.168.1.1&#039;&#039;&#039;&lt;br /&gt;
 Question: Zalpha.my.example.net.&lt;br /&gt;
 alpha.my.example.net. +86400 a 192.168.1.1&lt;br /&gt;
 &lt;br /&gt;
 # Question: Z1.1.168.192.in-addr.arpa.&lt;br /&gt;
 1.1.168.192.in-addr.arpa. +86400 ptr alpha.my.example.net&lt;br /&gt;
&lt;br /&gt;
For the PTR record to be returned, you must have the corresponding SOA record defined:&lt;br /&gt;
 Zmy.example.net:ns1.my.example.net:abuse.example.net&lt;br /&gt;
 &amp;amp;my.example.net:208.210.221.65:ns1.my.example.net&lt;br /&gt;
 &lt;br /&gt;
 Z168.192.in-addr.arpa:ns1.my.example.net:abuse.example.net&lt;br /&gt;
 &amp;amp;168.192.in-addr.arpa:208.210.221.65:ns1.my.example.net&lt;br /&gt;
&lt;br /&gt;
== A record ==&lt;br /&gt;
&lt;br /&gt;
`+fqdn:ip:ttl:timestamp:lo`&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;+alpha.my.example.net:192.168.1.1&#039;&#039;&#039;&lt;br /&gt;
 Question: Zalpha.my.example.net.&lt;br /&gt;
 alpha.my.example.net. +86400 a 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
== MX Record ==&lt;br /&gt;
&lt;br /&gt;
`@fqdn:ip:x:dist:ttl:timestamp:lo`&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;@my.example.net:208.210.221.77:something&#039;&#039;&#039;&lt;br /&gt;
 Question: @my.example.net.&lt;br /&gt;
 my.example.net. +86400 mx 0 something.mx.my.example.net.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;@my.example.net:208.210.221.77:mx1.my.example.net:10&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;@my.example.net:208.210.221.78:mx2.my.example.net:20&#039;&#039;&#039;&lt;br /&gt;
 Question: @my.example.net.&lt;br /&gt;
 my.example.net. +86400 mx 10 mx1.my.example.net.&lt;br /&gt;
 my.example.net. +86400 mx 20 mx2.my.example.net.&lt;br /&gt;
 # AR replies:&lt;br /&gt;
 #mx1.my.example.net. +86400 a 208.210.221.77&lt;br /&gt;
 #mx2.my.example.net. +86400 a 208.210.221.78&lt;br /&gt;
&lt;br /&gt;
== CNAME ==&lt;br /&gt;
&lt;br /&gt;
`Cfqdn:x:ttl:timestamp:lo`&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cmailserver.my.example.net:yourmailserver.somewhere.com&#039;&#039;&#039;&lt;br /&gt;
 Question: Zmailserver.my.example.net.&lt;br /&gt;
 mailserver.my.example.net. +86400 cname yourmailserver.somewhere.com.&lt;br /&gt;
&lt;br /&gt;
== TXT ==&lt;br /&gt;
`&#039;fqdn:s:ttl:timestamp:lo`&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;my.example.net:Please do not bug us we know our DNS is broken&#039;&#039;&#039;&lt;br /&gt;
 Question: Tmy.example.net&lt;br /&gt;
 my.example.net. +86400 txt &#039;Please do not bug us we know our DNS is broken&#039;&lt;br /&gt;
&lt;br /&gt;
== SRV ==&lt;br /&gt;
&amp;lt;code&amp;gt;Sfqdn:ip:x:port:priority:weight:ttl:timestamp&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Standard rules for ip, x, ttl, and timestamp apply. Port, priority, and weight&lt;br /&gt;
all range from 0-65535. Priority and weight are optional; they default to zero&lt;br /&gt;
if not provided.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sconsole.zoinks.example.com:1.2.3.4:rack102-con1:2001:7:69:300:&#039;&#039;&#039;&lt;br /&gt;
 query: 33 console.zoinks.example.com&lt;br /&gt;
 answer: console.zoinks.example.com 300 SRV 7 69 2001 rack102-con1.example.com&lt;br /&gt;
&lt;br /&gt;
== NAPTR ==&lt;br /&gt;
`Nfqdn:order:pref:flags:service:regexp:replacement:ttl:timestamp`&lt;br /&gt;
&lt;br /&gt;
The same standard rules for ttl and timestamp apply. Order and preference&lt;br /&gt;
(optional) range from 0-65535, and they default to zero if not provided. Flags,&lt;br /&gt;
service and replacement are character-strings.  The replacement is a fqdn that&lt;br /&gt;
defaults to &#039;.&#039; if not provided.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Nsomedomain.org:100:90:s:SIP+D2U::_sip._udp.somedomain.org&#039;&#039;&#039;&lt;br /&gt;
 query: 35 somedomain.org&lt;br /&gt;
 answer: somedomain.org 78320 NAPTR 100 90 &amp;quot;s&amp;quot; &amp;quot;SIP+D2U&amp;quot; &amp;quot;&amp;quot; _sip._tcp.somedomain.org&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ncid.urn.arpa:100:10:::!^urn\058cid\058.+@([^\.]+\.)(.*)$!\2!i:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== AAAA ==&lt;br /&gt;
`:fqdn:28:location:ttl`&lt;br /&gt;
&lt;br /&gt;
These records are used to resolve IPv6 addresses.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;:alpha.my.example.net:28:\050\001\103\000\302\072\000\077\105\052\064\355\256\064\063\124:86400&#039;&#039;&#039;&lt;br /&gt;
 query: alpha.my.example.net   IN         ANY&lt;br /&gt;
 answer: alpha.my.example.net. 86400 IN	AAAA	2801:4300:c23a:3f:452a:34ed:ae34:3354&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Each line starts with a character, and continues with colon separated fields.  Spaces and tabs at the end of a line are ignored.  Blank lines are also ignored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;timestamp&#039;&#039;&#039; is an optional TAI64 (hex format) timestamp.  If the timestamp is given the ttl has special meaning:  &lt;br /&gt;
* If ttl is nonzero or omitted, then the timestamp is when this record goes &amp;quot;live&amp;quot;&lt;br /&gt;
* if ttl is zero, then the timestamp is the &amp;quot;time to die&amp;quot;, when the record is no longer to be served.  Tinydns will dynamically adjust the ttl so that the DNS records are not cached beyond the &amp;quot;time to die&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;lo&#039;&#039;&#039; is an optional location field.  The record is ignored if the client is outside that location.  lo can be one or two characters. For example, &lt;br /&gt;
  &lt;br /&gt;
 %in:192.168&lt;br /&gt;
 %ex&lt;br /&gt;
 +www.mydomain.com:192.168.1.1:::in&lt;br /&gt;
 +www.mydomain.com:200.20.32.1:::ex&lt;br /&gt;
specifies www.mydomain.com has address 192.168.1.1 for clients in the 192.168.0.0/16 address range, and 200.20.32.1 for all other clients.  &lt;br /&gt;
&lt;br /&gt;
In lines with &amp;quot;x&amp;quot;, if &amp;quot;x&amp;quot; contains a dot, then &amp;quot;x&amp;quot; is used as the server name rather than &amp;quot;x&amp;quot;.[something].fqdn   You should omit ip if x has IP addresses assigned elsewhere in the data file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Wildcards&#039;&#039;&#039; in the form of *.fqdn are allowed, and will resolve any address EXCEPT those that have their own records, or more specific wildcards.&lt;br /&gt;
&lt;br /&gt;
 +www.mydomain.com:200.3.1.1&lt;br /&gt;
 +*.mydomain.com:127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Will send the user to his local machine for foo.mydomain.com, mx.mydomain.com, in fact ANYTHING .mydomain.com, except www.mydomain.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Wmjohnso</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Wmjohnso&amp;diff=7926</id>
		<title>User:Wmjohnso</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Wmjohnso&amp;diff=7926"/>
		<updated>2012-04-20T15:36:43Z</updated>

		<summary type="html">&lt;p&gt;Wmjohnso: Created page with &amp;quot;== Made you look. :) ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Made you look. :) ==&lt;/div&gt;</summary>
		<author><name>Wmjohnso</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sircbot&amp;diff=7925</id>
		<title>Sircbot</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sircbot&amp;diff=7925"/>
		<updated>2012-04-20T15:31:32Z</updated>

		<summary type="html">&lt;p&gt;Wmjohnso: fixed the numbered list in the Troubleshooting Section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sircbot is a simple irc bot based in lua script.&lt;br /&gt;
&lt;br /&gt;
== Install sircbot ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add sircbot lua-sircbot}}&lt;br /&gt;
&lt;br /&gt;
== Configue sircbot ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd| vi  /etc/conf.d/sircbot}}&lt;br /&gt;
&lt;br /&gt;
Change name, server and channel&lt;br /&gt;
&lt;br /&gt;
 sircbot_opts=&amp;quot;-n name -s server&amp;quot;&lt;br /&gt;
 sircbot_channels=&amp;quot;#channel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Create sircbot scripts folders and files ==&lt;br /&gt;
&lt;br /&gt;
Sircbot will use an folder for the channel where is logged in. Lets say we will use it at the &amp;quot;test&amp;quot; channel.&lt;br /&gt;
The folder path is: /etc/sircbot.d/#channel&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Lets see an example:&lt;br /&gt;
&lt;br /&gt;
Our bot will be named kumquat and we will join at the #test channel in the irc.ddd.ddd server.&lt;br /&gt;
&lt;br /&gt;
{{Cmd| vi  /etc/conf.d/sircbot}}&lt;br /&gt;
&lt;br /&gt;
Change name, server and channel&lt;br /&gt;
&lt;br /&gt;
 sircbot_opts=&amp;quot;-n kumquat -s irc.ddd.ddd&amp;quot;&lt;br /&gt;
 sircbot_channels=&amp;quot;#test&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Create folder bot. &lt;br /&gt;
&lt;br /&gt;
{{Cmd| mkdir /etc/sircbot.d/#test -p}}&lt;br /&gt;
&lt;br /&gt;
Create the lua scrip file for our bot. &lt;br /&gt;
&lt;br /&gt;
{{Cmd| vi /etc/sircbot.d/#test/commands}}&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/lua&lt;br /&gt;
 &lt;br /&gt;
 -- Scripts for kumquat in Lua&lt;br /&gt;
 &lt;br /&gt;
 args={...}&lt;br /&gt;
 &lt;br /&gt;
 sender=args[1]   	-- is the nickname of running the command on IRC&lt;br /&gt;
 message=args[2] 	-- is the message or command typed&lt;br /&gt;
 channel=args[3] 	-- is the channel name&lt;br /&gt;
 &lt;br /&gt;
 os.execute(&amp;quot;sleep &amp;quot; .. tonumber(1))&lt;br /&gt;
 &lt;br /&gt;
 -- This command will show: What can i do for you &amp;quot;nickname&amp;quot;?&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;kumquat&amp;quot;) &lt;br /&gt;
   if kumquatresult ~= nil then&lt;br /&gt;
   command=&amp;quot;echo &#039;What can i do for you &#039;&amp;quot;..sender..&amp;quot;&#039;?&#039; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;&lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This command will show: Hello there, amigo &amp;quot;nickname&amp;quot;&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;hi&amp;quot;)&lt;br /&gt;
   if kumquatresult ~= nil then&lt;br /&gt;
   command=&amp;quot;echo &#039;Hello there, amigo &#039;&amp;quot;..sender..&amp;quot;&#039;&#039; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;&lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This command will show the current UTC date and time&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;date&amp;quot;)&lt;br /&gt;
   if kumquatresult ~= nil then&lt;br /&gt;
   command=&amp;quot;date -u | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;&lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This command will do a search for a alpine linux package&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;apk search:[^%d]&amp;quot;)&lt;br /&gt;
 if kumquatresult ~= nil then&lt;br /&gt;
   local strng = (string.sub(message, 12))&lt;br /&gt;
   command=&amp;quot;apk search&amp;quot;..strng..&amp;quot; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;    &lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
  &lt;br /&gt;
 -- This command will resolve a host name and ip&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;host:[^%d]&amp;quot;)&lt;br /&gt;
 if kumquatresult ~= nil then&lt;br /&gt;
   local strng = (string.sub(message, 6))&lt;br /&gt;
   command=&amp;quot;host &amp;quot;..strng..&amp;quot; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;    &lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This command will do a 3 times ping to a server or ip address&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;ping:[^%d]&amp;quot;)&lt;br /&gt;
 if kumquatresult ~= nil then&lt;br /&gt;
   local strng = (string.sub(message, 6))&lt;br /&gt;
   command=&amp;quot;ping -c 3 &amp;quot;..strng..&amp;quot; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;    &lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Make the script to be executable&lt;br /&gt;
&lt;br /&gt;
{{Cmd| chmod +x /etc/sircbot.d/#test/commands}}&lt;br /&gt;
&lt;br /&gt;
== Giving life to the bot ==&lt;br /&gt;
&lt;br /&gt;
Starting bot service and adding to boot.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/sircbot start &amp;amp;&amp;amp; rc-update add sircbot default}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If your bot is not responding as expected, an easy way to troubleshoot is to manually execute the script in /etc/sircbot.d/&amp;lt;#channelname&amp;gt;/&amp;lt;scriptname&amp;gt; with the three agruments.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/sircbot.d/&amp;lt;#channelname&amp;gt;/&amp;lt;scriptname&amp;gt; username hi &#039;&amp;lt;#channelname&amp;gt;&#039;}}&lt;br /&gt;
&lt;br /&gt;
If your bot responds as expected, then you know that your script works.  The problem is that sircbot is not executing the script.  Here are two likely causes:&lt;br /&gt;
&lt;br /&gt;
# Sircbot is case-sensetive when looking for the channel directory for a script to execute.  For example, if you have a channel named &amp;quot;#Alpine&amp;quot;, sircbot will look for /etc/sircbot.d/#Alpine/*.  If that pathway isn&#039;t exactly right, then sircbot will skip that folder.  In our example, if you have /etc/sircbot.d/#alpine/script, sircbot will not execute anything in that folder.  To fix, simply rename the folder to /etc/sircbot.d/#Alpine/&lt;br /&gt;
# Sircbot doesn&#039;t execute scripts that have a &#039;.&#039; in the name.  For example a script named &#039;listen.lua&#039; will not be executed.  Simply rename the script to &#039;listen&#039;.&lt;/div&gt;</summary>
		<author><name>Wmjohnso</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sircbot&amp;diff=7924</id>
		<title>Sircbot</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sircbot&amp;diff=7924"/>
		<updated>2012-04-20T11:06:56Z</updated>

		<summary type="html">&lt;p&gt;Wmjohnso: Added the Troubleshooting section. - wmjohnso&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sircbot is a simple irc bot based in lua script.&lt;br /&gt;
&lt;br /&gt;
== Install sircbot ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add sircbot lua-sircbot}}&lt;br /&gt;
&lt;br /&gt;
== Configue sircbot ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd| vi  /etc/conf.d/sircbot}}&lt;br /&gt;
&lt;br /&gt;
Change name, server and channel&lt;br /&gt;
&lt;br /&gt;
 sircbot_opts=&amp;quot;-n name -s server&amp;quot;&lt;br /&gt;
 sircbot_channels=&amp;quot;#channel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Create sircbot scripts folders and files ==&lt;br /&gt;
&lt;br /&gt;
Sircbot will use an folder for the channel where is logged in. Lets say we will use it at the &amp;quot;test&amp;quot; channel.&lt;br /&gt;
The folder path is: /etc/sircbot.d/#channel&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Lets see an example:&lt;br /&gt;
&lt;br /&gt;
Our bot will be named kumquat and we will join at the #test channel in the irc.ddd.ddd server.&lt;br /&gt;
&lt;br /&gt;
{{Cmd| vi  /etc/conf.d/sircbot}}&lt;br /&gt;
&lt;br /&gt;
Change name, server and channel&lt;br /&gt;
&lt;br /&gt;
 sircbot_opts=&amp;quot;-n kumquat -s irc.ddd.ddd&amp;quot;&lt;br /&gt;
 sircbot_channels=&amp;quot;#test&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Create folder bot. &lt;br /&gt;
&lt;br /&gt;
{{Cmd| mkdir /etc/sircbot.d/#test -p}}&lt;br /&gt;
&lt;br /&gt;
Create the lua scrip file for our bot. &lt;br /&gt;
&lt;br /&gt;
{{Cmd| vi /etc/sircbot.d/#test/commands}}&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/lua&lt;br /&gt;
 &lt;br /&gt;
 -- Scripts for kumquat in Lua&lt;br /&gt;
 &lt;br /&gt;
 args={...}&lt;br /&gt;
 &lt;br /&gt;
 sender=args[1]   	-- is the nickname of running the command on IRC&lt;br /&gt;
 message=args[2] 	-- is the message or command typed&lt;br /&gt;
 channel=args[3] 	-- is the channel name&lt;br /&gt;
 &lt;br /&gt;
 os.execute(&amp;quot;sleep &amp;quot; .. tonumber(1))&lt;br /&gt;
 &lt;br /&gt;
 -- This command will show: What can i do for you &amp;quot;nickname&amp;quot;?&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;kumquat&amp;quot;) &lt;br /&gt;
   if kumquatresult ~= nil then&lt;br /&gt;
   command=&amp;quot;echo &#039;What can i do for you &#039;&amp;quot;..sender..&amp;quot;&#039;?&#039; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;&lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This command will show: Hello there, amigo &amp;quot;nickname&amp;quot;&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;hi&amp;quot;)&lt;br /&gt;
   if kumquatresult ~= nil then&lt;br /&gt;
   command=&amp;quot;echo &#039;Hello there, amigo &#039;&amp;quot;..sender..&amp;quot;&#039;&#039; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;&lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This command will show the current UTC date and time&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;date&amp;quot;)&lt;br /&gt;
   if kumquatresult ~= nil then&lt;br /&gt;
   command=&amp;quot;date -u | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;&lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This command will do a search for a alpine linux package&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;apk search:[^%d]&amp;quot;)&lt;br /&gt;
 if kumquatresult ~= nil then&lt;br /&gt;
   local strng = (string.sub(message, 12))&lt;br /&gt;
   command=&amp;quot;apk search&amp;quot;..strng..&amp;quot; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;    &lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
  &lt;br /&gt;
 -- This command will resolve a host name and ip&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;host:[^%d]&amp;quot;)&lt;br /&gt;
 if kumquatresult ~= nil then&lt;br /&gt;
   local strng = (string.sub(message, 6))&lt;br /&gt;
   command=&amp;quot;host &amp;quot;..strng..&amp;quot; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;    &lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 -- This command will do a 3 times ping to a server or ip address&lt;br /&gt;
 local kumquatresult = string.find(message, &amp;quot;ping:[^%d]&amp;quot;)&lt;br /&gt;
 if kumquatresult ~= nil then&lt;br /&gt;
   local strng = (string.sub(message, 6))&lt;br /&gt;
   command=&amp;quot;ping -c 3 &amp;quot;..strng..&amp;quot; | sircbot-send &#039;&amp;quot;..channel..&amp;quot;&#039;&amp;quot;    &lt;br /&gt;
   io.popen(command)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Make the script to be executable&lt;br /&gt;
&lt;br /&gt;
{{Cmd| chmod +x /etc/sircbot.d/#test/commands}}&lt;br /&gt;
&lt;br /&gt;
== Giving life to the bot ==&lt;br /&gt;
&lt;br /&gt;
Starting bot service and adding to boot.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/sircbot start &amp;amp;&amp;amp; rc-update add sircbot default}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If your bot is not responding as expected, an easy way to troubleshoot is to manually execute the script in /etc/sircbot.d/&amp;lt;#channelname&amp;gt;/&amp;lt;scriptname&amp;gt; with the three agruments.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/sircbot.d/&amp;lt;#channelname&amp;gt;/&amp;lt;scriptname&amp;gt; username hi &#039;&amp;lt;#channelname&amp;gt;&#039;}}&lt;br /&gt;
&lt;br /&gt;
If your bot responds as expected, then you know that your script works.  The problem is that sircbot is not executing the script.  Here are two likely causes:&lt;br /&gt;
&lt;br /&gt;
# Sircbot is case-sensetive when looking for the channel directory for a script to execute.  For example, if you have a channel named &amp;quot;#Alpine&amp;quot;, sircbot will look for /etc/sircbot.d/#Alpine/*.  If that pathway isn&#039;t exactly right, then sircbot will skip that folder.  In our example, if you have /etc/sircbot.d/#alpine/script, sircbot will not execute anything in that folder.  To fix, simply rename the folder to /etc/sircbot.d/#Alpine/&lt;br /&gt;
&lt;br /&gt;
## Sircbot doesn&#039;t execute scripts that have a &#039;.&#039; in the name.  For example a script named &#039;listen.lua&#039; will not be executed.  Simply rename the script to &#039;listen&#039;.&lt;/div&gt;</summary>
		<author><name>Wmjohnso</name></author>
	</entry>
</feed>