<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Making_a_%21request_script</id>
	<title>Making a !request script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Making_a_%21request_script"/>
	<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Making_a_!request_script&amp;action=history"/>
	<updated>2026-05-14T13:17:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Making_a_!request_script&amp;diff=3794&amp;oldid=prev</id>
		<title>Albie: Added pertection against parting all chans</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Making_a_!request_script&amp;diff=3794&amp;oldid=prev"/>
		<updated>2006-05-03T15:22:43Z</updated>

		<summary type="html">&lt;p&gt;Added pertection against parting all chans&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:22, 3 May 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ;Use gettok to make sure the user isn&amp;#039;t requesting #bleh,0 (making your bot part all channels) or #1,#2,#3 (making the bot join multiple channels)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    ;Use gettok to make sure the user isn&amp;#039;t requesting #bleh,0 (making your bot part all channels) or #1,#2,#3 (making the bot join multiple channels)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    [[set]] %request. $+ [[$gettok]]([[$1-|$2]],1,44) [[$nick]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    [[set]] %request. $+ [[$gettok]]([[$1-|$2]],1,44) [[$nick]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    join $gettok($2,1,44)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;Check that we aren&#039;t about to &quot;&lt;/ins&gt;join &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&quot; and part all channels.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   if (&lt;/ins&gt;$gettok($2,1,44) &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;!= 0) [[join]] [[$v1]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot;&gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    set %request. $+ $gettok($2,1,44) $nick&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    set %request. $+ $gettok($2,1,44) $nick&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    set %requestbot. $+ $gettok($2,1,44) $3&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    set %requestbot. $+ $gettok($2,1,44) $3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[join]] &lt;/del&gt;$gettok($2,1,44)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if (&lt;/ins&gt;$gettok($2,1,44) &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;!= 0) join $v1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Albie</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Making_a_!request_script&amp;diff=1395&amp;oldid=prev</id>
		<title>Tovrleaf: links enabled</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Making_a_!request_script&amp;diff=1395&amp;oldid=prev"/>
		<updated>2005-08-25T16:06:27Z</updated>

		<summary type="html">&lt;p&gt;links enabled&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;We get a number of people asking about !Request scripts every week&lt;br /&gt;
I would assume most bot channels use TCLs for this kind of function, but if you really want to use mIRC, here&amp;#039;s how to start.&lt;br /&gt;
&lt;br /&gt;
 ;The on text event of course&lt;br /&gt;
 [[On_text|on *:text]]:!request *:#channel: {&lt;br /&gt;
   ;You will probably want to add some if statements &amp;amp; anti-spam here&lt;br /&gt;
   ;Set the requesters nickname to a variable, for later use&lt;br /&gt;
   ;Use gettok to make sure the user isn&amp;#039;t requesting #bleh,0 (making your bot part all channels) or #1,#2,#3 (making the bot join multiple channels)&lt;br /&gt;
   [[set]] %request. $+ [[$gettok]]([[$1-|$2]],1,44) [[$nick]]&lt;br /&gt;
   join $gettok($2,1,44)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ;Raw 366 is &amp;#039;End of /NAMES list&amp;#039; (see raws page) and the best trigger for our next part&lt;br /&gt;
 &lt;br /&gt;
 [[Raw_366|raw 366]]:*: {&lt;br /&gt;
   ;Lets have it check wheter or not there&amp;#039;s a request for the channel, using the variable we set earlier&lt;br /&gt;
   ;..and continue only if that variable exists&lt;br /&gt;
   [[If-Then-Else|if]] (%request. [ $+ [ $2 ] ]) {&lt;br /&gt;
 &lt;br /&gt;
     ;Here&amp;#039;s where you should add all your &amp;#039;checks&amp;#039;&lt;br /&gt;
     ;For example, if we want it to deny the request if the channel doesn&amp;#039;t have 5 users&lt;br /&gt;
     if ([[$nick]]($2,0) &amp;lt; 5) {&lt;br /&gt;
       ;We will use the variable again, this time to get the requester nickname&lt;br /&gt;
       msg %request. [ $+ [ $2 ] ] Your request has been denied&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     ;Lets also have it check if the requester is opped on the channel&lt;br /&gt;
     elseif (%request. [ $+ [ $2 ] ] !isop $2) {&lt;br /&gt;
       msg %request. [ $+ [ $2 ] ] Your request has been denied&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     ;If the channel didn&amp;#039;t get denied yet, continue with the acception part:&lt;br /&gt;
     else {&lt;br /&gt;
       [[msg]] %request. [ $+ [ $2 ] ] Your request has been accepted&lt;br /&gt;
       ;You should put your bot-add script here, for example:&lt;br /&gt;
       msg Mybot addchannel $2&lt;br /&gt;
       msg Mybot addowner $2 %request. [ $+ [ $2 ] ]&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     ;And unset the variable to keep it clean :)&lt;br /&gt;
     [[unset]] %request. $+ $2&lt;br /&gt;
     ;Finally, have the bot leave the channel&lt;br /&gt;
     [[part]] $2&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;-----------------------------------------------------------&lt;br /&gt;
 ;Now, you&amp;#039;ll probably want the script to work with supplied botnames, ie: !request #channel botname&lt;br /&gt;
 ;which is also quite simple:&lt;br /&gt;
 &lt;br /&gt;
 on *:text:!request *:#channel: {&lt;br /&gt;
   ;We&amp;#039;ll make it save the 3rd word (botname) aswell&lt;br /&gt;
   set %request. $+ $gettok($2,1,44) $nick&lt;br /&gt;
   set %requestbot. $+ $gettok($2,1,44) $3&lt;br /&gt;
   [[join]] $gettok($2,1,44)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ;We use the raw 366 again but replace this part:&lt;br /&gt;
 msg Mybot addchannel $2&lt;br /&gt;
 msg Mybot addowner $2 %request. [ $+ [ $2 ] ]&lt;br /&gt;
 ;With:&lt;br /&gt;
 msg %requestbot. [ $+ [ $2 ] ] addchannel $2&lt;br /&gt;
 msg %requestbot. [ $+ [ $2 ] ] addowner $2 %request. [ $+ [ $2 ] ]&lt;br /&gt;
 ;You&amp;#039;ll obviously need to change those to match the commands of your own bot&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;The rest is up to you&lt;br /&gt;
 ;You will most likely want to add statements that make sure $2 and $3 exist, and $3 is infact a bot and not some random user&lt;br /&gt;
 ;Have fun :)&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Archive]]&lt;/div&gt;</summary>
		<author><name>Tovrleaf</name></author>
	</entry>
</feed>